![]() |
VOOZH | about |
Secant method is a recursive method for finding the root of a polynomial by successive approximation.
A secant line is a straight line that intersects a curve at two distinct points. In the context of calculus, the secant line can be used to approximate the slope of the curve between those two points. The slope of the secant line is calculated as the change in the y-values divided by the change in the x-values between the two points.
For a function f(x), the secant line through the points (x0, f(x0)) and (x1, f(x1)) has the equation:
slope of secant line =
Now, weโll derive the formula for secant method. The equation of Secant line passing through two points is :
Here, m=slope
So, apply for (x1, f(x1)) and (x0, f(x0))
slope of secant line=f(x1)โf(x0)x1โx0\text{slope of secant line} = \frac{f(x_1) - f(x_0)}{x_1 - x_0}slope of secant line=x1โโx0โf(x1โ)โf(x0โ)โ
Y - f(x1) = [f(x0)-f(x1)/(x0-x1)] (x-x1) Equation (1)
As we're finding root of function f(x) so, Y= f(x) =0 in Equation (1) and the point where the secant line cut the x-axis is,
x= x1- [(x0 - x1)/ (f(x0) - f(x1)]f(x1) .
We use the above result for successive approximation for the root of function f(x). Let's say the first approximation is x=x2:
x2= x1 - [(x0 - x1)/ (f(x0)-f(x1))]f(x1)
Similarly, the second approximation would be x =x3:
x3= x2 - [(x1-x2)/ (f(x1)-f(x2))]f(x2)
And so on, till kth iteration,,
To start the solution of the function f(x) two initial guesses are required such that f(x0) < 0 and f(x1) > 0. Usually it hasn't been asked to find, that root of the polynomial f(x) at which f(x) = 0. Mostly You would only be asked by the problem to find the root of the f(x) till two decimal places or three decimal places or four etc.
Convergence in the Secant Method
The secant method will find a root of a function f if the starting points x0 and x1โ are close enough to the actual root and if the function behaves well. If the function is smooth and has a simple root (i.e., the root only occurs once), the method converges to the root at a rate related to the golden ratio:
This means the method improves quickly but not as fast as some other methods.
However, if the starting points are far from the root or if the function is not smooth enough, thereโs no guarantee the method will work. Whether the method converges depends on how "wiggly" the function is in the interval between the starting points. For example, if the functionโs derivative is zero at some point within the interval, the secant method might fail to converge.
The secant method doesnโt guarantee that the root stays within the bracketed interval, unlike the bisection method, which may cause it to not always converge. The false position method (regula falsi) is similar to the secant method but always converges, albeit at a slower, linear rate. By improving regula falsi, such as using the ITP method or Illinois method, we can achieve super-linear convergence.
The secant method approximates the derivative used in Newton's method. While Newtonโs method converges faster (order 2), it requires both the function and its derivative at each step. The secant method only requires the function, making it faster in practice, especially when computing the derivative is expensive. In higher dimensions, Newtonโs method may become more costly than the secant method.
Advantages of Secant Method:
Disadvantages of Secant Method:
Example 1:
Compute the root of the equation x2eโx/2 = 1 in the interval [0, 2] using the secant method. The root should be correct to three decimal places.
Solution -
x0 = 1.42, x1 = 1.43, f(x0) = โ 0.0086, f(x1) = 0.00034.
Apply, secant method, The first approximation is,
= 1.4296
f(x2) = โ 0.000011 (โve)
The second approximation is,
x3 = x2 โ [( x1 โ x2) / (f(x1) โ f(x2))]f(x2)
= 1.4296 โ [( 1.42 โ 1.4296) / (0.00034 โ (โ 0.000011](โ 0.000011)
= 1.4292
Since, x2 and x3 matching up to three decimal places, the required root is 1.429.
Example 2 : Given ๐ฅ2=0.25, ๐(๐ฅ2)=โ0.234375, ๐ฅ1 = 1, and ๐(๐ฅ1)=โ3, the formula for ๐ฅ3 should be
Solution: The question has two parts:
Given ๐ฅ2=0.25, ๐(๐ฅ2)=โ0.234375, ๐ฅ1 = 1, and ๐(๐ฅ1)=โ3, find the formula for x3 using the secant method.
The correct formula for x3 using the secant method is:
x3 = x2 - (x1 - x2) / (f(x1) - f(x2)) * f(x2)
x3 = 0.25 - (1 - 0.25) / (-3 - (-0.234375)) * (-0.234375)
x3 = 0.25 + (0.234375 * 0.75) / 2.765625
x3 = 0.25 + 0.063472
x3 = 0.313472
Example 3: A real root of the equation f(x) = x3 - 5x + 1 = 0 lies in the interval (0, 1). Perform four iterations of the secant method.
Solution: To perform four iterations, we need an initial guess x0. Let's use x0= 0.5.
Iteration 1: x1 = x0 - f(x0) * (x0 - xprev) / (f(x0) - f(xprev))
x1 = 0.5 - ((0.5^3 - 5 * 0.5 + 1) * (0.5 - 0)) / ((0.5^3 - 5 * 0.5 + 1) - f(0))
x1= 0.5 - (-0.625 * 0.5) / (-0.625)
x1 = 0.5 + 0.5
x1 = 1.0
Iteration 2: (Using x1 = 1.0 and x0 = 0.5)
x2 = x1 - f(x1) * (x1 - x0) / (f(x1) - f(x0))
x2 = 1.0 - (-3 * (1.0 - 0.5)) / (-3 - (-0.625))
x2 = 1.0 + (3 * 0.5) / -2.375
x2 = 1.0 - 0.63157
x2 = 0.368422
Iteration 3: (Using x2 = 0.368422 and x1 = 1.0)
x3 = x2 - f(x2) * (x2 - x1) / (f(x2) - f(x1))
x3 = 0.368422 - (-0.184097) * (0.368422 - 1.0) / (-0.184097 - (-3))
x3 = 0.368422 + (0.184097 * 0.631578) / 2.815903
x3 = 0.368422 + 0.041155
x3 = 0.409577
Iteration 4: (Using x3 = 0.409577 and x2 = 0.368422)
x4 = x3 - f(x3) * (x3 - x2) / (f(x3) - f(x2))
x4 = 0.409577 - (-0.070279) * (0.409577 - 0.368422) / (-0.070279 - (-0.184097))
x4 = 0.409577 + (0.070279 * 0.041155) / 0.113818
x4 = 0.409577 + 0.025535
x4 = 0.435112
So, after four iterations of the secant method, the approximate root is x4 = 0.435112.
Problem 1: If the function , and the initial guesses are x0=1 and x1 = 3, perform the first iteration of the secant method to find a better approximation of the root.
Problem 2: Use the secant method to approximate the root of f(x) = x3 - 2x - 5 with initial guesses x0 =2 and x1 =3. Perform 3 iterations.
Problem 3: Given the function f(x) =sinโก(x)โx/2 , and initial guesses x0 =1 and x1 =2, apply the secant method to find the root after two iterations.
Problem 4: For the equation f(x)=x2โ5x+6, apply the secant method to find the root with initial guesses x0 = 1 and x1= 2. Perform 3 iterations.
Problem 5: Consider the equation f(x)=ex โ5f(x) . Use the secant method to approximate a root, starting with x0 = 1 and x1 = 2. After 4 iterations, compare your approximation with the true root using a calculator.
Problem 6: Given the function f(x)=x3โ3x+1, what is the error in the secant method approximation after the first iteration if the actual root is known to be approximately 1.879?
What is another name for the Secant Method?
The Secant Method is also known as the Two-Point Method because it uses two previous approximations to compute the next estimate.
Does the Secant Method converge faster than the Bisection Method?
Yes, the Secant Method generally converges faster than the Bisection Method since it has a convergence rate that is higher than linear but lower than quadratic.
What is the order of convergence for the Secant Method?
The Secant Method has superlinear convergence with an order of approximately 1.618 (the golden ratio). This is faster than linear convergence (Bisection Method) but slower than quadratic convergence (Newtonโs Method).
How does the secant method differ from Newton's method?
Unlike Newton's method, which requires the calculation of the derivative of the function, the secant method approximates the derivative using two previous points. Therefore, it doesn't need the function's derivative to be known explicitly.
What happens if the initial guesses are too far apart?
If the initial guesses are too far apart or are poorly chosen, the secant method may fail to converge, or it may converge to a wrong root. The method requires that the two initial guesses be sufficiently close to each other.