Find a root of an equation `f(x)=2x^3-2x-5` using Secant method
Solution:
Here `2x^3-2x-5=0`
Let `f(x) = 2x^3-2x-5`
Here
`1^(st)` iteration :
`x_0 = 1` and `x_1 = 2`
`f(x_0) = f(1) = -5` and `f(x_1) = f(2) = 7`
`:. x_2 = x_0 - f(x_0) * (x_1 - x_0) / (f(x_1) - f(x_0))`
`x_2 = 1 - (-5) xx (2 - 1)/(7 - (-5))`
`x_2 = 1.41667`
`:. f(x_2)=f(1.41667)=2*1.41667^(3)-2*1.41667-5=-2.14699`
`2^(nd)` iteration :
`x_1 = 2` and `x_2 = 1.41667`
`f(x_1) = f(2) = 7` and `f(x_2) = f(1.41667) = -2.14699`
`:. x_3 = x_1 - f(x_1) * (x_2 - x_1) / (f(x_2) - f(x_1))`
`x_3 = 2 - 7 xx (1.41667 - 2)/(-2.14699 - 7)`
`x_3 = 1.55359`
`:. f(x_3)=f(1.55359)=2*1.55359^(3)-2*1.55359-5=-0.60759`
`3^(rd)` iteration :
`x_2 = 1.41667` and `x_3 = 1.55359`
`f(x_2) = f(1.41667) = -2.14699` and `f(x_3) = f(1.55359) = -0.60759`
`:. x_4 = x_2 - f(x_2) * (x_3 - x_2) / (f(x_3) - f(x_2))`
`x_4 = 1.41667 - (-2.14699) xx (1.55359 - 1.41667)/(-0.60759 - (-2.14699))`
`x_4 = 1.60763`
`:. f(x_4)=f(1.60763)=2*1.60763^(3)-2*1.60763-5=0.09449`
`4^(th)` iteration :
`x_3 = 1.55359` and `x_4 = 1.60763`
`f(x_3) = f(1.55359) = -0.60759` and `f(x_4) = f(1.60763) = 0.09449`
`:. x_5 = x_3 - f(x_3) * (x_4 - x_3) / (f(x_4) - f(x_3))`
`x_5 = 1.55359 - (-0.60759) xx (1.60763 - 1.55359)/(0.09449 - (-0.60759))`
`x_5 = 1.60036`
`:. f(x_5)=f(1.60036)=2*1.60036^(3)-2*1.60036-5=-0.00324`
`5^(th)` iteration :
`x_4 = 1.60763` and `x_5 = 1.60036`
`f(x_4) = f(1.60763) = 0.09449` and `f(x_5) = f(1.60036) = -0.00324`
`:. x_6 = x_4 - f(x_4) * (x_5 - x_4) / (f(x_5) - f(x_4))`
`x_6 = 1.60763 - 0.09449 xx (1.60036 - 1.60763)/(-0.00324 - 0.09449)`
`x_6 = 1.6006`
`:. f(x_6)=f(1.6006)=2*1.6006^(3)-2*1.6006-5=-0.00002`
Approximate root of the equation `2x^3-2x-5=0` using Secant method is `1.6006`
`n` | `x_0` | `f(x_0)` | `x_1` | `f(x_1)` | `x_2` | `f(x_2)` | Update |
1 | 1 | -5 | 2 | 7 | 1.41667 | -2.14699 | `x_0 = x_1` `x_1 = x_2` |
2 | 2 | 7 | 1.41667 | -2.14699 | 1.55359 | -0.60759 | `x_0 = x_1` `x_1 = x_2` |
3 | 1.41667 | -2.14699 | 1.55359 | -0.60759 | 1.60763 | 0.09449 | `x_0 = x_1` `x_1 = x_2` |
4 | 1.55359 | -0.60759 | 1.60763 | 0.09449 | 1.60036 | -0.00324 | `x_0 = x_1` `x_1 = x_2` |
5 | 1.60763 | 0.09449 | 1.60036 | -0.00324 | 1.6006 | -0.00002 | `x_0 = x_1` `x_1 = x_2` |
This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then