100% found this document useful (1 vote)
153 views3 pages

Secant Method: Example

The secant method approximates the root of a function f(x) by finding the x-intercept of the secant line between two points on the graph of f(x). This leads to a recurrence relation that each new approximation xn+1 is given by. Analyzing this recurrence relation shows that the secant method has a convergence rate between linear and quadratic, specifically 1.62. So it converges faster than linearly, but not as fast as Newton's method which is quadratic.

Uploaded by

Fluencive Boy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
153 views3 pages

Secant Method: Example

The secant method approximates the root of a function f(x) by finding the x-intercept of the secant line between two points on the graph of f(x). This leads to a recurrence relation that each new approximation xn+1 is given by. Analyzing this recurrence relation shows that the secant method has a convergence rate between linear and quadratic, specifically 1.62. So it converges faster than linearly, but not as fast as Newton's method which is quadratic.

Uploaded by

Fluencive Boy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

LECTURE 8

Secant Method
The idea underlying the secant method is the same as the one underlying Newton's method: to nd an
approximate zero of a function f (x) we nd instead a zero for a linear function F (x) that corresponds to a
\best straight line t" to f (x). In Newton's method, the function representing the best straight line t is
determined by the rst order Taylor expansion:
F (x) = f (xo ) + f 0 (xo ) (x , x0)
In the secant method, we instead determine a \best straight line t" by determining the linear function
whose graph corresponds to a line that connects two points on the graph of f (x).
Recall that the line that passes through two points (x0 ; y0) and (x1; y1 ) is prescribed by
y = y0 + xy1 , , y0 (x , x )
0
1 x0
Let (x0; f (x0 )) and (x1; f (x1)) be two nearby points on the graph of f (x). The line passing through these
two points is thus
y = F (x)  f (x0 ) + f (xx1 ) , f (x0 ) (x , x )
0
1 , x0
Now the function F (x) has a zero at x2 if
0 = f (x0 ) + f (xx1 ) , f (x0) (x , x )
2 0
1 , x0
or  
x 1 ,
x2 = x0 , f (x0 ) f (x ) , f (x )x 0
1 0
If we regard, x1, x0, and x2 as successive approximations for an actual zero of f (x) we can interprete this
calculation as an algorithm for calculating an (n + 1)th order approximation to a zero of f (x): indeed,
setting x1 = xn+1, x0 = xn , and x1 = xn,1 we have
 
x n , x n,
xn+1 = xn , f (xn ) f (x ) , f (x )1
n n,1

Example 8.1. Write a Maple routine that utilizes the secant method to determine a zero of
f (x) = x3 , 4x + 1
starting with
x1 = 0
x2 = 1
M := 10;
delta := 0.000001;
epsilon := 0.000001;
f := x -> x^3 - 4*x + 1;
x0 := 0.0;

1
1. RATE OF CONVERGENCE OF SECANT METHOD 2
x1 := 1.0;
for i from 1 to M do
x2 := x1 - f(x1)*(x1 -x0)/(f(x1) -f(x0));
if (abs(f(x2)) < epsilon) then break; fi;
x0 := x1;
x1 := x2;
if (abs(x1 -x0) < delta) then break; fi;
od:
x2;
f(x2);

1. Rate of Convergence of Secant Method


Let r be the actual root of f (x) = 0, let xn be the approximate value for r obtained by carrying out n
iterations of the secant method, and let en be the corresponding error:
en = xn , r.
We then have
en+1 = xn+1 , r 
= xn , f (xn ) f (xxn) , xn,1  , r
n , f (xn,1)

= en , f (xn) f (xxn) , , xn,1 

n f (xn,1) 
= en , f (xn) xfn(x, r) , xn,1 + r
n , f (xn,1)

= en , f (xn) f (xen) , en,1 
n , f (xn,1)
= n e ( f ( x n ) , f ( x n,1)) , f (xn ) (en , en,1 )
f (xn) , f (xn,1)
f ( x ) ,
= n f (xn,)1 , fe(nx,1f )(xn )
e
n n,1
  
x n ,
= f (x ) , f (x ) x n,1 en f (xn,1) , en,1 f (xn)

n n,1

xn , xn,1 
x n ,
= f (x ) , f (x ) x n,1 f (x n,1) =en,1 , f (xn ) =en e e
n n,1
n n,1 xn , xn,1
Now by Taylor's Theorem
f (xn ) = f (r) + f 0 (r)en + 21 f 00(r)e2n + O e3n
, 

= 0 + f 0 (r)en + 12 f 00 (r)e2n + O e3n


, 

So
f (xn) = f 0 (r) + 1 f 00 (r)e + O ,e2 
en 2 n n

and similarly
f (xn,1) = f 0 (r) + 1 f 00 (r)e + O ,e2 
en,1 2 n,1 n,1
1. RATE OF CONVERGENCE OF SECANT METHOD 3
So we have
f (xn) , f (xn,1) = f 0 (r) + 1 f 00(r)e  , f 0 (r) , 1 f 00(r)e  + O ,e2 
n n,1 n,1
en en,1 2 2
= 12 f 00 (r) (en , en,1 ) + O e2n,1
, 

and    1 00 
xn , xn ,1 2 f ( r )( en , en,1 )
en+1  f (x ) , f (x ) xn , xn,1 en en,1
n n,1
Now
en , en,1 = (xn , r) , (xn,1 , r) = xn , xn,1
and for xn and xn,1 suciently close to r
xn , xn,1  f 0 (r)
f (xn ) , f (xn,1)
So  
(8.1) en+1  [f 0 (r)] 12 f 00 (r) en en,1 = Cenen,1

In order to determine the order of convergence, we now suppose an asymptotic relationship of the form
jen+1 j  A jen j
This relationship also requires
jen j  A jen,1j ) jen,1 j = A,1 jen j 1=
, 

In order to be consistent with (1) we need


jen+1 j = A jen j = C jen en,1j = C jen j A,1 jen j 1=
, 

or
A jen j = CA, 1 jen j1+
1

or
A1, 1 = je j1, + a1
C n
Now the left hand side is a product of constants. Therefore the right hand side must also be constant as
n ! 1. For this to happen we need
p p
1
0= 1, + ) , ,1 = 0 ) =2 1  1 + 4 = 1  5
2 2 2
Taking the positive root (otherwise, the error terms asympotically diverge), we nd
 1:62 < 2
Thus, the rate of convergence of the secant method is superlinear, but not quadratic.
Homework Problems
1. Show that
00
en+1  2jfjf 0((rr))jj en en,1 = Cen en,1

2. Use the secant method to nd a solution of


exp(x2 , 2) = 3ln(x)
starting with x0 = 1:5; x1 = 1:4.

You might also like