CH02 PDF
CH02 PDF
CH02 PDF
Department of Mathematics,
National Taiwan Normal University, Taiwan
Spring 2016
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 1/108
Section 2.1
The Bisection Method
(二分法)
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 2/108
Solutions of Nonlinear Equations
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 3/108
The Procedure of Bisection Method
b1 − a1 a 1 + b1
p1 = a 1 + = .
2 2
If f(p1 ) = 0, set p = p1 and we are done.
If f(p1 ) ̸= 0, then we have
f(p1 ) · f(a1 ) > 0 ⇒ p ∈ (p1 , b1 ). Set a2 = p1 and b2 = b1 .
f(p1 ) · f(a1 ) < 0 ⇒ p ∈ (a1 , p1 ). Set a2 = a1 and b2 = p1 .
Continue above process until convergence.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 4/108
Illustrative Diagram of Bisection Method
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 5/108
Pseudocode of Bisection Method
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 6/108
Stopping Criteria (停止準則)
In Step 4, other stopping criteria can be used. Let ϵ > 0 be a given
tolerance and p1 , p2 , . . . , pN be generated by Bisection method.
(1) |pN − pN−1 | < ϵ,
|pN −pN−1 |
(2) |pN | < ϵ with pN ̸= 0,
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 7/108
An Example for Bisection Method
Example 1, p. 50
(1) Show that the equation
f(x) = x3 + 4x2 − 10 = 0
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 8/108
Solution
(1) By IVT with f(1)f(2) = (−5)(14) < 0, ∃ p ∈ (1, 2) s.t.
f(p) = 0. Since f ′ (x) = 3x2 + 8x > 0 for x ∈ (1, 2), the root
must be unique in [1, 2].
(2) After 13 iterations, since |a14 | < |p|, we have
Note that
|f(p9 )| < |f(p13 )|
in the Table 2.1.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 9/108
Numerical Results for Example 1
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 10/108
Convergence of the Bisection Method
b−a
|p − pn | ≤ ∀ n ≥ 1.
2n
The rate of convergence is O( 21n ).
b−a
bn − an = by induction.
2n−1
Hence, we hve
bn − a n b−a
|p − pn | ≤ = .
2 2n
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 11/108
Is the error bound tight?
Remark
Applying Thm 2.1 to Example 1, we see that
2−1
|p − p9 | ≤ ≈ 2 × 10−3 ,
29
but the actual absolute value is |p − p9 | ≈ 4.4 × 10−6 . In this case,
the error bound in Thm 2.1 is much larger than the actual error.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 12/108
Example 2, p. 52
As in Example 1, use Thm 2.1 to estimate the smallest number N
of iterations so that |p − pN | < 10−3 .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 13/108
Useful Suggestions for the Bisection Method
In Practical Computation...
To avoid the round-off errors in the computations, use
bn − a n a n + bn
pn = an + instead of pn = .
2 2
To avoid the overflow or underflow of f(pn ) · f(an ), use
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 14/108
Section 2.2
Fixed-Point Iteration
(固定點迭代)
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 15/108
Def 2.2
The number p is called a fixed point (固定點) of a real-valued
function g if g(p) = p.
f(p) = 0,
p = g(p),
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 16/108
Existence & Uniqueness of Fixed Points
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 17/108
Illustrative Diagram for Fixed Points
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 18/108
Proof of Thm 2.3
(i) If g(a) = a or g(b) = b, we are done. If not, then g(a) > a
and g(b) < b, since g([a, b]) ⊆ [a, b]. Note that the function
h(x) = g(x) − x ∈ C[a, b] and
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 19/108
Example 3: Condition (ii) Is NOT Satisfied (1/2)
Example 3, p. 59
Although the sufficient conditions are NOT satisfied for g(x) = 3−x
on the interval [0, 1], there does exist a unique fixed point of g in
[0, 1].
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 20/108
Example 3: Condition (ii) Is NOT Satisfied (2/2)
g′ (0) = − ln 3 ≈ −1.0986,
thus |g′ (x)| ≮ 1 on (0, 1) and condition (ii) of Thm 2.3 is not
satisfied. Because g is strictly deceasing on [0, 1], its graph must
intersect the graph of y = x at exactly one fixed point p ∈ (0, 1).
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 21/108
Fixed-Point Iteration (固定點迭代)
pn = g(pn−1 ) ∀ n ≥ 1.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 22/108
Illustrative Diagrams
where p = g(p).
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 23/108
Pseudocode of Functional Iteration
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 24/108
An Illustrative Example
f(x) = x3 + 4x2 − 10 = 0
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 25/108
Numerical Results with p0 = 1.5
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 26/108
Some Questions
Under what conditions does the fixed-point iteration (FPI)
pn = g(pn−1 ), n = 1, 2, . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 27/108
Convergence of Functional Iteration
pn = g(pn−1 ) ∀ n ≥ 1,
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 28/108
Proof of Thm 2.4
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 29/108
Error Bounds for Fixed-Point Iteration
Cor 2.5 (固定點迭代的誤差上界)
If g satisfies the hypotheses of Thm 2.4, then we have
(1) |pn − p| ≤ kn max{p0 − a, b − p0 } ∀ n ≥ 0,
n
(2) |pn − p| ≤ k |p − p | ∀ n ≥ 1.
1−k 1 0
pf: Inequality (1) followss immediately from the proof of Thm 2.4.
For m > n ≥ 1, by MVT inductively, we obtain
|pm − pn | ≤ |pm − pm−1 | + |pm−1 − pm−2 | + · · · + |pn+1 − pn |
≤ km−1 |p1 − p0 | + km−2 |p1 − p0 | + · · · + kn |p1 − p0 |
= kn (1 + k + k2 + · · · + km−n−1 ) · |p1 − p0 |.
Hence, by taking m → ∞, we have
(∑
∞ ) kn
|p − pn | = lim |pm − pn | ≤ kn ki |p1 − p0 | = |p1 − p0 |.
m→∞ 1−k
i=0 . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 30/108
Rate of Conv. for Functional Iter.
Remarks
The rate of convergence for the fixed-point iteration depends
kn
on kn or 1−k .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 31/108
The Illustrative Example Revisited
f(x) = x3 + 4x2 − 10 = 0
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 32/108
Illustration
(a) g1 ([1, 2]) * [1, 2] and |g′1 (x)| > 1 for x ∈ [1, 2].
(b) g2 ([1, 2]) * [1, 2] and |g′2 (x)| ≮ 1 for any interval containing
p ≈ 1.36523, since |g′2 (p)| ≈ 3.4.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 33/108
Section 2.3
Newton’s Method and Its Extensions
(牛頓法及其推廣)
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 34/108
Derivation of Newton’s Method
Suppose that f(p) = 0, f ′ (p) ̸= 0 and f ∈ C2 [a, b].
Given an initial approximation p0 ∈ [a, b] with f ′ (p0 ) ̸= 0 s.t.
|p − p0 | is sufficiently small.
By Taylor’s Thm, ∃ ξ(p) between p and p0 s.t.
f ′′ (ξ(p))
0 = f(p) = f(p0 ) + f ′ (p0 )(p − p0 ) + (p − p0 )2 .
2
Since |p − p0 | is sufficiently small, it follows that
f(p0 )
0 ≈ f(p0 ) + f ′ (p0 )(p − p0 ) ⇐⇒ p ≈ p0 − .
f ′ (p0 )
This suggests the procedure of Newton’s method:
f(pn−1 )
pn = pn−1 − ∀ n ≥ 1.
f ′ (pn−1 )
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 35/108
Newton’s Method v.s. Functional Iteration
Observations
Let g be a real-valued function defined by
f(x)
g(x) = x − , x ∈ [a, b],
f ′ (x)
Newton’s method can be viewed as a fixed-point iteration
pn = g(pn−1 ) ∀ n ≥ 1, where |p0 − p| is sufficiently small.
If f(p) = 0, g(p) = p, i.e., p is a fixed-point of g.
g ∈ C[a, b] and its first derivative is given by
f(x)f ′′ (x)
g′ (x) = , x ∈ [a, b].
[f ′ (x)]2
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 36/108
Further Questions
Under what conditions does Newton’s method converge to p?
What is the error bond for Newton’s method?
How to choose a good initial guess p0 ?
What is the rate of convergence for Newton’s method?
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 37/108
Pseudocode of Newton’s Method
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 38/108
Example 1, p. 69
Use (a) fixed-point iteration and (b) Newton’s method to find an
approximate root p of the nonlinear equation
f(x) = cos x − x = 0
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 39/108
Solution (1/3)
pn = g(pn−1 ) = cos(pn−1 ) ∀ n ≥ 1
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 40/108
Solution (2/3)
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 41/108
Solution (3/3)
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 42/108
Convergence Thm for Newton’s Method
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 43/108
Sketch of Proof (1/2)
Since f ′ (p) ̸= 0, ∃ δ1 > 0 s.t.
f ′ (x) ̸= 0 ∀ x ∈ (p − δ1 , p + δ1 ),
and hence
f(x)
g(x) = x −
f ′ (x)
is well-defined on (p − δ1 , p + δ1 ).
Moreover, since its derivative is given by
f(x)f ′′ (x)
g′ (x) = ∀ x ∈ (p − δ1 , p + δ1 ),
[f ′ (x)]2
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 44/108
Sketch of Proof (2/2)
Because g′ is conti. at p, for any k ∈ (0, 1), ∃ 0 < δ < δ1 s.t.
pn = g(pn−1 ) ∀ n ≥ 1
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 45/108
Questions
How to guess a good initial approximation p0 ?
How to estimate δ > 0 derived in Thm 2.6?
What is the order of convergence for Newton’s method?
How to modify Newton’s method if f ′ (x) is difficult to be
evaluated in practice? Use Secant Method!
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 46/108
Derivation of Secant Method (割線法)
for any n ≥ 2.
With above spprox. for the derivative, Neton’s method is
rewritten as
f(pn−1 )(pn−1 − pn−2 )
pn = pn−1 − ∀ n ≥ 2.
f(pn−1 ) − f(pn−2 )
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 47/108
Illustrative Diagram for Secant Method
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 48/108
Key Steps of Secant Method
Given two initial p0 and p1 with q0 ← f(p0 ) and q1 ← f(p1 ), the
followings are performed repeatedly in the Secant method:
1 Compute the new approximation
q1 (p1 − p0 )
p ← p1 − ;
q1 − q0
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 49/108
Pseudocode of Secant Method
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 50/108
Example 2, p. 72
Use the Secant method to find a sol. to
f(x) = cos x − x = 0
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 51/108
Numerical Results for Example 2
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 52/108
Method of False Position (錯位法)
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 53/108
Secant Method v.s. Method of False Position
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 54/108
Key Steps of False Position Method
Given two initial p0 and p1 with q0 ← f(p0 ) and q1 ← f(p1 ), the
followings are performed repeatedly in the False Position method:
1 Compute the new approximation
q1 (p1 − p0 )
p ← p1 − ;
q1 − q0
2 Compute q ← f(p);
3 If q · q1 < 0, update p0 ← p1 and q0 ← q1 ;
4 Update p1 ← p and q1 ← q.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 55/108
Pseudocode for Method of False Position
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 56/108
Example 3, p. 74
Use the method of False Position to find a sol. to
f(x) = cos x − x = 0
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 57/108
Section 2.4
Error Analysis for Iterative Methods
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 58/108
Order of Convergence (收斂階數)
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 59/108
Linear Convergence of Functional Iteration
pn = g(pn−1 ) ∀ n ≥ 1
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 60/108
Proof of Thm 2.8
Thm 2.4 (Fixed-Point Thm) ensures that the sequence pn
converges to the unique fixed point p ∈ [a, b].
For each n ≥ 1, by MVT =⇒ ∃ ξn between pn and p s.t.
|pn+1 − p|
lim = lim |g′ (ξn )| = |g′ (p)| > 0
n→∞ |pn − p| n→∞
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 61/108
Quadratic Convergence of Functional Iteration
pn = g(pn−1 ) ∀ n ≥ 1
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 62/108
Sketch of the Proof
For any k ∈ (0, 1), since lim g′ (x) = g′ (p) = 0, ∃ δ > 0 s.t.
x→p
g′′ (ξn )
pn+1 − p = g(pn ) − g(p) = (pn − p)2 .
2
|pn+1 −p| |g′′ (p)|
Taking | · | and n → ∞ ⇒ lim = 2 . (∵ ξn → p)
n→∞ |pn −p|
2
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 63/108
Quadratic Convergence for Newton’s Method
Corollary (牛頓法的二次收斂性)
Let f(p) = 0, f ′ (p) ̸= 0 and define the real-valued function
f(x)
g(x) = x − ∀ x ∈ I,
f ′ (x)
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 64/108
Multiple Roots (重根)
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 65/108
Thm 2.11 (單根的充分必要條件)
f ∈ C1 [a, b] has a simple zero at p ∈ (a, b) ⇐⇒ f(p) = 0, but
f ′ (p) ̸= 0.
Proof (1/2)
(=⇒) If f has a simple zero at p, then f(x) = (x − p)q(x) for
x ∈ [a, b]\{p}. So, f(p) = 0 and we also see that
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 66/108
Proof (2/2)
(⇐=) Suppose that f ∈ C1 [a, b] with f(p) = 0 and f ′ (p) ̸= 0 for
some p ∈ (a, b).
From Taylor’s Thm =⇒ for any x ∈ [a, b]\{p}, ∃ ξ(x) between
x and p s.t.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 67/108
Thm 2.12 (重根的充分必要條件)
f ∈ Cm [a, b] has a zero of multiplicity m at p ∈ (a, b)
⇐⇒ f(p) = f ′ (p) = f ′′ (p) = · · · f(m−1) (p) = 0, but f(m) (p) ̸= 0.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 68/108
Linear Conv. of Newton’s Method for m = 2
Example 1, p. 83
Consider f(x) = ex − x − 1 = 0 for all x ∈ R.
(a) Show that f has a zrero of multiplicity 2 at p = 0.
(b) Use Newton’s method to compute an approximation to p with
p0 = 1.
Sol:
(a) Since
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 69/108
Numerical Results with p0 = 1
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 70/108
Improvement of Convergence (1/2)
f(x)
Suppose that f ∈ Cm [a, b] and consider µ(x) = .
f ′ (x)
If f has a zero of multiplicity m(≥ 2) at p, then
f(x) = (x − p)m q(x) and hence
(x − p)m q(x)
µ(x) =
m(x − p)m−1 q(x) + (x − p)m q′ (x)
q(x)
= (x − p) ≡ (x − p)q̂(x).
mq(x) + (x − p)q′ (x)
1
Since q(p) ̸= 0, µ(p) = 0 and lim q̂(x) = m ̸= 0. So, µ(x)
x→p
has a simple zero at p.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 71/108
Improvement of Convergence (2/2)
f(pn−1 )f ′ (pn−1 )
pn = pn−1 −
[f ′ (pn−1 )]2 − f(pn−1 )f ′′ (pn−1 )
for all n ≥ 1.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 72/108
Example 2, p. 84
Use the Modified Newton’s method for solving the multiple root
x = 0 of f(x) = ex − x − 1 with p0 = 1.
A system with 10 digits of precision is used in this case.
Both the numerator and the denominator approach 0 ⇒
Loss of Significant Digits!
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 73/108
The Convergence Order of Secant Method
for sufficiently large values of n. Apply this fact to prove the order
of convergence for Secant Method is
√
1+ 5
α= ≈ 1.62. (golden ratio; 黃金比率)
2
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 74/108
Proof of Exercise 14
Let en = pn − p for n ≥ 0. If pn → p of order α, then ∃ λ > 0 s.t.
|pn+1 − p| |en+1 |
lim = lim = λ > 0.
n→∞ |pn − p|α n→∞ |en |α
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 75/108
Remarks
From Exercise 14(a) of Section 2.5, p. 91, we see that if a
sequence pn → p of order α for α > 1, then it is superlinearly
convergent.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 76/108
Section 2.5
Accelerating Convergence
(加速收斂性)
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 77/108
Acceleration of Linear Convergence
Objective
We try to develop some accelerating techniques for a linearly
convergent sequence {pn }∞
n=0 generated by the fixed-point
iteration.
1 Aitken’s ∆2 method (more rapid convergence)
2 Steffensen’s method (quadratic convergence)
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 78/108
The Difference Operator ∆
∆pn = pm+1 − pn ∀ n ≥ 0.
∆k pn = ∆(∆k−1 pn ) ∀ k ≥ 2.
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 79/108
Derivation of Aitken’s ∆2 Method (1/2)
if n is sufficiently large.
Then (pn+1 − p)2 ≈ (pn+2 − p)(pn − p)
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 80/108
Derivation of Aitken’s ∆2 Method (2/2)
pn+2 pn − p2n+1
⇐⇒ p ≈
pn+2 − 2pn+1 + pn
(pn pn+2 −2pn pn+1 + p2n ) − (p2n+1 −2pn+1 pn + p2n )
=
pn+2 − 2pn+1 + pn
(pn+1 − pn )2 (∆pn )2
⇐⇒ p ≈ pn − = pn − for n ≥ 0.
pn+2 − 2pn+1 + pn ∆2 pn
Aitken’s ∆2 Method:
(∆pn )2
p̂n = pn − ≡ {∆2 }(pn ) ∀ n ≥ 0,
∆2 pn
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 81/108
Convergence Behavior for Aitken’s Method
p̂n − p
lim = 0.
n→∞ pn − p
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 82/108
The Steffensen’s Method
Steffensen’s Sequences
Aitken’s ∆2 method constructs the terms in order:
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 83/108
Pseudocode of Steffensen’s Method
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 84/108
Example
Use the Steffensen’s method to accelerate the fixed-point iteration
pn = g(pn−1 ), n ≥ 1, where
10 1/2
g(x) = g4 (x) = ( ) ,
4+x
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 85/108
Convergence Behavior for Steffensen’s Method
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 86/108
Section 2.6
Zeros of Polynomials and
Müller’s Method
(多項式的零根與 Müller 法)
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 87/108
Thm 2.16 (Fundamental Theorem of Algebra; FTA)
Every poly. of degree n ≥ 1 with real or complex coefficients
Two Questions
Q1 For any x0 , how to evaluate P(x0 ) efficiently and accurately in
practical computation?
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 88/108
Two Corollaries of FTA
P(xi ) = Q(xi ), i = 1, 2, . . . , k,
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 89/108
A Nested Technique for Evaluating P(x0 )
bk = ak + bk+1 x0 , k = n − 1, n − 2, . . . , 1, 0.
We then have
(1) b0 = P(x0 ) can be evaluated in a nested manner, i.e.,
P(x) = (x − x0 )Q(x) + b0 .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 90/108
Proof of Thm 2.19
It suffices to prove Part (2), since Part (1) is easily seen from
the construction of bk for k = n, n − 1, . . . , 1, 0.
For the Part (2), we see that
(x − x0 )Q(x) + b0
=(x − x0 )(bn xn−1 + bn−1 xn−2 + · · · b2 x + b1 ) + b0
=bn xn + bn−1 xn−1 + · · · b2 x2 + b1 x
− bn x0 xn−1 − bn−1 x0 xn−2 − · · · − b2 x0 x − b1 x0 + b0
=bn xn + (bn−1 − bn x0 )xn−1 + · · · + (b1 − b2 x0 )x + (b0 − b1 x0 )
=an xn + an−1 xm−1 + · · · + a1 x + a0
=P(x), since an = bn and ak = bk − bk+1 x0 , k = n − 1, . . . , 1, 0.
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 91/108
Example 2, p. 93
Use Horner’s Method to evaluate P(x) = 2x4 − 3x2 + 3x − 4 at
x0 = −2. The actual value is P(x0 ) = P(−2) = 10.
x0 = −2 a4 = 2 a3 = 0 a2 = −3 a1 = 3 a0 = −4
b4 x0 = −4 b3 x0 = 8 b2 x0 = −10 b1 x0 = 14
b4 = 2 b3 = −4 b2 = 5 b1 = −7 b0 = 10
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 92/108
Newton’s Method for Polynomials
P(x) = (x − x0 )Q(x) + b0 .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 93/108
Pseudocode of Horner’s Method
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 94/108
Operation Counts (運算量)
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 95/108
Example 3, p. 94
Find an approximation to a zero of
−2 2 0 −3 3 −4
−4 8 −10 14
−2 2 −4 5 −7 10 = P(x0 )
−4 16 −42
2 −8 21 −49 = Q(x0 )
P(x0 )
=⇒ x1 = x0 − Q(x0 ) = −2 − 10
−49 ≈ −1.796.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 96/108
Sol. of Example 3 (Conti’d)
−1.796 2 0 −3 3 −4
−3.592 6.451 −6.197 5.742
−1.796 2 −3.592 3.451 −3.197 1.742 = P(x1 )
−3.592 12.902 −29.368
2 −7.184 16.353 −32.565 = Q(x1 )
P(x1 )
=⇒ x2 = x1 − Q(x 1)
= −1.796 − −32.565
1.742
≈ −1.7425.
Similarly, x3 ≈ −1.73897 and an actual zero to 5 decimal places
is −1.73896.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 97/108
Complex Zeros of P(x)
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 98/108
Secant Method v.s. Müller’s Method
Basic Ideas
Secant Method: given p0 and p1 ⇒ p2 is the x-intercept of
the line through (p0 , f(p0 )) and (p1 , f(p1 )).
Müller’s Method: given p0 , p1 and p2 ⇒ p3 is the
x-intercept of the parabola through (p0 , f(p0 )), (p1 , f(p1 ))
and (p2 , f(p2 )).
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 99/108
Derivation of Müller’s Method (1/4)
passing through (p0 , f(p0 )), (p1 , f(p1 )) and (p2 , f(p2 )).
So, we obtain the following linear system
f(p2 ) = a · 0 + b · 0 + c,
f(p0 ) = a(p0 − p2 )2 + b(p0 − p2 ) + c,
f(p1 ) = a(p1 − p2 )2 + b(p1 − p2 ) + c
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 100/108
Derivation of Müller’s Method (2/4)
c = f(p2 ), (2)
(p0 − p2 )2 [f(p − f(p2 )] − (p1 − p2
1) )2 [f(p 0) − f(p2 )]
b= ,
(p0 − p2 )(p1 − p2 )(p0 − p1 )
(3)
(p1 − p2 )[f(p0 ) − f(p2 )] − (p0 − p2 )[f(p1 ) − f(p2 )]
a= . (4)
(p0 − p2 )(p1 − p2 )(p0 − p1 )
h1 = p1 − −p0 , h2 = p2 − p1 ,
δ1 = [f(p1 ) − f(p0 )]/h1 , δ2 = [f(p2 ) − f(p1 )]/h2 . (5)
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 101/108
Derivation of Müller’s Method (3/4)
and
(h1 + h2 )2 (−h2 δ2 ) − h22 (−h1 δ1 − h2 δ2 )
b=
−(h1 + h2 )(−h2 )(−h1 )
(h1 + h2 )h1 h2 δ2 + h22 h1 (δ2 − δ1 )
= = δ2 + h2 a.
(h1 + h2 )h2 h1
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 102/108
Derivation of Müller’s Method (4/4)
Repeat above procedure with the points (p1 , f(p1 )), (p2 , f(p2 ))
and (p3 , f(p3 )) to obtain the next approx. p4 to a zero of the
nonlinear equation f(x) = 0.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 103/108
Pseudocode of Müller’s Method
To find a sol. to f(x) = 0 given 3 approx. p0 , p1 and p2 .
Algorithm 2.8: Müller’s Method
INPUT initial p0 , p1 , p2 ; tol. TOLL; max. no. iter. N0 .
OUTPUT approx. sol. p.
Step 1 Set i = 3.
Step 2 While i ≤ N0 do Steps 3–7.
Step 3 Set h1 = p1 − p0 ; δ1 = [f(p1 ) − f(p0 )]/h1 ;
h2 = p2 − p1 ; δ2 = [f(p2 ) − f(p1 )]/h2 ;
√2 − δ1 )/(h1 + h2 ); b = δ2 + h2 a; c = f(p2 );
a = (δ
D = b2 − 4ac. (May require complex arithmetic.)
Step 4 If |b − D| < |b + D| then set E = b + D;
Else set E = b − D.
Step 5 Set h = −2c/E; p = p2 + h.
Step 6 If |h| < TOL then OUTPUT(p); STOP.
Step 7 Set p0 = p1 ; p1 = p2 ; p2 = p; i = i + 1.
Step 8 OUTPUT(‘Method failed after N0 iterations’); STOP. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 104/108
An Illustrative Example, p. 98
Use Müller’s Method to find all zeros of the 4th-degree polynomial
f(x) = x4 − 3x3 + x2 + x + 1
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 105/108
Numerical Results (1/2)
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 106/108
Numerical Results (2/2)
Two distinct real roots are computed by the Müller’s Method with
different initial points.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 107/108
Thank you for your attention!
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Hung-Yuan Fan (范洪源), Dep. of Math., NTNU, Taiwan Chap . 2, Numerical Analysis (I) 108/108