ISAT U CEA
Chapter 9: Secant Method
OBJECTIVES:
After this chapter the student are expected to learn the easy and effective way in
finding the values of the unknown variables using the secant method and will learn how
to use secant method using excel or libre office.
DISCUSSION:
Secant method an iterative method for finding a root of the nonlinear equation. The /
f (x i )
derivative is sometimes difficult to evaluate by the computer program. It may be replaced
by a backward finite divided difference. Convergence is ultimately less rapid than for
Newton’s method, but it can be overall more efficient on some problems since derivatives
are not required.
f (x i ) f (x i 1 )
f / (x i )
x i x i 1
Thus, the formula predicting the xi+1 is:
f ( xi )( xi 1 xi )
xi 1 xi
f ( xi 1 ) f ( xi )
The Secant Method
• Requires two initial estimates of x, e.g, xo, x1. However, because f(x) is
not required to change signs between estimates, it is not classified as a
“bracketing” method.
• The scant method has the same properties as Newton’s method.
Convergence is not guaranteed for all xo, x1, f(x).
1|P a ge
ISAT U CEA
• In the numerical analysis, the secant method is a root finding algorithm
that uses a succession of roots of secant lines to better approximate a
root of a function f. the secant method can be thought of as a finite
difference approximation of Newton’s method. However, the method was
develop independently of Newton’s method and predates it by over 3,000
years
Comparison with other root-finding methods
The secant method does not require that the root remain bracketed like the
bisection method does, and hence it does not always converge
Comparison of the true percent relative
Errors Et for the methods to the determine
the root of f(x)=e-x-x
2|P a ge
ISAT U CEA
Comparison of convergence of False Position and Secant Methods
False Position Secant Method
f (x u )(x l x u ) f (x i )(x i 1 x i )
x r xu x i 1 x i
f (x l ) f (x u ) f (x i 1 ) f (x i )
Use two estimate xl and xu Use two estimate xi and xi-1
f(x) must changes signs between xl and f(x) is not required to change signs
xu between xi and xi-1
Xr replaces whichever of the original Xi+1 replace xi
values yielded a function value with the
Xi replace xi-1
same sign as f(xr)
Always converge May be diverge
Slower convergence than Secant in case If converges, It does faster then False
the secant converges. Position
SAMPLE PROBLEM:
1. Use the Secant method to find the root of e-x-x=0; f(x) = e-x-x and xi-1=0,
x0=1 to get x1 of the first iteration using:
f ( xi )( xi 1 xi )
xi 1 xi
f ( xi 1 ) f ( xi )
iter xi-1 f(xi-1) xi f(xi) xi+1 et%
1 0 1 1 -0.63 0.613 8
3|P a ge
ISAT U CEA
2 1 -0.63 0.613 -0.07 0.564 0.58
3 0.613 -0.07 0.564 0.005 0.567 0.005
In excel or libre office first you need to type this format;
i xi f(xi) xi-1 f(xi-1) xi+1 f(xi+1) e
- -
0 1 0.63212 0 1 0.6127 0.07081 0.070814
The f(xi) is function of xi and e = absolute value of f(xi+1)
The next and final step in the 1st iteration xi = to xi-1 and xi-1 equals to xi+1 then drag
it down to get an answer shown below.
i xi f(xi) xi-1 f(xi-1) xi+1 f(xi+1) e
0 1 -0.63212 0 1 0.6127 -0.07081 0.070814
1 0 1 0.6127 -0.07081 0.572181 -0.00789 0.007888
2 0.6127 -0.07081 0.572181 -0.00789 0.567102 6.46E-05 6.46E-05
3 0.572181 -0.00789 0.567102 6.46E-05 0.567143 -5.9E-08 5.88E-08
4 0.567102 6.46E-05 0.567143 -5.9E-08 0.567143 -4.4E-13 4.39E-13
5 0.567143 -5.9E-08 0.567143 -4.4E-13 0.567143 0 0
And the answer is 0.567143
2. Use the false-position and secant method to find the root of f(x)=lnx. Start
computation with xl= xi-1=0.5, xu=xi = 5.
False position method
Iter xl xu xr
1 0.5 5.0 1.8546
2 0.5 1.8546 1.2163
3 0.5 1.2163 1.0585
4|P a ge
ISAT U CEA
Secant method
Iter xi-1 xi xi+1
1 0.5 5.0 1.8546
2 5 1.8546 -0.10438
APPLICATION:
1. Use the Secant method to find the root of; f(x) = (.05) (x)-sin(x) and xi-1=2.5, x0=2
2. Use the Secant method to find the root of f(x) = x^5-11^4+46^3-90^2+81x+27
3. Use the Secant method to find the root of f(x) = X^2-3
4. Use the Secant method to find the root of f(x) = X^2-4
5|P a ge