Professional Documents
Culture Documents
97 Nach 3
97 Nach 3
Root Finding
1
3.1 The Bisection Method
► Let f be a continues function. Suppose we know that f(a) f(b) < 0, then
there is a root between a and b.
2
Example 3.1
5
6
Bisection Method
► Advantage:
A global method: it always converge no matter how
far you start from the actual root.
► Disadvantage:
It cannot be used to find roots when the function is
tangent is the axis and does not pass through the
axis.
► For example:
It converges slowly compared with other methods.
7
3.2 Newton’s Method:
Derivation and Examples
► Newton’s method is the classic algorithm for
finding roots of functions.
► Two good derivations of Newton’s method:
Geometric derivation
Analytic derivation
8
Newton’s Method :
Geometric Derivation
9
Newton’s Method :
Geometric Derivation
► The fundamental idea in Newton’s method is to use the
tangent line approximation to the function f at point .
► The point-slope formula for the equation of the straight line
gives us:
10
Newton’s Method :
Analytic Derivation
11
Example 3.2
12
13
Newton’s Method
► Advantage:
Very fast
► Disadvantage:
Not a global method
► For example: Figure 3.3 (root x = 0.5)
Wrong predictions,
because the root is
positive
(p. 12)
f ( ) 0
f ( xn 1 )
( xn 1 xn )
f ' ( xn 1 )
17
To make sure f(xn) is also small enough 18
3.4 Application:
Division using Newton’s Method
► Thepurpose is to illustrate the use of
Newtown’s method and the analysis of the
resulting iteration.
f (x)
f ’(x)
19
► Questions:
When does this iteration converge and how fast?
What initial guesses x0 will work for us?
20
1 1 r
f ( x) a en xn n
x a a
1 1
| en 1 || xn 1 || ( xn (2 axn )) |
a a
1 1 2
| 2 xn axn2 || a( 2 xn xn2 ) |
a a a
1
| a ( xn ) 2 || aen2 |
a
rn
en
| || a || rn | r02
n
1
a
| r0 | 1 | 1 ax0 | 1
if 1 ax0 1 x0 0
2
if ax0 1 1 x0 21
a
1 1
f ( x) f ( ) 2 and f (1) 1
x 2
Initial x0
p.56
22
Example 3.3
23
3.5 The Newton Error Formula
24
Definition 3.1
25
Example 3.6
| x0 | 1
26
3.6 Newton’s Method:
Theory and Convergence
27
3.7 Application:
Computation of the Square Root
28
► Questions:
Can we find an initial guess such that Newton’s
method will always converge for b on this interval?
How rapidly will it converge?
(3.25)
29
relative error
30
How to find the initial value?
► Choose the midpoint of the interval
For example:
If ,
b is known
31
3.8 The Secant Method:
Derivation and Examples
► An obvious drawback of Newton’s method is that it requires a
formula for the derivative of f.
33
The Secant Method
34
The Secant Method
► Its advantages over Newton’s method:
It not require the derivative.
It can be coded in a way requiring only a single function evaluation
per iteration.
► Newton’s requires two, one for the function and one for the
derivative.
35
Example 3.7
36
37
Error Estimation
► The error formula for the secant method:
38
The Convergence
39
3.9 Fixed-point Iteration
► The goal of this section is to use the added understanding of simple
iteration to enhance our understanding of and ability to solve root-
finding problems.
► The root of f is equal to the fixed-point of g.
root
40
Fixed-point Iteration
► Because show that this kind of point is
called a fixed point of the function g, and an iteration of the form
(3.33) is called a fixed-point iteration for g.
41
Fixed point
Root
42
43
44
45
Example 3.8
46
47
g (x)
48
Theorem 3.5
49
Theorem 3.5 (con.)
50
51
3.10 Special Topics in Root-finding
Method
► 3.10.1 Extrapolation and Acceleration
The examples have some mistakes, so we jump this
subsection.
52
3.10.2 Variants of Newton’s Method
► Newton’s method v.s. the chord method
v.s.
► One interesting variant of the chord method updates the point at whic
h the derivative is evaluated, but not every iteration.
53
Example 3.12
54
55
Other Approximations to the
Derivative
56
3.10.3 The Secant Method:
Theory and Convergence
57
3.10.4 Multiple Roots
► So far our study of root-finding methods has assumed that the
derivative of the function does not vanish at the root:
58
Example 3.13
-1
59
L’Hopital’s Rule for forms of type 0/0
If lim[ f' ( x ) /g' ( x )] exists in either the finite or infinite sense, then
x u
f ( x) f ' ( x)
lim lim
x u g ( x ) x u g ' ( x )
60
Another example (f(x)=1-xe )
1-x
61
Another example (f(x)=1-xe ) 1-x
62
Discussion—Newton’s Method
63
Discussion—Newton’s Method
► If we change the Newton iteration to be
► More generally,
► The problem with this technique is that it requires that we know the
degree of multiplicity of the root ahead of time.
64
Discussion—Newton’s Method
► So an alternative is needed.
65
Discussion—Newton’s Method
► (3.60)
► (3.61)
66
Table 3.10
67
Discussion
► From Table 3.10, we can see the accuracy is not as good as past. What
is going on?
► Let’s look at a graph of the polynomial
Fig. 3.11 shows a plot of 8000 points from this curve on the interval
[0.45, 0.55] (root = 0.5)
Premature convergence
► This is not caused by the root-finding method. It is because using finite
precision arithmetic.
68
69
3.10.5 In Search of Fast Global
Convergence: Hybrid Algorithm
► Bisection method:
slow but steady and reliable
► Brent’s algorithm:
incorporate these basic ideas into an algorithm
Algorithm 3.6
70
71
Example 3.14
Step
1.
Step 3. (b)
Step 3.
(c) Step
1.
Step 2. (b)
72
Another Example
73