The Secant Method - Peoplepeople.sc.fsu.edu/~inavon/5420a/Secant4.pdf · Finally, there is a...
Transcript of The Secant Method - Peoplepeople.sc.fsu.edu/~inavon/5420a/Secant4.pdf · Finally, there is a...
The Secant Method
We can obtain this from Newton's method by replacing the tangent slope f'(x)
by the chord or secant slope ( ) ( )f x f x h
h− −
. Using a Taylor expansion of f
about x, we find 2
( ) ( ) ( ) ( )( ) ( ) 2hf x hf x f x h f xf x f x h
h h
ϑ′ ′′− + + −− −= = ( ) ( )
2hf x f x hϑ′ ′′+ +
so that the error is O(h) if f'' is bounded. The obvious choice for h is so that if x=xn, the n-th iterate, 1nx h x −− = , the previous iterate. Putting this into Newton's method, we obtain
a formula that does need two starting values. The formula can be written with a common denominator as
1 11
1
( ) ( )( ) ( )
n n n nn
n n
x f x x f xxf x f x
− −+
−
−=
−
(2) which is recognizable as the formula for inverse interpolation, that is, it linearly interpolates the values of f at xn and xn-1 to approximate the value of x at which f vanishes. This form should not be used in practical evaluation, since it computes the ratio of two quantities that are liable to be differences of nearly equal numbers. This formulation suggests a variant of the method, in which convergence is guaranteed provided starting values can be found for which the values of f are opposite in sign. This is defined by
1( ) ( )( ) ( )
m n n mn
n m
x f x x f xxf x f x+
−=
−
where m≤n is the greatest index for which sgn sgnm nf f≠ . Convergence is guaranteed because there is always a zero of f between xn and xm. The rate of convergence is better than linear, but not as good as that of the original secant method. Example Evaluate. 15
We use the secant method to solve the equation x2-15=0. The secant formula is
2 21
1 2 21 1
( 15)( ) 15n n n nn n n
n n n n
x x x xx x xx x x
−+ x− −
− − −= − = −
− +
Starting with x0=3, x1=4, we calculate to 9D successively x2=3.857142857, x4=3.872983871, x5=3.872983347,x6=3.872983347.
This looks nearly as good as Newton's method, but our starting values were fairly close.
Convergence Rate of Secant Method
Subtracting from both sides of equation of the secant method, we find
[ ] [ ][ ]
[ ][ ]
1 11
1
1 1
1
1 1
1 1
11
1
( ) ( ) ( ) ( )( ) ( )
( )( ( ) ( )) ( )( ( ) ( ))( ) ( )
( )( ) , ( )( ) ,( ) ,
, ,( )( ) ,
(
n n n nn
n n
n n n n
n n
n n n n n n
n n n n
n nn n
n n
n
x f x x f xxf x f x
x f x f x f x ff x f x
x x f x x x f xx x f x x
f x xx x f x x
x
1
α αα
α α α α
α α α α α α
αα α
α
− −+
−
− −
−
− −
− −
−−
−
− − −− = =
−− − − − −
=−
− − − − −=
−
− − =
−
−
1( ))( )( )
nn
n
fxfξαη−
′′−
′
1 1
1 2 22
1 2 2
11 2 0
( )n n n
n n n
n n n
n nn n
u c quc q c quc qc q u
c qc q c q u
− −
− − −
− − −
−− −
= += + +
= + +=
= + + + +… 0
with values of ,n αξ η in appropriate intervals. Set
for 0,1,n = … ; then
Increasing each subscript by 1, taking logs and setting log , logn n nv e c κ n= = , we obtain the difference equation
n+2 n+1 n nv -v -v =c . We use the displacement operator, E, defined by to write this as
or ( where: n n+Ev =v 1
2n n(E -E-1)v =c , n n(E-q)(E-p)v =c ,
1 5
21 5
2
p
q
+=
−=
.
Now set
(E-p)vn=un, (3) whence we obtain
1 1
1 2 22
1 2 2
11 2 0
( )n n n
n n n
n n n
n nn n
u c quc q c quc qc q u
c qc q c q u
− −
− − −
− − −
−− −
= += + +
= + +=
= + + + +… 0
0).
n
Putting this back into ( ), we find
11 1 2 0 1(n n
n n n nv pv c qc q c q v pv−+ − −− = − + + + −…
Provided that the 1, 0,1, ,ic i c −= … are all of the same sign, the first n terms of the right hand side form an alternating series, since -1<q<0, and so
, say, where1n nv pv+ − → L L < ∞ , which gives
This gives the order of the secant method as 1 5 1.618
2p += ≅ ; As we had
suspected, the rate of convergence is somewhere between linear and second order. In order to be sure that are of the same sign, we need 1 2, , , nc c c…
1 2, , , nκ κ κ… to be all greater than 1 or all less than 1. Since( )( )n
ffακα
′′→
′, we
can achieve this by starting with an x0 sufficiently near to . Finally, there is a classical variant of the secant method, which is defined by
0 01
0
( ) ( )( ) ( )n n
nn
x f x x f xxf x f x+
−=
−
Here the first and last values of the iterate are used. Following through the convergence analysis above, we find
1 01 (( )( )2 (n n
fx x xf
))
ξα α αη+
′′− = − −
′
which shows that the convergence is only linear.