Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 5

Chapter 2

Solution of Nonlinear Equations:


Lecture (III)

Dr. Jie Zou PHY 3320 1


Outline
 Numerical methods
(3) Secant method

Dr. Jie Zou PHY 3320 2


Secant method
f  xi   f  xi 1   Secant method algorithm: An
f  xi   approximation to the derivative:
xi  xi 1
f  xi   xi  xi 1 
xi 1  xi   xi  f  xi    , i  2, 3, 4 
f  xi   f  xi   f  xi 1  
1. Start with two initial guesses x1
and x2 and . set i = 2.
2. Find the new approximation, xi+1.
 xi  xi 1 
 
xi 1  xi  f xi  
 f  xi   f  x 
i 1 

3. Verify the convergence. If |


f(xi+1)|, stop the process by
taking xi+1 as the root.
Otherwise, set i=i+1 and go to
Dr. Jie Zou PHY 3320 step 2. 3
Notes on Secant method
 Secant method is
similar to Newton’s
method but uses a
back-ward finite-
difference
approximation for the
derivative, f’(x).
 Secant method may
not converge (see an
example on the left).

Dr. Jie Zou PHY 3320 4


Example: Secant method
 Example 2.14: Find the root of the
equation
1.5 x  1  0.65 x
f  x  1
 0.65 tan    0
1  x 
2 2
 x  1 x
2

using Secant method with two initial


guesses xl = 0.0 and x2 = 0.5 and the
convergence criterion, |f(xi)|   with 
= 10-5.
Dr. Jie Zou PHY 3320 5

You might also like