1 The Bisection Method
1 The Bisection Method
One of the most basic problems of numerical approximation is the root-finding problem, which
is aimed at finding a root, or solution, of an equation of the form f (x) = 0, or equivalently
finding a zero of f (x).
b1 a1 b1 + a1
p1 = a1 + =
2 2
If f (p1 ) = 0, then p = p1 , and we are done. If f (p1 )f (a1 ) > 0, then f (p1 )f (b1 ) < 0, which
implied p (p1 , b1 ). Now we set a2 = p1 , b2 = b1 . If f (p1 )f (a1 ) > 0, we set a2 = a1 , b2 = p1 . we
then reapply the process to the interval [a2 , b2 ]. Keeping on going this way, we get a sequence
an +bn
pn , where pn = 2 .
The iteration can be stopped( terminated) by selecting a tolerance(threshold) > 0 such that
pN pN 1
< , pN 6= 0
pN
and pN will serve as the approximation to p.
Example.(p.54 No.9)
Let f (x) = (x + 2)(x + 1)x(x 1)3 (x 2). To which zero of f does the bisection method converge
when applied on the following intervals?
Solution:
a1 +b1
(a). Let a1 = 2.5, b1 = 3, then p1 = 2 = 0.25, from f (a1 ) < 0, f (b1 ) > 0, f (p1 ) < 0, we
a2 +b2
let a2 = p1 , b2 = b1 , then p2 = 2 = 1.125. Since
a3 + b3
f (p2 ) < 0 a3 = p2 , b3 = b2 p3 = = 1.8125
2
similarly,
a4 + b4
f (p3 ) < 0 a4 = p3 , b4 = b3 p4 = = 2.15625
2
1
a5 + b5
f (p4 ) > 0 a5 = a4 = p3 , b5 = p4 p5 =
2
2
We see the bisection method converges to 2 when applied on the interval[3, 2.5].
(b)
i [ai , bi ] pi f (ai ) f (pi ) f (bi )
1 [-2.5,3] 0.25 - + +
2 [-2.5,0.25] -1.125 - + +
3 [-2.5,-1.125] -1.8125 - + +
4 [-2.5,-1.8125] -2.15625 - - +
5 [-2.15625,-1.8125] -1.984375 - + +
So the bisection method converges to -2 when applied on the interval [2.5, 3].
(c)
i ai bi pi f (ai ) f (pi ) f (bi )
1 -1.75 1.5 -0.125 + - -
2 -1.75 -0.125 -0.9375 + - -
3 -1.75 -0.9375 -1.34375 + + -
4 -1.34375 -0.9375 -1.14063 + + -
So the bisection method converges to -1 when applied on the interval [1.75, 1.5].
(d)
i ai bi pi f (ai ) f (pi ) f (bi )
1 -1.5 1.75 -0.125 + + -
2 0.125 1.75 0.9375 + + -
3 0.9375 1.75 1.34375 + - -
4 0.9375 1.34375 1.14063 + - -
So the bisection method converges to 1 when applied on the interval [1.5, 1.75].
Theorem 2.1 Suppose that f C[a, b] and f (a)f (b) < 0. The bisection method generates a
sequence {pn }
n=1 approximating a zero p of f with
ba
|pn p| , when n 1
2n
2
Since
an + bn
pn = , pn (an , bn ),
2
we have
1 ba
|pn p| (bn an ) = n
2 2
which leads to
lim pn = p
n
1
pn = p + O( ).
2n
2 Fixed-point iteration
Definition A number p is said to be a fixed point for a given function g if g(p) = p.
A root-finding problem f (p) = 0 can be transformed to finding a fixed-point problem in the
following way.
Let
g(x) = x + f (x), is some nonzero constant
Then
g(x) = x f (x) = 0
which means that if f (x) has a zero at p, then the function g(x) defined by g(x) = x+f (x), ( 6=
0) has a fixed point at p.
Conversely, if the function g(x) has a fixed point at p, then the function defined by f (x) =
1
(g(x) x) has a zero at p.
Since the fixed-point form is easier to analyze, and certain fixed-point choices lead to very pow-
erful root-finding techniques, we often transform a root-finding problem to a fixed-point finding
problem.
The geometric explanation for fixed-points of g(x) is that the fixed-points of g(x) are the inter-
sections of y = g(x) and y = x as shown in Fig.2.
The following theorem gives sufficient conditions for the existence and uniqueness of a fixed
point.
Theorem 2.2
a) If g [a, b] and g(x) [a, b] for all x [a, b], then g has a fixed point in [a, b];
b) If, in addition, g 0 (x) exists on (a, b) and there is a positive constant k < 1 such that
3
a) If g(a) = a or g(b) = b, then g has a fixed point at an endpoint.
If not, then from g(x) [a, b] it follows g(a) [a, b] and g(b) [a, b]. Since the function
h(x) = g(x) x [a, b] and h(a) = g(a) a > 0, h(b) = g(b) b < 0.
The intermediate valued Theorem implies that there exists p (a, b) for which h(p) = 0,
therefore g(p) = p. Namely, this number p is a fixed point for g.
b) Suppose, in addition, that |g 0 (x)| k < 1 for all x (a, b) and that p and q are both fixed
points for g in [a, b].
If p 6= q, then the Mean value Theorem implies that there exists a number between p and q,
such that
p q = g(p) g(q) = (p q)g 0 (),
Example 2.2.1
Let g(x) = (x2 1)/3 on [1, 1].Then g 0 (x) = 2
3 x, set g 0 (x) = 0, we get x = 0, and from
g 00 (x) = 2
3 > 0, we see g(0) = 31 is the minimum of g, and the maximum of g is g(1) = 0.
Clearly g C[1, 1], and g [ 31 , 0] [1, 1], moreover
2 2
|g 0 (x)| = |x| < , f or all x (1, 1)
3 3
so g satisfied all the hypotheses of Theorem 2.2 and has a unique fixed point in [1, 1].
In this example, the unique fixed point p in the interval [1, 1] can be determined algebraically.
In fact, if
p2 1
p = g(p) =
3
then
p2 3p 1 = 0
2
|g 0 (x)| = |x| > 2, f or all x (3, 3.5)
3
therefore g does not satisfy the hypotheses of Theorem 2.2 on [3, 3.5], which shows that the
hypotheses of Theorem 2.2 are sufficient to guarantee a unique fixed point but are not necessary.
Definition(fixed-point iteration)
4
Suppose g C[a, b], p0 (a, b) is an initial approximation and the sequence {pn }
n=1 is generated
by letting pn = g(pn1 ) for each n 1.
If
lim pn = p,
n
then
p = lim pn = lim g(pn1 ) = g( lim pn1 ) = g(p)
n n n
and a solution to x = g(x) is obtained. This technique is called fixed-point iteration, or functional
iteration.
Theorem 2.3(Fixed-point Theorem) Let g(x) C[a, b] and g(x) [a, b] for all x in [a, b].
Suppose, in addition, that g 0 exists on (a, b) and a constant k (0, 1) exists such that
pn = g(pn1 ), n1
where n is between pn1 and p and hence in (a, b). Applying the above inequality repeatedly
(inductively) gives
Corollary 2.4 If g satisfies the hypotheses of Theorem 2.3, then bounds for the error involved
in using pn to approximate p are given by
|pn p | k n max{p0 a, b p0 }
and
kn
|pn p | |p1 p0 |, f or all n 1
1k
5
Proof. The first inequality is obvious since |p0 p | max{p0 a, b p0 }.
As for the second inequality, noting
Therefore
1 2 1 2 1 1
3 3 g 0 (x) 2 3 g 0 (x) |g 0 (x)| < 1
3 3 6 3
.
6
Theorem 2.3 confirms the convergence of the sequence {pn }n1 generated by pn = g(pn1 ).
Use p0 = 1, we get
p1 = 1.25992104989287
p2 = 1.3119382668329
p3 = 1.32235381913882
p4 = 1.32426874455158, |p4 p3 | = 0.0019149254 < 102
p5 = 1.32463262525092
p6 = 1.32470174851036
p7 = 1.32471487844095
p8 = 1.32471737243567
p9 = 1.32471784616215, |p9 p8 | = 4.73726474597682 107
3 Newtons Method
Newtons ( or the Newton-Raphson) method is one of the most powerful and well-known numeri-
cal methods for solving a root-finding problem. Perhaps the most widely used of all root-locating
formulas is the Newton-Raphson equation.
If the initial guess at the root is p0 , a tangent line can be extended from the point (p0 , f (p0 )).
The point where this tangent line crosses the x axis usually represents an improved estimate of
the root. Suppose that p1 is the xintercept of the tangent line to the graph of f at (p0 , f (p0 )).
(1)Geometrical interpretaion
The first derivative of f at p0 is equivalent to the slope
f (p0 ) 0
f 0 (p0 ) =
p 0 p1
which can be rearranged to yield
f (p0 )
p1 = p0
f 0 (p0 )
Similarly if p2 is the xintercept of the tangent line to the graph of f at (p1 , f (p1 )), then
f (p1 )
p2 = p1
f 0 (p1 )
Generally if pn is the xintercept of the tangent line to the graph of f at (pn1 , f (pn1 )), then
f (pn1 )
pn = pn1
f 0 (pn1 )
which is called the Newton-Raphson formula.
(2) An alternative means based on Taylor polynomials
7
Suppose that f C 2 [a, b]. Let pn1 be an approximation to p and f 0 (pn1 ) 6= 0. The first
Taylor polynomial for f (x) expanded about pn1 gives
1
f (x) = f (pn1 ) + (x pn1 )f 0 (pn1 ) + (x pn1 )2 f 00 (n (x))
2
where n (x) lies between pn1 and x. Since f (p) = 0, we have
1
0 = f (pn1 ) + (p pn1 )f 0 (pn1 ) + (p pn1 )2 f 00 (n (p))
2
If |p pn1 | is small(< 1), then |p pn1 |2 is much smaller. Neglecting the remainder term
yields
f (pn1 ) + (p pn1 )f 0 (pn1 ) 0
f (pn1 )
pn = pn1
f 0 (pn1 )
f (x)
g(x) = x .
f 0 (x)
|f 0 (p)|
Step 1. f C 2 [a, b] indicated f 0 (x) is continuous on [a, b]. Since f 0 (p) 6= 0, we set = 2 ,
the continuity of f 0 (x) at x = p implies that there exists a 1 > 0 such that
8
whenever |x p | 1 . From
one gets
|f 0 (p)|
|f 0 (x)| > |f 0 (p)| =
2
which means
f 0 (x) 6= 0, whenever x [p 1 , p + 1 ]
f (pn ) p3n pn 1
pn+1 = pn = p n
f 0 (pn ) 3p2n 1
which is to take
x3 x 1
g(x) = x
3x2 1
9
in fixed-point iteration. Then
p1 = 1.500000000
p2 = 1.347826087
p3 = 1.325200399
p4 = 1.324718174
p5 = 1.324717957
and
|p5 p4 | = 2.167542 107 .
10
joining (p0 , f (p0 )) and (p2 , f (p2 )), and then interchange the indices on p0 and p1 . In a similar
manner, once p3 is found, the sign of f (p2 )f (p3 ) determines whether we use p2 and p3 or p1 and
p3 to compute p4 .
|pn+1 p|
lim =
n |pn p|
If = 1, namely, if
|pn+1 p|
lim = 1 > 0
n |pn p|
then the sequence {pn }
n=0 is said to be linearly convergent.
If = 2, i.e., if
|pn+1 p|
lim = 2 > 0
n |pn p|2
then the sequence {pn }
n=0 is said to be quadratically convergent.
pn = g(pn1 ), f or n 1
11
since g 0 is continuous on (a, b), one gets
|pn+1 p|
lim = lim |g 0 (n )| = |g 0 (p)| =
6 0,
n |pn p| n
Therefore {pn }
n=0 is only linearly convergent to p.
Theorem 2.7 implies that higher-order convergence for fixed-point methods can occur only when
g 0 (p) = 0.
The next theorem gives additional conditions to ensure the quadratic convergence.
(3) Theorem 2.8 Let p be a fixed point of g(x) on an open interval I. Suppose that g 0 (p) = 0,
g 00 is continuous and |g 00 (x)| < M for all x I. Then there exists a > 0 such that, for
p0 [p , p + ], the sequence {pn }
n=0 defined by pn = g(pn1 ) converges at least quadratically
to p. And
M
|pn+1 p| < (|pn p|)2
2
holds for sufficiently large values of n.
Proof. From g 0 (p) = 0 and the continuity of g 0 , we know that for some k (0, 1), there exists
> 0 such that |g 0 (x)| k < 1 for all x on the interval [p , p + ] I. Now we prove that
g(x) maps [p , p + ] into itself. In fact, if x [p , p + ], the Lagrange Mean value Theorem
implies that for some number between x and p,
Therefore
g(x) [p , p + ].
g 00 () g 00 ()
g(x) = g(p) + g 0 (p)(x p) + (x p)2 = p + (x p)2
2 2
where lies between x and p. In particular, when x = pn ,
g 00 (n )
pn+1 = g(pn ) = p + (pn p)2
2
with n between pn and p. Thus
g 00 (n )
pn+1 p = (pn p)2
2
Since g C[a, b], g(x) [a, b] for all x [a, b], and |g 0 (x)| k < 1 for all x [p , p + ], it
follows from the fixed-point Theorem that {pn }
n=0 converges to p, which leads to
lim n = p.
n
12
The fact that g 00 is continuous indicates
|pn+1 p | 1 1 1
lim 2
= lim |g 00 (n )| = |g 00 ( lim n )| = |g 00 (p)|.
n (|pn p |) n 2 2 n 2
In order to make the iterative procedure derived from g quadratically convergent we need to
have f (p) = 0 and g 0 (p) = 0.
Note
g 0 (x) = 1 0 (x)f (x) (x)f 0 (x)
we have
0 = g 0 (p) = 1 0 (p)f (p) (p)f 0 (p) = 1 (p)f 0 (p)
if and only if
1
(p) =
f 0 (p)
Let
1
(x) = 0 (x)
f
1
then surely (p) = f 0 (p) , which produces the quadratically convergent procedure
f (pn1 )
pn = g(pn1 ) = pn1 (pn1 )f (pn1 ) = pn1
f 0 (pn1 )
lim q(x) 6= 0
xp
13
then by Taylors expansion we have
with
1 (m) x p (m+1)
q(x) = f (p) + f (),
m! (m + 1)!
clearly
1 (m)
f (p) 6= 0.
lim q(x) =
m!
xp
(6) Necessary and sufficient conditions for f (x) to have a zero of multiplicity m at p
Theorem 2.11 The function f (x) C m [a, b] has a zero of multiplicity m at p in (a, b) if and
only if
f (p) = f (p) = = f (m1) (p) = 0, but f (m) (p) 6= 0
Proof. According to the preceding arguments, we have already proved the sufficiency. Now
suppose that f (x) C m [a, b] has a zero of multiplicity m at p in (a, b), namely,
with
lim q(x) 6= 0.
xp
On the other hand, f (x) C m [a, b] implies that f can be expanded into the following Taylor
polynomial with remainder
Therefore
(x p)m1 (m1) (x p)m (m)
(x p)m q(x) = f (p) + (x p)f 0 (p) + + f (p) + f (),
(m 1)! m!
14
Setting x = p yields f 0 (p) = 0.
Keep on going this way, one finds
and finally,
1 (m)
q(x) = f ()
m!
since f (x) C m [a, b] , lies between x and p, we have
f (m) (p) = f (m) ( lim ) = lim f (m) () = lim m!q(x) = m! lim q(x) 6= 0
xp xp xp xp
f (x)
(x) =
f 0 (x)
(x p)m q(x)
=
m(x p)m1 q(x) + (x p)m q 0 (x)
q(x)
= (x p)
mq(x) + (x p)q 0 (x)
Since
q(x)
lim 6= 0,
xp mq(x) + (x p)q 0 (x)
p is a simple zero. Applying Newtons method to gives
(8) Examples
Example 1. Suppose f C 2 [a, b], f (p) = 0, f 0 (p) 6= 0, p (a, b), p0 [p , p + ] [a, b].
Show that for
f (pn )
pn+1 = pn ,
f 0 (pn )
pn pn1 1 f 00 (p)
lim = .
n (pn1 pn2 )2 2 f 0 (p)
Proof. Since
f (pn1 )
pn pn1 =
f 0 (pn1 )
or
(pn pn1 )f 0 (pn1 ) + f (pn1 ) = 0,
15
and
(pn1 pn2 )2 00
f (pn1 ) = f (pn2 ) + (pn1 pn2 )f 0 (pn2 ) + f (n )
2
with between pn1 and pn2 , and f (pn2 ) + (pn1 pn2 )f 0 (pn2 ) = 0 implies
(pn1 pn2 )2 00
f (pn1 ) = f (n )
2
therefore
pn pn1 f (pn1 )
= 0 (p
(pn1 pn2 )2 f n1 )(pn1 pn2 )
2
(pn1 pn2 )2 00
2 f (n )
=
f 0 (pn1 )(pn1 pn2 )2
f 00 (n )
= 0
2f (pn1 )
From
lim n = p
n
is a method of order 3.
Proof. First of all we prove {pn } converges to a.
Let
x(x3 + 3a)
g(x) =
3x2 + a
then
(3x2 + 3a)(3x2 + a) 6x x(x2 + 3a)
g 0 (x) =
(3x2 + a)2
3x 6ax + 3a2
4 2
=
(3x2 + a)2
3(x2 a)2
=
(3x2 + a)2
3x4 1
< =
9x4 3
= {pn } converges and it is easy to know
lim pn = p = a.
n
16
then for x [ a , a + ], and g( a) = a,
|g(x) g( a)| = |g 0 ()||x a| < |x a| <
which means g [ a , a + ]. Now
a pn (p2n + 3a)/(3p2n + a) a pn+1
lim = lim
n ( a pn )3 n ( a pn )3
( a pn )3
= lim
n (3p2 + a)( a pn )3
n
1
= 6= 0.
4a
Or Since
3(x2 a)2
g 0 (x) =
(3x2 + a)2
x+a)2
Set g 0 (x) = ( x a)2 h(x), where h(x) = 3((3x2 +a)2
, which implies
g 0 ( a) = g 00 ( a) = 0,
0 (x a)2 00 (x a)3 000
g(x) = g( a) + (x a)g ( a) + g ( a) + g ()
3 2 6
(x a) 000
= a+ g ()
6
(pn a)3 000
= pn+1 a = g(pn ) a = g ()
6
a pn (p2n + 3a)/(3p2n + a) g 000 ( a)
= lim = 6= 0.
n ( a pn )3 6
Example 3.(pp.86, No.11)
The iterative method to solve f (x) = 0 given by the fixed-point method x = g(x), where
f (pn1 ) f 00 (pn1 f (pn1 ) 2
pn = g(pn1 ) = pn1 ( ) , f or n = 1, 2,
f 0 (pn1 ) 2f 0 (pn1 ) f 0 (pn1
has
g 0 (p) = g 00 (p) = 0
this will generally yield cubic( = 3) convergence.
Proof. Let g(x) be expressed into the form
17
where and are functions to be determined.
Suppose p is the root of f (x) = 0 and g(p) = p. Differentiating Eq. (4.1) leads to
g 0 (x) = 1 + 0 (x)f (x) + (x)f 0 (x) + 0 (x)f 2 (x) + 2(x)f (x)f 0 (x) (4.2)
g 00 (x) = 00 (x)f (x)+ 0 (x)f 0 (x)+ 00 (x)f 2 (x)+2 0 (x)f (x)f 0 (x)+2(x)(f 0 (x))2 +2f (x)((x)f 0 (x))0
which yields
f 00 (p)
g 00 (p) = 0 (p)f 0 (p) + 2(p)(f 0 (p))2 = + 2(p)(f 0 (p))2
f 0 (p)
to make g 00 (p) = 0, we must choose
f 00 (p)
(p) =
2(f 0 (p))3
more generally, one can take
f 00 (x)
(x) =
2(f 0 (x))3
therefore
f (x) (f (x))2 f 00 (x)
g(x) = x
f 0 (x) 2(f 0 (x))3
satisfies
g(p) = p, g 0 (p) = g 00 (p) = 0
The iteration scheme based on g(x) is as follows
f (pn1 ) f 00 (pn1 ) f (pn1 ) 2
pn = g(pn1 ) = pn1 ( )
f 0 (pn1 ) 2f 0 (pn1 ) f 0 (pn1
Next we show {pn } is of cubic convergence.
In fact, expanding g(x) into Taylors polynomial about x = p gives
(x p)2 00 (x p)3 000
g(x) = g(p) + (x p)g 0 (p) + g (p) + g ()
2! 3!
(x p)3 000
= g(p) + g ()
3!
18
with lying between x and p. Therefore
(pn p)3 000
pn+1 = g(pn ) = p + g (n )
6
with n lying between pn and p.
If g 000 is continuous on some interval containing p, then we have
|pn+1 p| 1 1
lim 3
= |g 000 (n )| = g 000 (p).
n |pn p| 6 6
Example 4.(pp.86, No.12)
If {pn }
n=0 are convergent secant method approximations to p, the solution to f (x) = 0, then a
constant C exists with |pn+1 p| C|pn p||pn1 p| for sufficiently large values of n. Assume
{pn }
n=0 converges to p of order , show = (1 + 5)/2.
Proof. By secant method
f (pn )(pn pn1 )
pn+1 = g(pn ) = pn
f (pn ) f (pn1 )
pn f (pn ) pn f (pn1 ) pn f (pn ) + pn1 f (pn )
=
f (pn ) f (pn1 )
pn1 f (pn ) pn f (pn1 )
=
f (pn ) f (pn1 )
so
pn1 f (pn ) pn f (pn1 )
pn+1 p = p
f (pn ) f (pn1 )
(pn1 p)f (pn ) (pn p)f (pn1 )
=
f (pn ) f (pn1 )
f (pn ) f (pn1 )
(pn p) (pn1 p)
= (pn1 p)(pn p)
f (pn ) f (pn1 )
f [pn , p] f [pn1 , p]
= (pn1 p)(pn p)
f (pn ) f (pn1 )
f [pn ,p]f [pn1 ,p]
p p
= (pn1 p)(pn p) f (p n)fn1
(pn1 )
n
pn pn1
f [pn1 , pn , p]
= (pn1 p)(pn p)
f [pn1 , pn ]
f 00 (n )/2
= (pn1 p)(pn p) 0
f (n )
where n lies between pn1 , pn , p, and n lies between pn1 and pn .
If f C 2 , and f 0 (p) 6= 0, then
f 00 (n )/2 1 f 00 (p)
lim =
n f 0 (n ) 2 f 0 (p)
|pn+1 p| 1 |f 00 (p)|
= lim =
n |pn p||pn1 p| 2 |f 0 (p)|
19
Therefore for sufficiently large values of n,
combining Eq. (4.4) and Eq. (4.5), we know that for sufficiently large values of n,
or
C
|pn p|1 |pn1 p|
so
C 1
1 1
|pn p| ( ) |pn1 p| 1 (4.6)
Comparing Eq.(4.6) with Eq.(4.5) yields
1
=
1
namely
2 1 = 0
20