ADVANCED MATHEMATICS FOR M.E.
NUMERICAL METHODS FOR ROOT FINDING PROBLEMS
Topic 7: Secant Method
Background
Secant method uses two initial estimates but does not required
that they must bracket the root. It can use two points x1 and x2 as
shown in the figure below as starting values although they do not
bracket the root.
Slope of secant line passing through x1 and x2 is:
On rearranging the terms, we get:
On adding and subtracting f(x2)x2 at the numerator, equation (i)
can be represented in the form:
Hence, the approximate value of the root can be refined by
repeating the process
to the desired level of accuracy.
ADVANCED MATHEMATICS FOR M.E.
So, in general:
Algorithm:
1. Decide the initial points: x1 and x2 and EPS.
2. Compute: f1 = f(x1) and f2 = f(x2)
3. Compute:
4. Test for accuracy of x3: if
then: Set (x1 = x2, f1 = f2) and set (x2 = x3, f2 = f(x3)); go to step 3,
otherwise set root = x3.
5. Print root
6. Stop
Illustrative Example
Use Secant Method to estimate the root of the equation x2 –
4x -10 = 0, with initial estimate x1 = 4 and x2 = 2.
Solution:
x1 = 4, f(x1) = f1 = 42 – 4*4 – 10 = -10
x2 = 2, f(x1) = f1 = 22 – 4*2 – 10 = -14
Let EPS = 0.05
ADVANCED MATHEMATICS FOR M.E.
For the better estimation, we have the tabular data as below:
Hence, the root is: 5.7225, which is less than EPS = 0.05
𝑥3 −𝑥2
Where EPS =| | and in each iteration:
𝑥2
x1 = x2, f1 = f2 and x2 = x3, f2 = f(x3).
Comparison of Secant Iterative Formula with Newton
Raphson Formula:
We have, Newton Raphson Formula:
(i)
And Secant Iterative Formula:
(ii)
Comparing equation (i) and (ii):
Hence, the major advantage of Secant Method of iteration is no
need to evaluate the derivative.
ADVANCED MATHEMATICS FOR M.E.
Convergence of Secant Method:
We have, Secant Iterative Formula:
If xr be the actual root of f(x) and ei be the error in estimate of xi,
then:
xn+1 = en+1 + xr
xn = en + x r
xn-1 = en-1 + xr
Now, rewriting equation (i) in terms of error with these values, we
get:
According to Mean Value Theorem, if x = Rn lie in the interval xn
and xr, then:
As obvious: f(xr) = 0 and xn – xr = en. Therefore, equation (ii)
becomes:
Similarly:
Substituting these values in the numerator of equation (ii), we get:
ADVANCED MATHEMATICS FOR M.E.
As we also know that, if the order of convergence of an iterative
process is P, then:
i.e.
Now, from equation (iv) and (v):
Finally, from equation (vi) and (vii):
So, the order of convergence of Secant Method is 1.618, which is
a slow rate (<2). It also requires previous two iterative to estimate
the new one. These are recognized as drawbacks of Secant
Method.
Lecture Worksheet 8
Find the roots of the equation via Secant Method
using Excel. Attach the solution in excel file.
Tolerance of error is at 0.001%
1. 𝑓 (𝑥 ) = 𝑥 3 + 2𝑥 2 − 3𝑥 − 1(𝑥𝑖−1 = 1) (𝑥𝑖 = 2)
2. 𝑓 (𝑥 ) = 𝑒 𝑥 − 𝑐𝑜𝑠𝑥 − 2 (𝑥𝑖−1 = 8)(𝑥𝑖 = 3)
2
𝑥
3. 𝑓 (𝑥 ) = 𝑒 3 − 𝑥2 − 1 (𝑥𝑖−1 = 8)(𝑥𝑖 = 5)