Numerical methods. Note 11
[ Home ]
|
Nonlinear Equations and Function Minimization. |
Numerical Methods. Note
« 11
»
|
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⋅Δ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:
λ = 1; do until λ<0.01 {
z = x + λΔx;
if |f(z)| < (1-λ/2) |f(x)| exit;
else λ = λ/2;}
x = z;
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, moving it downhill until it
reaches the minimum.
- Definitions:
-
Simplex: a figure represented by n+1 points pk, k=1,..,n+1
(each point pk is an n-dimensional vector).
highest point, phi, f(phi) = max(k) f(pk);
lowest point, plo, f(plo) = min(k) f(pk);
centroid, pce, pce = 1/n ∑(k ≠ hi)
pk
- Operations on the simplex:
-
Reflection: phi → pre
= pce - (phi - pce),
Expansion: phi → pex = pce +
2(pce - phi),
Contraction: phi → pco = pce +
½(phi - pce),
Reduction: pk≠lo = 1/2(pk+plo).
- Algorithm:
-
do until converged
try Reflection
if f(pre)<f(plo) Expansion; cycle
if f(pre)<f(phi) accept Reflection; cycle
try Contraction; if f(pco)<f(phi) accept Contraction; cycle
Reduction
cycle
Problems
- Implement the Modified Newton's method and the downhill simplex method
- Solve the system of two equations (1-x)=0, 10(x-y²)=0.
- Find the minimum of a paraboloid f(x,y)=10(x-1)²+20(y-2)².
- Evaluate the difficulty and usfulness level of each set of problems
by giving them (two) marks from 1 to 5 (with 3 being at the normal
level). The marks should be visible on your web-page.
"Copyleft"
© 2004
D.V.Fedorov
(fedorov at phys dot au dot dk)