Numerical methods. Note 10
[~Home~] Solution of Nonlinear Equations and Minimization. Numerical Methods. Note~ « 10 »

Systems of nonlinear equations. Modified Newton"s method. Consider a system of n nonlinear equations fi(x1,...,xn)=0, i=1,...,n. Suppose that the point x is close to the root. Let us try to find the step Δx which brings us to the solution fi(x+Δx)=0. The first order Taylor expansion gives a system of linear equations

fi(x)+∑j ∂fi/∂xjΔxj = 0, or, A\dot{}Δx = -f , where Aij  ≡  {∂fi/∂xj} , f  ≡  {fi}
The solution Δx to this equation gives the approximate direction and the step-size towards the root. However in the modified Newton's method instead of the full step a more conservative approach is usually taken, for example: \tt
λ = 1;  do until λ\lt{}0.01 {
	y = x + λΔx
	if |f(y)|\lt{}(1-λ/2)|f(x)| x=y; exit
	else λ = λ/2 }
\xtt

Minimization of functions. Downhill simplex method. The method is used to find a minimum of a function of n variables f(p) (p is an n-dimensional vector) by transforming the simplex according to the function values at the vertices thus moving it downhill until it reaches the minimum.

Definitions:
Simplex: a figure represented by n+1 points pi, i=1,..,n+1 (each point pi is an n-dimensional vector).
highest point, ph, f(ph) = max(i) f(pi); lowest point, pl, f(pl) = min(i) f(pi); centroid, p0, p0 = 1/n ∑(i ≠ h) pi
Operations on the simplex:
Reflection: ph → pr = p0 - (ph - p0),
Expansion: pl → pe = p0 + 2(pr - p0),
Contraction: ph → pc = p0 + ½(ph - p0),
Reduction: pi = 1/2(pi+pl).
Algorithm:
\tt
do until converged
	try Reflection
	If f(pr)\lt{}f(pl) accept Reflection; Expansion; cycle
	If f(pr)\lt{}f(ph) accept Reflection; cycle
	try Contraction; if f(pc)\lt{}f(ph) accept Contraction; cycle
	Reduction
cycle
\xtt

Problems

  1. Implement the Modified Newton's method and the downhill simplex method
  2. Solve the system of two equations (1-x)=0, 10(x-y2)=0.
  3. Find the minimum of a paraboloid f(x,y)=10(x-1)2+20(y-2)2.

"Copyleft" © 2004 D.V.Fedorov (fedorov at phys dot au dot dk)