| [~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} |
λ = 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.
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