Numerical Analysis Chapter 2
Numerical Analysis Chapter 2
Numerical Analysis
Chapter 2: Numerical Solutions of Nonlinear Equations of One
Variable
Xiaoming He
Department of Mathematics & Statistics
Missouri University of Science & Technology
1 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Outline
1 Introduction
2 Bisection method
4 Newton’s method
5 Secant method
6 Other topics
2 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Outline
1 Introduction
2 Bisection method
4 Newton’s method
5 Secant method
6 Other topics
3 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Solve f (x) = 0 for a given function f (x). That is, find the
roots of f (x).
4 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Solve f (x) = 0 for a given function f (x). That is, find the
roots of f (x).
Why do we start from this problem?
4 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Solve f (x) = 0 for a given function f (x). That is, find the
roots of f (x).
Why do we start from this problem?
How to guarantee that the given problem has a unique
solution on a specified domain?
4 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Solve f (x) = 0 for a given function f (x). That is, find the
roots of f (x).
Why do we start from this problem?
How to guarantee that the given problem has a unique
solution on a specified domain?
How to construct a convergent numerical method?
4 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Solve f (x) = 0 for a given function f (x). That is, find the
roots of f (x).
Why do we start from this problem?
How to guarantee that the given problem has a unique
solution on a specified domain?
How to construct a convergent numerical method?
How to obtain a faster convergence?
4 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Solve f (x) = 0 for a given function f (x). That is, find the
roots of f (x).
Why do we start from this problem?
How to guarantee that the given problem has a unique
solution on a specified domain?
How to construct a convergent numerical method?
How to obtain a faster convergence?
What if there are more than one roots?
..........
4 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Figure???
6 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Corollary (I)
If f ∈ C [a, b] and f (a)f (b) < 0, then there is a z ∈ [a, b] such that
f (z) = 0.
7 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Corollary (I)
If f ∈ C [a, b] and f (a)f (b) < 0, then there is a z ∈ [a, b] such that
f (z) = 0.
Proof.
Consider to apply the intermediate value theorem.
f (a)f (b) < 0 ⇒ m = min f (x) < 0 and M = max f (x) > 0.
a≤x≤b a≤x≤b
Figure???
7 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Corollary (II)
If f ∈ C [a, b], f is monotonic on [a, b] and f (a)f (b) < 0, then
there is a unique z ∈ [a, b] such that f (z) = 0.
Figure???
Remark
f 0 (x) can provide the monotonicity of f (x) on certain
intervals.
If there are more than one solutions in [a, b], then the
numerical methods may or may not converge!
8 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Outline
1 Introduction
2 Bisection method
4 Newton’s method
5 Secant method
6 Other topics
9 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
10 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
10 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
10 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
10 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
10 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
11 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
12 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
12 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
12 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
13 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
13 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
13 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
14 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
14 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
15 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
16 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
17 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
17 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
b−a
|xk − z| ≤ . (1)
2k+1
18 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
b−a
|xk − z| ≤ . (1)
2k+1
Proof.
bk − ak
z ∈ [ak , bk ] and ⇒ |xk − z| ≤ .
2
b−a
Then combine this with bk − ak = 2k
, we finish the proof.
18 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
b−a
|xk − z| ≤ . (1)
2k+1
Proof.
bk − ak
z ∈ [ak , bk ] and ⇒ |xk − z| ≤ .
2
b−a
Then combine this with bk − ak = 2k
, we finish the proof.
Remark
If f (x) ≥ 0 and f (z) = 0, then the bisection method is not valid
since f (a)f (b) < 0 requires either f (a) < 0 or f (b) < 0.
18 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
19 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
19 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Outline
1 Introduction
2 Bisection method
4 Newton’s method
5 Secant method
6 Other topics
20 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
21 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
21 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
21 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
21 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
22 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Implementation issues
23 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
1 Initial preparation:
24 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
1 Initial preparation:
(1) Pick up the initial point x0 .
(2) Set the iteration counter k = 0.
(3) Specify the tolerances ε, εf , and the maximum number M
of iteration steps.
24 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
1 Initial preparation:
(1) Pick up the initial point x0 .
(2) Set the iteration counter k = 0.
(3) Specify the tolerances ε, εf , and the maximum number M
of iteration steps.
2 First step: x1 = g (x0 ).
24 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
1 Initial preparation:
(1) Pick up the initial point x0 .
(2) Set the iteration counter k = 0.
(3) Specify the tolerances ε, εf , and the maximum number M
of iteration steps.
2 First step: x1 = g (x0 ).
3 While |xk+1 − xk | ≥ ε and k + 1 ≤ M, repeat the following
procedure in a loop:
(1) k ← k + 1.
(2) xk+1 = g (xk ).
(3) If |g (xk+1 ) − xk+1 | < εf , then stop the loop.
24 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
1 Initial preparation:
(1) Pick up the initial point x0 .
(2) Set the iteration counter k = 0.
(3) Specify the tolerances ε, εf , and the maximum number M
of iteration steps.
2 First step: x1 = g (x0 ).
3 While |xk+1 − xk | ≥ ε and k + 1 ≤ M, repeat the following
procedure in a loop:
(1) k ← k + 1.
(2) xk+1 = g (xk ).
(3) If |g (xk+1 ) − xk+1 | < εf , then stop the loop.
4 Output the final xk+1 from the above loop as the the
numerical solution.
24 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
25 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
25 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
26 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
27 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
27 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
27 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
27 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
28 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
29 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Diverge sometimes!
29 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
30 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
31 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Try other initial values for the case with g (x) = e x + 2x?
31 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Try other initial values for the case with g (x) = e x + 2x?
31 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
32 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
32 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
33 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Lemma (I)
If g satisfies a Lipschitz condition on G , then g is continuous on G .
Proof.
Inequality (2) directly gives the continuity based on its definition in
the calculus book.
33 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
34 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Lemma (II)
Cauchy sequences in R and C must converge to a point in R or C.
34 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Lemma (II)
Cauchy sequences in R and C must converge to a point in R or C.
34 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Lk
|xk − z| ≤ |x1 − x0 | (3)
1−L
L
|xk − z| ≤ |xk − xk−1 | (4)
1−L
35 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Lk
|xk − z| ≤ |x1 − x0 | (3)
1−L
L
|xk − z| ≤ |xk − xk−1 | (4)
1−L
Remark
This theorem answers Questions 1, 2, and 3.
35 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
36 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
36 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
36 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
36 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Continued proof:
Similarly, for any n > k,
n−k
X
|xn − xk | = |xk+i − xk+i−1 |
i=1
n−k
X
≤ Li |xk − xk−1 |
i=1
L(1 − Ln−k )
= |xk − xk−1 | . (7)
1−L
37 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Continued proof:
Similarly, for any n > k,
n−k
X
|xn − xk | = |xk+i − xk+i−1 |
i=1
n−k
X
≤ Li |xk − xk−1 |
i=1
L(1 − Ln−k )
= |xk − xk−1 | . (7)
1−L
Since g is a contraction on G , then 0 ≤ L < 1, which implies
1 − Lj ≤ 1.
37 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Continued proof:
So
L
|xn − xk | ≤ |xk − xk−1 |
1−L
Lk
≤ |x1 − x0 | . (8)
1−L
38 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Continued proof:
So
L
|xn − xk | ≤ |xk − xk−1 |
1−L
Lk
≤ |x1 − x0 | . (8)
1−L
38 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Continued proof:
So
L
|xn − xk | ≤ |xk − xk−1 |
1−L
Lk
≤ |x1 − x0 | . (8)
1−L
38 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Continued proof:
Actually, we can obtain the N as follows.
Lk ε(1 − L)
1−L |x1 − x0 | ≤ ε ⇒ Lk ≤
|x1 − x0 |
ε(1−L) ε(1 − L)
⇒ ln(Lk ) ≤ ln( |x1 −x0 |
) ⇒ k ln(L) ≤ ln( )
|x1 − x0 |
ε(1−L)
ln( )
|x1 −x0 |
⇒ k≥ ln(L) . (9)
39 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
40 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
40 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
40 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
40 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
41 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
41 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
41 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Remark
It may be difficult to find G such that g maps G to itself.
42 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Remark
It may be difficult to find G such that g maps G to itself.
42 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Here C 1 [a, b] denotes the space of the functions which are first
differentiable.
43 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
44 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Proof.
By the Mean Value Theorem, we have
45 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
45 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
2 x4
Solution: First, g 0 (x) = − x2 + 24 .
45 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
2 4
Solution: First, g 0 (x) = − x2 + 24
x
.
2 1 4
Since − 21 ≤ −x 2 ≤ 0 and 0 ≤ x 4 ≤ on G = [− 12 , 12 ],
2
2 x4
we get − 81 ≤ − x2 + 24 1
≤ 384 .
45 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
2 4
Solution: First, g 0 (x) = − x2 + 24
x
.
2 1 4
Since − 21 ≤ −x 2 ≤ 0 and 0 ≤ x 4 ≤ on G = [− 12 , 12 ],
2
2 x4
we get − 81 ≤ − x2 + 24 1
≤ 384 .
2 x4
Then |g 0 (x)| = − x2 + 24 ≤ 18 . Thus L = 81 .
45 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Lemma (IV)
Suppose that g is continuously differentiable and that
|g 0 (x)| ≤ L < 1 for x ∈ G . Then g is a contraction on G .
46 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Lemma (IV)
Suppose that g is continuously differentiable and that
|g 0 (x)| ≤ L < 1 for x ∈ G . Then g is a contraction on G .
Proof.
Consider x ∈ G and x̃ ∈ G . Without loss of generality, assume
that x < x̃. Then
Z x̃ Z x̃
0
|g (x) − g (x̃)| = g (s) ds ≤ g 0 (s) ds
x x
≤ L |x − x̃| . (15)
46 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
47 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Proof.
Consider x ∈ G . Then |x − c| ≤ ρ. Hence
Theorem (III)
Assume that z is a solution of x = g (x), g 0 (x) is continuous in an
interval about z, and |g 0 (z)| < 1. Then g is a contraction in a
sufficiently small interval about z, and g maps this interval into
itself. Thus, provided x0 is picked sufficiently close to z, the
iterations will converge.
48 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Theorem (III)
Assume that z is a solution of x = g (x), g 0 (x) is continuous in an
interval about z, and |g 0 (z)| < 1. Then g is a contraction in a
sufficiently small interval about z, and g maps this interval into
itself. Thus, provided x0 is picked sufficiently close to z, the
iterations will converge.
Remark
The above lemmas and theorem provide more details about
the conditions for the convergence than the Contraction
Mapping Theorem.
48 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Theorem (III)
Assume that z is a solution of x = g (x), g 0 (x) is continuous in an
interval about z, and |g 0 (z)| < 1. Then g is a contraction in a
sufficiently small interval about z, and g maps this interval into
itself. Thus, provided x0 is picked sufficiently close to z, the
iterations will converge.
Remark
The above lemmas and theorem provide more details about
the conditions for the convergence than the Contraction
Mapping Theorem.
But they are sufficient conditions, not necessary conditions!
48 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Theorem (III)
Assume that z is a solution of x = g (x), g 0 (x) is continuous in an
interval about z, and |g 0 (z)| < 1. Then g is a contraction in a
sufficiently small interval about z, and g maps this interval into
itself. Thus, provided x0 is picked sufficiently close to z, the
iterations will converge.
Remark
The above lemmas and theorem provide more details about
the conditions for the convergence than the Contraction
Mapping Theorem.
But they are sufficient conditions, not necessary conditions!
Any more details about “sufficiently small” and “sufficiently
close”? (Independent study problem)
48 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Proof.
Since |g 0 (z)| < 1, there exists a L such that |g 0 (z)| < L < 1.
49 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Proof.
Since |g 0 (z)| < 1, there exists a L such that |g 0 (z)| < L < 1.
Since g 0 (x) is continuous in an interval about z, there exists a
sufficiently small interval I = [z − ε, z + ε] such that
maxx∈I |g 0 (x)| ≤ L < 1.
49 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Proof.
Since |g 0 (z)| < 1, there exists a L such that |g 0 (z)| < L < 1.
Since g 0 (x) is continuous in an interval about z, there exists a
sufficiently small interval I = [z − ε, z + ε] such that
maxx∈I |g 0 (x)| ≤ L < 1.
Then by Lemma (IV), g is a contraction on I .
49 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Proof.
Since |g 0 (z)| < 1, there exists a L such that |g 0 (z)| < L < 1.
Since g 0 (x) is continuous in an interval about z, there exists a
sufficiently small interval I = [z − ε, z + ε] such that
maxx∈I |g 0 (x)| ≤ L < 1.
Then by Lemma (IV), g is a contraction on I .
Also, by Lemma (III) for x ∈ I ,
49 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Proof.
Since |g 0 (z)| < 1, there exists a L such that |g 0 (z)| < L < 1.
Since g 0 (x) is continuous in an interval about z, there exists a
sufficiently small interval I = [z − ε, z + ε] such that
maxx∈I |g 0 (x)| ≤ L < 1.
Then by Lemma (IV), g is a contraction on I .
Also, by Lemma (III) for x ∈ I ,
49 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
50 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
50 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
50 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
50 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
50 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
50 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
51 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
51 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
51 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
51 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
51 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
51 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
52 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
52 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
52 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Remark
Since we can get |xk+1 − z| = |g (xk ) − g (z)| ≤ L |xk − z| and
L < 1 from the Contract Mapping Theory, the fixed point method
has at least linear rate of convergence. But is it possible to have a
higher rate of convergence?
52 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
where
n
X 1 (k)
Pn (x) = f (x0 )(x − x0 )k
k!
k=0
1
= f (x0 ) + f 0 (x0 )(x − x0 ) + f 00 (x0 )(x − x0 )2 + · · ·
2
1 (n)
+ f (x0 )(x − x0 )n , (20)
n!
53 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
1
Rn = f (n+1) (ξ)(x − x0 )n+1 (21)
(n + 1)!
for some ξ ∈ [x0 , x] (Lagrange form of the remainder) ,
or
1 x (n+1)
Z
Rn = f (s)(x − s)n ds (22)
n! x0
for some ξ ∈ [x0 , x] (Integral form of the remainder) .
54 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Theorem (V)
Assume that the iterations xk+1 = g (xk ) converge to a fixed point
z and g ∈ C q (G ) where G contains z. Furthermore, assume that q
is the first positive integer for which g (q) (z) 6= 0 and if q = 1 then
g 0 (z) < 1. Then the sequence {xk } converges to z with order q.
55 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Theorem (V)
Assume that the iterations xk+1 = g (xk ) converge to a fixed point
z and g ∈ C q (G ) where G contains z. Furthermore, assume that q
is the first positive integer for which g (q) (z) 6= 0 and if q = 1 then
g 0 (z) < 1. Then the sequence {xk } converges to z with order q.
Remark
Usually g 0 (z) 6= 0, hence q = 1.
55 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
|xk+1 − z| = |g (xk ) − z|
q
X 1 (k)
= g (z)(x − z)k − z
k!
k=0
= g (z) + g 0 (z)(xk − z) + · · ·
1
+ g (q−1) (ξk )(xk − z)(q−1)
(q − 1)!
1
+ g (q) (ξk )(xk − z)q − z
q!
1 (q)
= g (ξk ) |xk − z|q . (23)
q!
56 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Continued proof:
Hence
1 (q)
|xk+1 − z| ≤ max g (ξk ) |xk − z|q
ξk ∈G q!
= C |xk − z|q . (24)
57 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Continued proof:
Hence
1 (q)
|xk+1 − z| ≤ max g (ξk ) |xk − z|q
ξk ∈G q!
= C |xk − z|q . (24)
57 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Outline
1 Introduction
2 Bisection method
4 Newton’s method
5 Secant method
6 Other topics
58 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
59 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
59 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
59 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
59 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Taylor’s expansion:
f (x) = f (x0 ) + f 0 (x0 )(x − x0 ) + 21 f 00 (ξ)(x − x0 )2
60 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Taylor’s expansion:
f (x) = f (x0 ) + f 0 (x0 )(x − x0 ) + 21 f 00 (ξ)(x − x0 )2
Then the linearization is f (x) ≈ p(x) = f (x0 ) + f 0 (x0 )(x − x0 ).
60 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Taylor’s expansion:
f (x) = f (x0 ) + f 0 (x0 )(x − x0 ) + 21 f 00 (ξ)(x − x0 )2
Then the linearization is f (x) ≈ p(x) = f (x0 ) + f 0 (x0 )(x − x0 ).
Replace f (x) by p(x) = f (x0 ) + f 0 (x0 )(x − x0 ) in f (x) = 0.
Then f (x0 ) + f 0 (x0 )(x − x0 ) = 0.
60 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Taylor’s expansion:
f (x) = f (x0 ) + f 0 (x0 )(x − x0 ) + 21 f 00 (ξ)(x − x0 )2
Then the linearization is f (x) ≈ p(x) = f (x0 ) + f 0 (x0 )(x − x0 ).
Replace f (x) by p(x) = f (x0 ) + f 0 (x0 )(x − x0 ) in f (x) = 0.
Then f (x0 ) + f 0 (x0 )(x − x0 ) = 0.
f (x0 )
Hence x = x0 − f 0 (x0 ) .
60 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Taylor’s expansion:
f (x) = f (x0 ) + f 0 (x0 )(x − x0 ) + 21 f 00 (ξ)(x − x0 )2
Then the linearization is f (x) ≈ p(x) = f (x0 ) + f 0 (x0 )(x − x0 ).
Replace f (x) by p(x) = f (x0 ) + f 0 (x0 )(x − x0 ) in f (x) = 0.
Then f (x0 ) + f 0 (x0 )(x − x0 ) = 0.
f (x0 )
Hence x = x0 − f 0 (x0 ) .
60 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Taylor’s expansion:
f (x) = f (x0 ) + f 0 (x0 )(x − x0 ) + 21 f 00 (ξ)(x − x0 )2
Then the linearization is f (x) ≈ p(x) = f (x0 ) + f 0 (x0 )(x − x0 ).
Replace f (x) by p(x) = f (x0 ) + f 0 (x0 )(x − x0 ) in f (x) = 0.
Then f (x0 ) + f 0 (x0 )(x − x0 ) = 0.
f (x0 )
Hence x = x0 − f 0 (x0 ) .
60 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Taylor’s expansion:
f (x) = f (x0 ) + f 0 (x0 )(x − x0 ) + 21 f 00 (ξ)(x − x0 )2
Then the linearization is f (x) ≈ p(x) = f (x0 ) + f 0 (x0 )(x − x0 ).
Replace f (x) by p(x) = f (x0 ) + f 0 (x0 )(x − x0 ) in f (x) = 0.
Then f (x0 ) + f 0 (x0 )(x − x0 ) = 0.
f (x0 )
Hence x = x0 − f 0 (x0 ) .
60 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
61 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
61 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
61 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
61 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
62 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
63 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
63 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
63 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Implementation issues
64 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
1 Initial preparation:
(1) Pick up the initial point x0 .
(2) Set the iteration counter k = 0.
(3) Specify the tolerances ε, εf , εf 0 , and the maximum number
M of iteration steps.
65 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
1 Initial preparation:
(1) Pick up the initial point x0 .
(2) Set the iteration counter k = 0.
(3) Specify the tolerances ε, εf , εf 0 , and the maximum number
M of iteration steps.
f (x0 )
2 First step: x1 = x0 − f 0 (x0 ) .
65 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
1 Initial preparation:
(1) Pick up the initial point x0 .
(2) Set the iteration counter k = 0.
(3) Specify the tolerances ε, εf , εf 0 , and the maximum number
M of iteration steps.
f (x0 )
2 First step: x1 = x0 − f 0 (x0 ) .
3 While |xk+1 − xk | ≥ ε and k + 1 ≤ M, repeat the following
procedure in a loop:
(1) k ← k + 1.
(2) xk+1 = xk − ff0(x(xkk)) .
(3) If |f (xk+1 )| < εf or |f 0 (xk+1 )| < εf 0 , then stop the loop.
65 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
1 Initial preparation:
(1) Pick up the initial point x0 .
(2) Set the iteration counter k = 0.
(3) Specify the tolerances ε, εf , εf 0 , and the maximum number
M of iteration steps.
f (x0 )
2 First step: x1 = x0 − f 0 (x0 ) .
3 While |xk+1 − xk | ≥ ε and k + 1 ≤ M, repeat the following
procedure in a loop:
(1) k ← k + 1.
(2) xk+1 = xk − ff0(x(xkk)) .
(3) If |f (xk+1 )| < εf or |f 0 (xk+1 )| < εf 0 , then stop the loop.
4 Output the final xk+1 from the above loop as the the
numerical solution.
65 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
66 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Let’s just modify the old code for this new algorithm together!
66 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
67 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
68 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Theorem (I)
Let G ⊂ R. Assume that f ∈ C 2 (G ) and f satisfies |f 0 (x)| ≥ m
and |f 00 (x)| ≤ M for x ∈ G where m, M > 0. Then for each zero
z ∈ G , there is a neighborhood Kρ (z) = [z − ρ, z + ρ] ⊆ G such
that z is the only zero of f in Kρ (z), and for each x0 ∈ Kρ (z), the
approximations xk (k = 1, 2 · · · ) remain in Kρ (z) and converge to
z with the following error estimates:
2m 2k M
(a) |xk − z| ≤ q , where q = |x0 − z| , (26)
M 2m
1 M
(b) |xk − z| ≤ f (xk ) ≤ |xk − xk−1 |2 , (27)
m 2m
M
(c) |xk+1 − z| ≤ |xk − z|2 . (28)
2m
69 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Proof.
See pages 50-53 of the textbook. (Independent study
problem)
70 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Theorem (II)
Let G = [a, b]. Assume that f ∈ C 2 (G ), f (a)f (b) < 0, and f 0 (x)
is monotonic and never zero on [a, b]. Let c denote the value such
that f (c) = min |f 0 (a)| , |f 0 (b)|. If fb−a
(c)
≤ f 0 (c), then there exists a
unique zero z of f (x), and for any x0 ∈ [a, b], the approximations
xk (k = 1, 2 · · · ) converge to z.
71 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Theorem (II)
Let G = [a, b]. Assume that f ∈ C 2 (G ), f (a)f (b) < 0, and f 0 (x)
is monotonic and never zero on [a, b]. Let c denote the value such
that f (c) = min |f 0 (a)| , |f 0 (b)|. If fb−a
(c)
≤ f 0 (c), then there exists a
unique zero z of f (x), and for any x0 ∈ [a, b], the approximations
xk (k = 1, 2 · · · ) converge to z.
Theorem (III)
Let G = [a, b]. Assume that f ∈ C 2 (G ), f (a)f (b) < 0, and f 0 (x)
is monotonic and never zero on [a, b]. If x0 can be chosen such
that f (x0 )f 00 (x0 ) < 0, then there exists a unique zero z of f (x),
and for any x0 ∈ [a, b], the approximations xk (k = 1, 2 · · · )
converge to z.
71 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Outline
1 Introduction
2 Bisection method
4 Newton’s method
5 Secant method
6 Other topics
72 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
73 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
73 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
73 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
73 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
74 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
74 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
74 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
75 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Implementation issues
76 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
1 Initial preparation:
(1) Pick up the initial points x0 and x1 .
(2) Set the iteration counter k = 0.
(3) Specify the tolerances ε, εf , and the maximum number M
of iteration steps.
77 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
1 Initial preparation:
(1) Pick up the initial points x0 and x1 .
(2) Set the iteration counter k = 0.
(3) Specify the tolerances ε, εf , and the maximum number M
of iteration steps.
2 While |xk+1 − xk | ≥ ε and k + 1 ≤ M, repeat the following
procedure in a loop:
(1) k ← k + 1.
k −xk−1 )
(2) xk+1 = xk − ff(x(xkk)(x
)−f (xk−1 ) .
(3) If |f (xk+1 )| < εf , then stop the loop.
77 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
1 Initial preparation:
(1) Pick up the initial points x0 and x1 .
(2) Set the iteration counter k = 0.
(3) Specify the tolerances ε, εf , and the maximum number M
of iteration steps.
2 While |xk+1 − xk | ≥ ε and k + 1 ≤ M, repeat the following
procedure in a loop:
(1) k ← k + 1.
k −xk−1 )
(2) xk+1 = xk − ff(x(xkk)(x
)−f (xk−1 ) .
(3) If |f (xk+1 )| < εf , then stop the loop.
3 Output the final xk+1 from the above loop as the the
numerical solution.
77 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
78 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
78 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
79 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
79 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Theorem (I)
Let G be a subset of R containing a zero z of f (x) . Assume that
f ∈ C 2 (G ) and there exists an M ≥ 0 such that
maxx∈G |f 00 (x)|
M = . (29)
2 maxx∈G |f 0 (x)|
80 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Proof.
See pages 60-62 of the textbook. (Independent study
problem)
81 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Theorem (II)
Let G = [a, b]. Assume that f ∈ C 2 (G ), f (a)f (b) < 0, and f 0 (x)
is monotonic and never zero on [a, b]. Assume x0 is chosen to be
one of a and b and x1 is chosen to be the other one of a and b. If
f (x0 )f 00 (x0 ) < 0, then there exists a unique zero z of f (x), and for
any x0 ∈ [a, b], the approximations xk (k = 1, 2 · · · ) converge to z
with a linear rate.
82 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Outline
1 Introduction
2 Bisection method
4 Newton’s method
5 Secant method
6 Other topics
83 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Topics
84 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Topics
84 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Topics
84 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Topics
84 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Topics
85 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Topics
85 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Topics
85 / 85
Introduction Bisection method The fixed point method Newton’s method Secant method Other topics
Topics
85 / 85