Secant Method
Introduction
Definition
The Secant Method is an open method for solving nonlinear equations of the form
f (x) = 0.
It is a slight variation of the Newton–Raphson method used when the derivative f ′ (x) is difficult
or inconvenient to evaluate.
Main Idea
Instead of using the exact derivative, the Secant Method approximates the derivative by using
the slope of the straight line passing through two nearby points on the function.
Why Secant Method is Needed
Motivation
The Newton–Raphson method uses
f (xi )
xi+1 = xi − .
f ′ (xi )
But in many practical problems, the derivative f ′ (x) may:
• be difficult to calculate,
• be tedious to simplify,
• increase computational cost.
In such cases, the Secant Method provides a good alternative.
Basic Idea
Derivative Approximation
The derivative at xi is approximated by the backward finite divided difference:
f (xi ) − f (xi−1 )
f ′ (xi ) ≈ .
xi − xi−1
Substituting this into Newton’s formula gives the Secant iteration formula.
1
Secant Formula
Main Secant Formula
f (xi )(xi − xi−1 )
xi+1 = xi −
f (xi ) − f (xi−1 )
Important
To estimate xi+1 , the method uses two previous points:
(xi−1 , f (xi−1 )) and (xi , f (xi )).
So unlike Newton–Raphson, the Secant Method needs two initial guesses.
Geometrical Interpretation
Geometric Meaning
Take two points on the curve,
(xi−1 , f (xi−1 )) and (xi , f (xi )).
Draw the straight line joining them. The x-intercept of this secant line gives the next approximation
xi+1 .
f (x)
x
xxi−1
i+1 xi
Figure 1: The secant line through two points cuts the x-axis at the next estimate.
2
Alternative Forms of the Formula
Equivalent Forms
The next value may be written in several equivalent forms:
f (xi )(xi − xi−1 )
xi+1 = xi −
f (xi ) − f (xi−1 )
or
f (xi−1 )(xi − xi−1 )
xi+1 = xi−1 −
f (xi ) − f (xi−1 )
or
xi−1 f (xi ) − xi f (xi−1 )
xi+1 = .
f (xi ) − f (xi−1 )
Nature of the Method
Important Property
Although two initial values are used, the Secant Method is still not a bracketing method,
because f (x0 ) and f (x1 ) do not necessarily need opposite signs.
Convergence Warning
Like Newton–Raphson, convergence is not guaranteed for all choices of x0 and x1 .
Algorithm
Step-by-Step Procedure
1. Choose two initial estimates x0 and x1 .
2. Evaluate f (x0 ) and f (x1 ).
3. Compute the next approximation using
f (x1 )(x1 − x0 )
x2 = x1 − .
f (x1 ) − f (x0 )
4. Replace the old values:
x0 ← x1 , x1 ← x2 .
5. Repeat until:
f (xi ) = 0 or |f (xi )| ≤ desired accuracy.
3
Error Formula
Absolute Relative Approximate Error
xi+1 − xi
εa = × 100%
xi+1
Stopping Criterion
The iteration is usually stopped when the approximate relative error becomes smaller than the
specified tolerance.
Worked Example 1
Problem
Find a root of
f (x) = x3 − x − 1
using the Secant Method.
Initial Data
Take
x0 = 1, x1 = 2.
Then
f (1) = 13 − 1 − 1 = −1
and
f (2) = 23 − 2 − 1 = 5.
Iteration 1
Using
f (x0 )(x1 − x0 )
x2 = x0 − ,
f (x1 ) − f (x0 )
we get
(−1)(2 − 1)
x2 = 1 −
5 − (−1)
1
x2 = 1 + = 1.16667.
6
Now,
f (x2 ) = f (1.16667) = 1.166673 − 1.16667 − 1 ≈ −0.5787.
Iteration 2
Now use
x1 = 2, x2 = 1.16667.
Then
f (x1 )(x2 − x1 )
x3 = x1 − .
f (x2 ) − f (x1 )
4
So,
5(1.16667 − 2)
x3 = 2 − .
−0.5787 − 5
5(−0.83333)
x3 = 2 − = 1.25311.
−5.5787
Now,
f (x3 ) = f (1.25311) ≈ −0.28536.
Iteration 3
Now use
x2 = 1.16667, x3 = 1.25311.
Then
f (x2 )(x3 − x2 )
x4 = x2 − .
f (x3 ) − f (x2 )
So,
(−0.5787)(1.25311 − 1.16667)
x4 = 1.16667 − .
−0.28536 − (−0.5787)
x4 = 1.33721.
And
f (x4 ) = f (1.33721) ≈ 0.05388.
Further Iteration Values
From the slide data,
x5 = 1.32385, f (x5 ) ≈ −0.0037
and
x6 = 1.32471, f (x6 ) ≈ −0.00004.
Final Answer
Thus, the root is approximately
x ≈ 1.32471 .
Iteration Summary Table
Iteration Estimate Function Remark
Value
1 x2 = −0.5787 first secant estimate
1.16667
2 x3 = −0.28536 closer to root
1.25311
3 x4 = 0.05388 crossed root region
1.33721
4 x5 = −0.0037 very close
1.32385
5 x6 = −0.00004 near-final root
1.32471
5
Worked Example 2: Floating Ball Problem
Problem
Apply the Secant Method to the floating ball equation
f (x) = x3 − 0.165x2 + 3.993 × 10−4 .
Assume the initial guesses
x−1 = 0.02, x0 = 0.05.
Iteration 1
Using the secant formula,
f (x0 )(x0 − x−1 )
x1 = x0 − .
f (x0 ) − f (x−1 )
Substituting the given values,
f (0.05)(0.05 − 0.02)
x1 = 0.05 − .
f (0.05) − f (0.02)
From the slide result,
x1 = 0.06461.
The absolute relative approximate error at the end of Iteration 1 is
εa = 22.62%.
Iteration 2
Using the updated pair of values, the next approximation becomes
x2 = 0.06241.
The absolute relative approximate error is
εa = 3.525%.
Iteration 3
The next approximation is
x3 = 0.06238.
The absolute relative approximate error is
εa = 0.0595%.
Final Answer
So the submerged depth is approximately
x ≈ 0.06238 m .
6
Iteration Table
Iteration Previous Current New Approximate Error
i Guess Guess Estimate
1 0.02 0.05 0.06461 22.62%
2 0.05 0.06461 0.06241 3.525%
3 0.06461 0.06241 0.06238 0.0595%
4 0.06241 0.06238 0.06238 very small
Properties of the Secant Method
Main Properties
• Requires two initial guesses.
• Does not need derivative evaluation.
• Usually faster than Bisection.
• Has behavior similar to Newton–Raphson.
• Convergence is not guaranteed for all starting values.
Advantages
Advantages
1. No need to compute f ′ (x).
2. Simpler than Newton–Raphson when derivatives are hard.
3. Usually faster than Bisection and False Position.
4. Gives good accuracy with fewer iterations in many cases.
Disadvantages
Disadvantages
1. Needs two starting values.
2. Convergence is not guaranteed.
3. May diverge for poor initial guesses.
4. Less robust than bracketing methods such as Bisection.
7
Comparison with Newton–Raphson Method
Secant vs Newton
• Newton–Raphson uses the exact derivative f ′ (x).
• Secant uses an approximate derivative based on two points.
• Newton generally converges faster.
• Secant is more useful when derivative evaluation is difficult.
Important Exam Points
Remember
1. Secant Method is an open method.
2. It is a derivative-free version of Newton–Raphson.
3. It uses two previous points:
(xi−1 , f (xi−1 )) and (xi , f (xi )).
4. Main formula:
f (xi )(xi − xi−1 )
xi+1 = xi − .
f (xi ) − f (xi−1 )
5. It does not require f (x0 ) and f (x1 ) to have opposite signs.
6. Convergence is not guaranteed.
7. It is generally faster than bisection but less robust.
Final Summary
One-box summary
Secant Method is an open method for solving f (x) = 0.
It approximates the derivative using two nearby points.
f (xi )(xi − xi−1 )
xi+1 = xi −
f (xi ) − f (xi−1 )
It needs two initial guesses and does not require f ′ (x).
It is usually faster than bisection but less robust.
Its convergence is similar to Newton’s method, but not guaranteed for all guesses.