Bisection method
Newtons method
Secant method
Other topics
Weiwei Hu
Department of Mathematics
University of Southern Califronia
1 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
Outline
Introduction
Bisection method
Newtons method
Secant method
Other topics
2 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
Outline
Introduction
Bisection method
Newtons method
Secant method
Other topics
3 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
Goal
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
Newtons method
Secant method
Other topics
5 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
6 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
Corollary (I)
If f C [a, b] and f (a)f (b) < 0, then there is a (a, b) such
that f () = 0.
7 / 85
Introduction
Bisection method
Newtons 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 (a, b) such that f () = 0.
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
Newtons method
Secant method
Other topics
Outline
Introduction
Bisection method
Newtons method
Secant method
Other topics
9 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
z [a, a+b
2 );
z ( a+b
2 , b];
z = a+b
2 .
10 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
z [a, a+b
2 );
z ( a+b
2 , b];
z = a+b
2 .
10 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
z [a, a+b
2 );
z ( a+b
2 , b];
z = a+b
2 .
10 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
z [a, a+b
2 );
z ( a+b
2 , b];
z = a+b
2 .
Introduction
Bisection method
Newtons method
Secant method
Other topics
Find a and b such that f (a)f (b) < 0 and f (x) is monotonic on [a, b].
Otherwise, stop.
Initial preparation:
While
bk ak
2
k
(1) xk = ak +b
2 .
(2) If f (xk ) = 0, then
stop the loop;
elseif f (ak )f (xk ) < 0, then
ak+1 = ak and bk+1 = xk ;
elseIf f (xk )f (bk ) < 0, then
ak+1 = xk and bk+1 = bk .
end
(3) k k + 1.
Introduction
Bisection method
Newtons method
Secant method
Other topics
12 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
Stop Criteria
|f (xk )| is almost 0;
13 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
14 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
ak
1
1
0.75
0.625
0.625
0.59375
0.578125
bk
0
0.5
0.5
0.5
0.5625
0.5625
0.5625
xk
0.5
0.75
0.625
0.5625
0.59375
0.578125
0.5703125
Introduction
Bisection method
Newtons method
Secant method
Other topics
Theorem (I)
Assume z is the only solution of f (x) = 0 on [a, b]. If f is a
continuous function on [a, b] and f (a)f (b) < 0, then
|xk z|
ba
.
2k+1
Proof.
z [ak , bk ] and |xk z|
Then combine this with bk ak =
ba
,
2k
b k ak
.
2
16 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
ba
20
104 k+1 104 .
k+1
2
2
Then
2k 104 k
ln104
13.2877.
ln2
Introduction
Bisection method
Newtons method
Secant method
Other topics
Remark
The bisection method is limited since it is not valid for many cases.
For example, it is not valid for complex solutions of f (x) = 0.
Furthermore, if f (x) 0 or f (x) 0, then the bisection method is
not valid since f (a)f (b) < 0 requires either f (a) < 0 or f (b) < 0.
Remark
Although the convergence of the bisection method is not fast, the
bisection method is a good choice for finding a better real initial
point for other advanced iterative numerical methods.
18 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
Outline
Introduction
Bisection method
Newtons method
Secant method
Other topics
19 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
20 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
Stop Criteria
21 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
Initial preparation:
(1) Pick up the initial point x0 .
(2) Specify the tolerances , f , and the maximum number M
of iteration steps.
Output the final xk+1 from the above loop as the the
numerical solution.
22 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
x+1
2 .
23 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
Introduction
Bisection method
Newtons method
Secant method
Other topics
xk
4
4.329786
4.230895
4.273634
4.273634
4.256383
Verification:
f (4.256383) = g (4.256383) 4.256383 0.00719599.
Try other initial values?
Similar performance.
25 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
straightforward
to
verify
that
there
are
two
fixed
points:
2
Introduction
Bisection method
Newtons method
Secant method
Other topics
xk from x0 = 2
2
4
16
256
6.5536 104
4.2950 109
xk from x0 = 0.5
0.5
0.25
0.0625
3.90625 103
1.5259 105
Diverge sometimes!
27 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
Then g (x) = e x + 2x
for g (x) = e x
0
1
0.367879
0.692201
0.500474
0.606244
0.545396
0.579612
0.560115
0.571143
0.564879
28 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
29 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
30 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
30 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
Introduction
Bisection method
Newtons method
Secant method
Other topics
32 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
Lk
|x1 x0 | and
1L
L
|xk xk1 | .
1L
Remark
This theorem answers Questions 1, 2, and 3.
33 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
34 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
nk
X
i=1
nk
X
|xk+i xk+i1 |
Li |xk xk1 |
i=1
L(1 Lnk )
|xk xk1 | .
1L
Introduction
Bisection method
Newtons method
Secant method
Other topics
|xk1 xk2 |
1L
Lk
|x1 x0 | .
1L
|xn xk |
36 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
|xk1 xk2 |
1L
Lk
|x1 x0 | .
1L
|xn xk |
Introduction
Bisection method
Newtons method
Secant method
Other topics
|x1 x0 |
ln(
(1L)
|x1 x0 |
ln(L)
Lk
37 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
Continued proof:
"
Then we can pick N =
ln(
(1L)
)
|x1 x0 |
ln(L)
#
+ 1, where [P] means the
nearest integer to P.
By Lemma (II), the sequence {xk } must converge.
38 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
39 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
Introduction
Bisection method
Newtons method
Secant method
Other topics
L(1 Lnk )
|xk xk1 | ,
1L
and
|xn xk |
Lk
|x1 x0 | .
1L
L
|xk xk1 | ,
1L
and
|z xk |
Lk
|x1 x0 | .
1L
41 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
Remark
It may be difficult to find G such that g maps G to itself.
It may be difficult to show that g is a contraction on G .
Question: How to obtain the two conditions required by the
Contraction Mapping Theorem: g maps G to itself and g is a
contraction on G ?
42 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
43 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
Lemma (III)
Suppose that g is continuously differentiable and that |g 0 (x)| L
for x G . Then g satisfies a Lipschitz condition with Lipschitz
constant L for x G .
44 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
45 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
x
Z y
L ds
x
L |x y | .
46 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
x5
120 .
x
and
Solution: Note that g 0 (x) = x2 + 24
2
4
1
x
x
1
8 2 + 24 384 .
2
x4
We have |g 0 (x)| = x2 + 24
18 , thus L = 81 .
47 / 85
Introduction
Bisection method
Newtons 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 .
48 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
49 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
Introduction
Bisection method
Newtons method
Secant method
Other topics
50 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
51 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
2
2
cos 2x g 0 (x) < 1
3
3
for any x R.
Then by Lemma (IV), g is a contraction on G = R.
Obviously, g maps G = R into itself.
Thus, by the the Contraction Mapping Theorem, the fixed
point method is convergent for any initial value x0 G = R.
52 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
1
2
1
x2
and |g 0 (x)|
1
2
Introduction
Bisection method
Newtons method
Secant method
Other topics
54 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
Remark
From xk+1 = g (xk ), z = g (z) and the Lipschitz condition, we
get
|xk+1 z| = |g (xk ) g (z)| L |xk z|.
Hence the fixed point method has at least linear rate of
convergence if the conditions of the Contract Mapping Theory
are satisfied.
But is it possible to have a higher rate of convergence?
55 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
n
X
1 (k)
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 ,
n!
56 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
1
f (n+1) ()(x x0 )n+1
(n + 1)!
for some [x0 , x] (Lagrange form of the remainder) ,
or
Rn
Z
1 x (n+1)
=
f
(s)(x s)n ds
n! x0
for some [x0 , x] (Integral form of the remainder) .
57 / 85
Introduction
Bisection method
Newtons 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.
Its not easy to find g (q) (z) (q = 1, 2, 3, ) since the
solution z is unknown.
58 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
59 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
60 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
Outline
Introduction
Bisection method
Newtons method
Secant method
Other topics
61 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
62 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
f (x0 )
f 0 (x0 ) .
f (xk )
f 0 (xk ) !
63 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
f (xk )
f 0 (xk ) !
64 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
Remark
A geometric explanation of the Newtons method: see Figure
3.4 on page 51 of the textbook.
This is a special fixed-point method with g (x) = x
f (x)
f 0 (x) .
65 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
But g 00 (z) may not be zero. Thus we can obtain the quadratic
convergence rate based on the theorem (V).
The quadratic convergence rate also matches the second order
remainder 12 f 00 ()(x x0 )2 in the above Talyors expansion.
66 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
Stop criteria
Let , f and f 0 be the tolerance
|xk+1 xk | < ;
|f (xk )| < f ;
A maximum number M of iterations is reached;
|f 0 (xk )| < f 0 ;
Any combination.
67 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
Initial preparation:
(1) Pick up the initial point x0 .
(2) Specify the tolerances , f , f 0 , and the maximum number
M of iteration steps.
f (x0 )
f 0 (x0 ) .
First step: k = 0, x1 = x0
Output the final xk+1 from the above loop as the the
numerical solution.
68 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
69 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
Numerical results:
k
0
1
2
3
xk
0
0.5
0.566311
0.567143
70 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
71 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
Outline
Introduction
Bisection method
Newtons method
Secant method
Other topics
72 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
y x
f (x)f (y )
.
xy
Introduction
Bisection method
Newtons method
Secant method
Other topics
Remark
Compared with the Newtons method, the secant method uses
the line determined by xk and xk1 , not the tangent line of
f (x) at xk , to approximate the curve of f (x). Then we use
the root of the line determined by xk and xk1 to approximate
the that of f (x).
A geometric explanation of the secant method.
74 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
Remark
The secant method is not a fixed-point method. It involves
not only xk+1 and xk , but also xk1 .
For the secant method, we need two initial values x0 and x1 .
But we need only one function evaluation f (xk ) at each
iteration step since f (xk1 ) was computed in the previous
iteration step.
75 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
Stop criteria
76 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
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.
Output the final xk+1 from the above loop as the the
numerical solution.
77 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
78 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
Numerical results:
k
0
1
2
3
4
5
xk
0
1
0.367879
0.498592
0.564573
0.567111
79 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
1
= (1 + 5) 1.62.
2
This is called super linear convergence (1 < < 2).
|xk+1 x | C |xk x | ,
80 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
Outline
Introduction
Bisection method
Newtons method
Secant method
Other topics
81 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
82 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
The M
ullers method: Compared with the secant method , the
M
ullers method uses a parabola, which is determined by xk ,
xk1 and , xk2 , to approximate the curve of f (x). Then we
use the root of the parabola to approximate the that of f (x).
Aitken acceleration : Combine the formulas of two or more
iteration steps to obtain an approximation with higher rate of
convergence.
Many other methods......
83 / 85
Introduction
Bisection method
Newtons method
Secant method
Other topics
84 / 85