Minimization by Newton descent

Please choose a function:
Rosenbrock's function n=2 (banana valley) x*=(1,1), f*=0
Woods quartic function n=4 x*=(1,1,1,1), f*=0
Beales function n=2 x*=(3,0.5) f*=0
Beales function n=2, scaled by x1->x1/100. Solution (300,0.5), f*=0
modified Rosenbrock function n=2, term 100 replaced by 10000, x*=(1,1), f*=0
Box's exponential fit n=3, x*=(1,10,1) f*=0
Fletchers helical function n=3, x*=(1,1,1) f*=0
Himmelblau's quartic function n=2, 4 minima, 4 saddle points, 1 maximum point, f*=0
Nonlinear least squares n=2, Exponential fit
Generalized Rosenbrock function 2 f*=1, x*=(1,....,1)
n=
Kowalik-Osborne nonlinear least squares n=4
Bard nonlinear least squares (rational fit) n=3
Brown-Dennis nonlinear least squares n=4
Hanging chain made unconstrained using Fletchers smooth exact penalty function
n=
A function of your own:

!!! Remember:
The function code you specify here must obey the restrictive rules of JAKEF , hence old fashioned FORTRAN. see under ''FORTRAN how to''

Please type a piece of code for computing the function in the following textarea, following FORTRAN rules. No header must be given here, only the piece of code for computing fx from x.
Important : the variable names are x(j), j=1,...,n, the output must be fx.
You also can set a logical err to .true. and return if the input x does not allow to evaluate fx (for example x(1)=-1 and you need to evaluate log(x(1)).) You can make use of the variable n, the local variables x1,....,x4, (not necessarily equal to x(1) etc) f1,f2,f3,f4,f5,f6,h,sum and a vector z(1),...,z(100) the integers i,j,k (for loops e.g.) and logicals bool1, bool2, bool3.
Also usable are the constants pi, sqrt2=sqrt(2) and e1=exp(1).
You are not allowed to declare new variables yourself. Line formatting is required here, hence remember on the special role of column 1 to 6: blank. If not then : a C in column one for comments, only a nonblank in column 6 = continuation line, a numeric value in column 1 to 5 and blank in column 6 defines a label you can jump to .


an identification text (appears in the plots)
ident=
The number of variables
n = Important: 2 <= n <= 200
and your initial guess xstart(1),...,xstart(n)

Algorithmic parameters:
Standard settings.
Your own settings: Parameter epsx=epsg specifying ''sufficient precision'' in [10-16,10-2]
epsx =
Parameters for the Powell-Wolfe conditions: δ in [10-16,0.999],
κ in [δ,0.999], regul in [10-16,1] , iterma < 4000
δ =
κ = regul = iterma =

Please specify the initial guess for the predefined cases here:
standard initial value
your own choice of the initial value: xstart(1),...,xstart(n)

Do you want a contour plot of f?
This is done in the (x(i),x(k)) plane over the rectangle [x(i)-xdecr1,x(i)+xincr1]*[x(k)-xdecr2,x(k)+xincr2],
with the other components of x held at their current (optimal) values.
Of course i < > k !
no contour plot
contourplot request
i =
k =
xdecr1 =
xincr1 =
xdecr2 =
xincr2 =

Click on "evaluate", in order to submit your input.

Description of the testcases

Back to the theory page

 Back to the top!

30.08.2017