Find a root of an equation `f(x)=x^3+2x^2+x-1` using Halley's method
Solution:
Here `x^3+2x^2+x-1=0`
Let `f(x) = x^3+2x^2+x-1`
`d/(dx)(x^3+2x^2+x-1)=3x^2+4x+1`
`d/(dx)(x^3+2x^2+x-1)`
`=d/(dx)(x^3)+d/(dx)(2x^2)+d/(dx)(x)-d/(dx)(1)`
`=3x^2+4x+1-0`
`=3x^2+4x+1`
`d/(dx)(3x^2+4x+1)=6x+4`
`d/(dx)(3x^2+4x+1)`
`=d/(dx)(3x^2)+d/(dx)(4x)+d/(dx)(1)`
`=6x+4+0`
`=6x+4`
`:. f'(x) = 3x^2+4x+1`
`:. f ''(x) = 6x+4`
Here
Here `f(0) = -1 < 0 and f(1) = 3 > 0`
`:.` Root lies between `0` and `1`
`x_0 = (0 + 1)/2 = 0.5`
`x_0 = 0.5`
`1^(st)` iteration :
`f(x_0)=f(0.5)=0.5^3+2*0.5^2+0.5-1=0.125`
`f'(x_0)=f'(0.5)=3*0.5^2+4*0.5+1=3.75`
`f''(x_0)=f'(0.5)=6*0.5+4=7`
`x_1=x_0-(2*f(x_0)*f'(x_0))/(2*f'(x_0)^2-f(x_0)*f''(x_0))`
`x_1=0.5-(2xx0.125xx3.75)/(2xx(3.75)^2-(3.75)xx(7))`
`x_1=0.4656`
`2^(nd)` iteration :
`f(x_1)=f(0.4656)=0.4656^3+2*0.4656^2+0.4656-1=0.0001`
`f'(x_1)=f'(0.4656)=3*0.4656^2+4*0.4656+1=3.5127`
`f''(x_1)=f'(0.4656)=6*0.4656+4=6.7936`
`x_2=x_1-(2*f(x_1)*f'(x_1))/(2*f'(x_1)^2-f(x_1)*f''(x_1))`
`x_2=0.4656-(2xx0.0001xx3.5127)/(2xx(3.5127)^2-(3.5127)xx(6.7936))`
`x_2=0.4656`
Approximate root of the equation `x^3+2x^2+x-1=0` using Halleys method is `0.4656` (After 2 iterations)
`n` | `x_0` | `f(x_0)` | `f'(x_0)` | `f''(x_0)` | `x_1` | Update |
1 | 0.5 | 0.125 | 3.75 | 7 | 0.4656 | `x_0 = x_1` |
2 | 0.4656 | 0.0001 | 3.5127 | 6.7936 | 0.4656 | `x_0 = x_1` |
This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then