You are on page 1of 2

Q2 (contd): To solve the given nonlinear system using Knitro

AMPL and use suitable options


The nonlinear system to be solved is given by:
x1 x1 x 2 x 2 0
2

x1 2 x1 x 2 0
2

This system has a solution at (0, 0), however the Jacobian of the system is singular at this
solution point. If the initial estimate of the solution is given to be (0, 0), the solution
obtained is (0, 0).
When no options were set in KNITRO at NEOS using and AMPL model without giving
any initial estimate, the solution was obtained to be

x1 3.7947e 13
x 2 5.1010e 07
When the feasibility tolerance was set to be 1e-30 without an initial estimate, the solution
was obtained as

x1 3.5873e 43
x 2 3.0404e 14
The default value for feasibility tolerance is 1e-6 and hence the solution obtained was not
very accurate.
Other options such as exact evaluation of the gradient and the hessian did not cause any
change in the solution. The options tried were as follows
Option
Value set
Algorithm
All possible settings tried
Bar_initpt
All possible settings tried
Bar_penaltycons
Set to 1 (Do not apply penalty approach to any constraints)
Gradopt
Set to 1 (Compute exact gradient)
Ms_enable
Set to 1 (Multi-start enabled)
Scale
Set to 0 (Do not scale the problem)
The above options did not cause any change in the solution.

Q3 Consider the following system of nonlinear equations:


f(i) = n - sum(j=1..n) cos x(j) + i(1 - cos x(i)) - sin x(i) for i=1..n.
Given that
n

f (i) n cos x( j ) i(1 cos x(i)) sin x(i) for i 1...n


j 1

Solve f(i)=0 for n = 10


The first solution was obtained for an initial guess for x(i) =1/n for i=1...n
The solution obtained is as follows
x1
x2
x3
x4
x5
x6
x7
x8
x9
x10

0.047912
0.049185
0.050609
0.052223
0.054083
0.056273
0.058932
0.186397
0.154342
0.124626

Another solution for the problem was tried for x(i) =5 for i=1...n
x1
x2
x3
x4
x5
x6
x7
x8
x9
x10

6.28319
6.28319
6.28319
6.28319
6.28319
6.28319
6.28319
6.28319
6.28319
6.28319

Analyzing the solution and the equation it can be seen that the problem always has a
solution for x(i) = 0, 2, 4.. 2n. The above solution obtained for x(i) =5 for i=1...n is
at 2.

You might also like