Numerical Solutions of Nonlinear Systems of Equations: Tsung-Ming Huang
Numerical Solutions of Nonlinear Systems of Equations: Tsung-Ming Huang
of equations
Tsung-Ming Huang
Department of Mathematics
National Taiwan Normal University, Taiwan
E-mail: min@math.ntnu.edu.tw
師
大
Fixed points Newton’s method Quasi-Newton methods Steepest Descent Techniques
Outline
2 Newton’s method
3 Quasi-Newton methods
師
大
Fixed points Newton’s method Quasi-Newton methods Steepest Descent Techniques
Theorem 1
Let f : D ⊂ Rn → R be a function and x0 ∈ D. If all the partial
derivatives of f exist and ∃ δ > 0 and α > 0 such that
∀ kx − x0 k < δ and x ∈ D, we have
∂f (x)
∂xj ≤ α, ∀ j = 1, 2, . . . , n,
then f is continuous at x0 .
Example 4
Consider the nonlinear system
1
3x1 − cos(x2 x3 ) − = 0,
2
x21 − 81(x2 + 0.1)2 + sin x3 + 1.06 = 0,
10π − 3
e−x1 x2 + 20x3 + = 0.
3
Fixed-point problem:
Change the system into the fixed-point problem:
1 1
x1 = cos(x2 x3 ) + ≡ g1 (x1 , x2 , x3 ),
3 6
1
q
x2 = 2
x1 + sin x3 + 1.06 − 0.1 ≡ g2 (x1 , x2 , x3 ),
9
1 10π − 3
x3 = − e−x1 x2 − ≡ g3 (x1 , x2 , x3 ).
20 60 師
大
as well as
∂g1 1 1 師
∂x2 ≤ 3 |x3 | · | sin(x2 x3 )| ≤ 3 sin 1 < 0.281, 大
Fixed points Newton’s method Quasi-Newton methods Steepest Descent Techniques
∂g1 1 1
∂x3 ≤ |x2 | · | sin(x2 x3 )| ≤ sin 1 < 0.281,
3 3
∂g2 |x1 | 1
∂x1 = p < √ < 0.238,
9 x21 + sin x3 + 1.06 9 0.218
∂g2 | cos x3 | 1
∂x3 = p
2
< √ < 0.119,
18 x1 + sin x3 + 1.06 18 0.218
∂g3 |x2 | −x1 x2 1
∂x1 = e ≤ e < 0.14,
20 20
∂g3 |x1 | −x1 x2 1
∂x2 = e ≤ e < 0.14.
20 20
These imply that g1 , g2 and g3 are continuous on D and ∀ x ∈ D,
∂gi
∂xj ≤ 0.281, ∀ i, j.
師
Similarly, ∂gi /∂xj are continuous on D for all i and j. Consequently, 大
Approximated solution:
Fixed-point iteration (I):
Choosing x(0) = [0.1, 0.1, −0.1]T , {x(k) } is generated by
(k) 1 (k−1) (k−1) 1
x1 = cos x x3 + ,
3r 2 6
1 2
(k) (k−1) (k−1)
x2 = x1 + sin x3 + 1.06 − 0.1,
9
(k) 1 (k−1) (k−1) 10π − 3
x3 = − e−x1 x2
− .
20 60
Result:
(k) (k) (k)
k x1 x2 x3 kx(k) − x(k−1) k∞
0 0.10000000 0.10000000 -0.10000000
1 0.49998333 0.00944115 -0.52310127 0.423
2 0.49999593 0.00002557 -0.52336331 9.4 × 10−3
3 0.50000000 0.00001234 -0.52359814 2.3 × 10−4
4 0.50000000 0.00000003 -0.52359847 1.2 × 10−5
師
大
5 0.50000000 0.00000002 -0.52359877 3.1 × 10−7
Fixed points Newton’s method Quasi-Newton methods Steepest Descent Techniques
Newton’s method
First consider solving the following system of nonlinear eqs.:
(
f1 (x1 , x2 ) = 0,
f2 (x1 , x2 ) = 0.
(k) (k)
Suppose (x1 , x2 ) is an approximation to the solution of the
(k) (k)
system above, and we try to compute h1 and h2 such that
(k) (k) (k) (k)
(x1 + h1 , x2 + h2 ) satisfies the system. By the Taylor’s
theorem for two variables,
(k) (k) (k) (k)
0 = f1 (x1 + h1 , x2 + h2 )
(k) (k) (k) ∂f1 (k) (k) (k) ∂f1 (k) (k)
≈ f1 (x1 , x2 ) + h1 (x1 , x2 ) + h2 (x , x2 )
∂x1 ∂x2 1
(k) (k) (k) (k)
0 = f2 (x1 + h1 , x2 + h2 )
師
大
(k) (k) (k) ∂f2 (k) (k) (k) ∂f2 (k) (k)
≈ f2 (x1 , x2 ) + h1 (x1 , x2 ) + h2 (x1 , x2 )
∂x1 ∂x2
Fixed points Newton’s method Quasi-Newton methods Steepest Descent Techniques
Theorem 5
Let x∗ be a solution of G(x) = x. Suppose ∃ δ > 0 with
(i) ∂gi /∂xj is continuous on Nδ = {x; kx − x∗ k < δ} for all i and j.
(ii) ∂ 2 gi (x)/(∂xj ∂xk ) is continuous and
2
∂ gi (x)
∂xj ∂xk ≤ M
x(k) = G(x(k−1) )
Example 6
Consider the nonlinear system
1
3x1 − cos(x2 x3 ) −
= 0,
2
x21 − 81(x2 + 0.1)2 + sin x3 + 1.06 = 0,
10π − 3
e−x1 x2 + 20x3 + = 0.
3
Result:
師
大
Fixed points Newton’s method Quasi-Newton methods Steepest Descent Techniques
Quasi-Newton methods
Newton’s Methods
Advantage: quadratic convergence
Disadvantage: For each iteration, it requires
O(n3 ) + O(n2 ) + O(n) arithmetic operations:
n2 partial derivatives for Jacobian matrix – in most situations,
the exact evaluation of the partial derivatives is inconvenient.
n scalar functional evaluations of F
O(n3 ) arithmetic operations to solve linear system.
quasi-Newton methods
Advantage: it requires only n scalar functional evaluations
per iteration and O(n2 ) arithmetic operations
Disadvantage: superlinear convergence
Recall that in one dimensional case, one uses the linear model
`k (x) = f (xk ) + ak (x − xk )
師
to approximate the function f (x) at xk . That is, `k (xk ) = f (xk ) 大
The zero of `k (x) is used to give a new approximate for the zero of
f (x), that is,
1
xk+1 = xk − 0 f (xk )
f (xk )
which yields Newton’s method.
If f 0 (xk ) is not available, one instead asks the linear model to satisfy
`k (xk ) = f (xk ) and `k (xk−1 ) = f (xk−1 ).
In doing this, the identity
f (xk−1 ) = `k (xk−1 ) = f (xk ) + ak (xk−1 − xk )
gives
f (xk ) − f (xk−1 )
ak = .
xk − xk−1
Solving `k (x) = 0 yields the secant iteration
xk − xk−1
xk+1 = xk − f (xk ). 師
大
f (xk ) − f (xk−1 )
Fixed points Newton’s method Quasi-Newton methods Steepest Descent Techniques
Mk (x) = F (xk ) + Ak (x − xk ),
Mk (xk ) = F (xk ),
xk+1 = xk − A−1
k F (xk ).
xk+1 = xk − F 0 (xk )
大
F (xk ).
Fixed points Newton’s method Quasi-Newton methods Steepest Descent Techniques
Mk (xk−1 ) = F (xk−1 ).
Then
which gives
x − xk−1 = αhk + tk ,
Since
both yk and Ak−1 hk are old values, we have no control over the
first part (Ak − Ak−1 )hk . In order to minimize Mk (x) − Mk−1 (x),
we try to choose Ak so that
Ak − Ak−1 = uk hTk
which gives
yk − Ak−1 hk
uk = .
hTk hk
Therefore,
(yk − Ak−1 hk )hTk
Ak = Ak−1 + . (1)
hTk hk
and
End While
Fixed points Newton’s method Quasi-Newton methods Steepest Descent Techniques
A−1
k
−1
(yk − Ak−1 hk )hTk
= Ak−1 +
hTk hk
−1
−1 −1 yk − Ak−1 hk T −1 yk − Ak−1 hk
= Ak−1 − Ak−1 1 + hk Ak−1 hTk
hTk hk hTk hk
(hk − A−1 T −1
k−1 yk )hk Ak−1
= A−1
k−1 + . 師
大
hTk A−1
k−1 yk
Fixed points Newton’s method Quasi-Newton methods Steepest Descent Techniques
Newton-based methods
Advantage: high speed of convergence once a sufficiently
accurate approximation
Weakness: an accurate initial approximation to the solution
is needed to ensure convergence.
Steepest Descent method converges only linearly to the sol., but
it will usually converge even for poor initial approximations.
“Find sufficiently accurate starting approximate solution by using
Steepest Descent method” + ”Compute convergent solution by
using Newton-based methods”
The method of Steepest Descent determines a local minimum
for a multivariable function of g : Rn → R.
A system of the form fi (x1 , . . . , xn ) = 0, i = 1, 2, . . . , n has a
solution at x iff the function g defined by
n
X 2
g(x1 , . . . , xn ) = [fi (x1 , . . . , xn )] 師
大
i=1
Fixed points Newton’s method Quasi-Newton methods Steepest Descent Techniques
Theorem 9
The direction of the greatest decrease in the value of g at x is
the direction given by −∇g(x).
How to find α∗ ?
Solve a root-finding problem h0 (α) = 0 ⇒ Too costly, in
general.
Choose three number α1 < α2 < α3 , construct quadratic
polynomial P (x) that interpolates h at α1 , α2 and α3 , i.e.,
Example 10
Use the Steepest Descent method with x(0) = (0, 0, 0)T to find a
reasonable starting approximation to the solution of the
nonlinear system
1
f1 (x1 , x2 , x3 ) = 3x1 − cos(x2 x3 ) − = 0,
2
f2 (x1 , x2 , x3 ) = x21 − 81(x2 + 0.1)2 + sin x3 + 1.06 = 0,
10π − 3
f3 (x1 , x2 , x3 ) = e−x1 x2 + 20x3 + = 0.
3
Let g(x1, x2 , x3 ) =
[f1 (x1 , x2 , x3 )]2 + [f2 (x1 , x2 , x3 )]2 + [f3 (x1 , x2 , x3 )]2 . Then
∇g(x1 , x2 , x3 ) ≡ ∇g(x)
∂f1 ∂f2 ∂f3
= 2f1 (x) (x) + 2f2 (x) (x) + 2f3 (x) (x),
∂x1 ∂x1 ∂x1
師
∂f1 ∂f2 ∂f3 大
Let
1
z= ∇g(x(0) ) = [−0.0214514, −0.0193062, 0.999583]T .
z0
With α1 = 0, we have
Let α3 = 1 so that
g2 − g1
g2 = P (α2 ) = g1 + h1 α2 ⇒ h1 = = −218.878,
α2
g3 = P (α3 ) = g1 + h1 α3 + h3 α3 (α3 − α2 ) ⇒ h3 = 400.937.
Thus
P (α) = 111.975 − 218.878α + 400.937α(α − 0.5)
so that
0 = P 0 (α0 ) = −419.346 + 801.872α0 ⇒ α0 = 0.522959
Since
g0 = g(x(0) − α0 z) = 2.32762 < min{g1 , g3 },
we set 師
大
(1) (0) T
x =x − α0 z = [0.0112182, 0.0100964, −0.522741] .