<< newton_GGN11_sp Optimisation newton_U15_sp >>

grocer >> Optimisation > newton_U15

newton_U15

find the 0 of a function by Ullah (2015) method

CALLING SEQUENCE

[xs,fs,maxfs]=newton_U15(x0,func,Jac,ftol,itermax,alphamin)

PARAMETERS

Input

* x0 = a (n x 1) vector of starting values

* func = a function, whose 0 is searched

* Jac = a function, performing the Jacobian of the function

* ftol = the convergence criterion for the function value

* itermax = the maxmimum number for the function calls

* alphamin = the minimum value used to dampen the step when convergence is not acheived

Output

* xs = the value of the parameter at solution

* fs = the value of the function at solution

* maxfs = the maximum value of the absolute function at solution

DESCRIPTION

Finds the 0 of an equation using the variant of the Newton method provided by Ullah at page 37 in his thesis "Numerical Iterative Methods For Nonlinear Problems".

EXAMPLE

// Search the zero of function test_func in the optsci folder. The function codes the example 3 provided by
// Liu, Zheng and Huang (2016), Third- and fifth-order Newton–Gauss methods for solving nonlinear equations with n variables,
// Applied Mathematics and Computation, n. 290, p. 250-257.
// The function to minimize is:
// 4*(x(1)-x(2)^2)+x(2)-x(3)^2 = 0
// x(2)*(x(2)^2-x(1))-2*(1-x(2))+4*(x(2)-x(3)^2)+x(3)-x(4)^2=0
// (3)*(x(3)^2-x(2))-2*(1-x(3))+4*(x(3)-x(4)^2)+x(2)^2-x(1)+x(4)-x(5)^2=0
// x(4)*(x(4)^2-x(3))-2*(1-x(4))+4*(x(4)-x(5)^2)+x(3)^2-x(2)=0
// x(5)*(x(5)^2-x(4))-2*(1-x(5))+x(4)^2-x(3)=0
// The corresponding Jacobian function is coded in function test_Jac
// Starting values are the ones provided in the paper: [1.2 ; 1.2 ; 1.2 ; 1.2 ; 1.2]
// Convergence criterion is set to 1e-10, maximum # of iterations is set to 1000, minimum value used to dampen the step is set to
 
[x0,f0,maxf0]=newton_U15(1.2*ones(5,1),newton_testfunc,newton_testJac,1e-10,1000,0.05)
 
 
// Provides the expected result x0 =[1;1;1;1;1] and f0=0

AUTHOR

Éric Dubois 2019

Report an issue
<< newton_GGN11_sp Optimisation newton_U15_sp >>