Home > Numerical methods > Roots of Non-Linear Equation > Secant method example

5. Secant method example ( Enter your problem )
  1. Algorithm & Example-1 `f(x)=x^3-x-1`
  2. Example-2 `f(x)=2x^3-2x-5`
  3. Example-3 `x=sqrt(12)`
  4. Example-4 `x=root(3)(48)`
  5. Example-5 `f(x)=x^3+2x^2+x-1`

5. Example-5 `f(x)=x^3+2x^2+x-1`





Find a root of an equation `f(x)=x^3+2x^2+x-1` using Secant method

Solution:
Here `x^3+2x^2+x-1=0`

Let `f(x) = x^3+2x^2+x-1`

Here
`x`01
`f(x)`-13



`1^(st)` iteration :

`x_0 = 0` and `x_1 = 1`

`f(x_0) = f(0) = -1` and `f(x_1) = f(1) = 3`

`:. x_2 = x_0 - f(x_0) * (x_1 - x_0)/(f(x_1) - f(x_0))`

`x_2 = 0 - (-1) * (1 - 0)/(3 - (-1))`

`x_2 = 0.25`

`:. f(x_2)=f(0.25)=0.25^3+2*0.25^2+0.25-1=-0.6094`


`2^(nd)` iteration :

`x_1 = 1` and `x_2 = 0.25`

`f(x_1) = f(1) = 3` and `f(x_2) = f(0.25) = -0.6094`

`:. x_3 = x_1 - f(x_1) * (x_2 - x_1)/(f(x_2) - f(x_1))`

`x_3 = 1 - 3 * (0.25 - 1)/(-0.6094 - 3)`

`x_3 = 0.3766`

`:. f(x_3)=f(0.3766)=0.3766^3+2*0.3766^2+0.3766-1=-0.2863`


`3^(rd)` iteration :

`x_2 = 0.25` and `x_3 = 0.3766`

`f(x_2) = f(0.25) = -0.6094` and `f(x_3) = f(0.3766) = -0.2863`

`:. x_4 = x_2 - f(x_2) * (x_3 - x_2)/(f(x_3) - f(x_2))`

`x_4 = 0.25 - (-0.6094) * (0.3766 - 0.25)/(-0.2863 - (-0.6094))`

`x_4 = 0.4888`

`:. f(x_4)=f(0.4888)=0.4888^3+2*0.4888^2+0.4888-1=0.0835`


`4^(th)` iteration :

`x_3 = 0.3766` and `x_4 = 0.4888`

`f(x_3) = f(0.3766) = -0.2863` and `f(x_4) = f(0.4888) = 0.0835`

`:. x_5 = x_3 - f(x_3) * (x_4 - x_3)/(f(x_4) - f(x_3))`

`x_5 = 0.3766 - (-0.2863) * (0.4888 - 0.3766)/(0.0835 - (-0.2863))`

`x_5 = 0.4635`

`:. f(x_5)=f(0.4635)=0.4635^3+2*0.4635^2+0.4635-1=-0.0073`


`5^(th)` iteration :

`x_4 = 0.4888` and `x_5 = 0.4635`

`f(x_4) = f(0.4888) = 0.0835` and `f(x_5) = f(0.4635) = -0.0073`

`:. x_6 = x_4 - f(x_4) * (x_5 - x_4)/(f(x_5) - f(x_4))`

`x_6 = 0.4888 - 0.0835 * (0.4635 - 0.4888)/(-0.0073 - 0.0835)`

`x_6 = 0.4655`

`:. f(x_6)=f(0.4655)=0.4655^3+2*0.4655^2+0.4655-1=-0.0002`


Approximate root of the equation `x^3+2x^2+x-1=0` using Secant method is `0.4655` (After 5 iterations)

`n``x_0``f(x_0)``x_1``f(x_1)``x_2``f(x_2)`Update
10-1130.25-0.6094`x_0 = x_1`
`x_1 = x_2`
2130.25-0.60940.3766-0.2863`x_0 = x_1`
`x_1 = x_2`
30.25-0.60940.3766-0.28630.48880.0835`x_0 = x_1`
`x_1 = x_2`
40.3766-0.28630.48880.08350.4635-0.0073`x_0 = x_1`
`x_1 = x_2`
50.48880.08350.4635-0.00730.4655-0.0002`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 Submit Here





Share this solution or page with your friends.
 
 
Copyright © 2026. All rights reserved. Terms, Privacy
 
 

.