Find a root of an equation `f(x)=x^3+2x^2+x-1` using Muller method
Solution:
Here `x^3+2x^2+x-1=0`
Let `f(x) = x^3+2x^2+x-1`
Here
`x_0 = 0`
`x_1 = 1`
`x_2 = 0.5`
`1^(st)` iteration :
`f(x_0)=f(0)=0^3+2*0^2+0-1=-1`
`f(x_1)=f(1)=1^3+2*1^2+1-1=3`
`f(x_2)=f(0.5)=0.5^3+2*0.5^2+0.5-1=0.125`
`h_1=x_1-x_0=1-0=1`
`h_2=x_2-x_1=0.5-1=-0.5`
`delta_1=(f(x_1)-f(x_0))/h_1=(3--1)/1=4`
`delta_2=(f(x_2)-f(x_1))/h_2=(0.125-3)/-0.5=5.75`
`a=(delta_2-delta_1)/(h_2+h_1)=(5.75-4)/(-0.5+1)=3.5`
`b=a xx h_2 + d_2=3.5xx-0.5+5.75=4`
`c=f(x_2)=0.125`
`x_3=x_2+(-2c)/(b +- sqrt(b^2-4ac))`
`x_3=x_2+(-2c)/(b +sign(b) sqrt(b^2-4ac))`
`=0.5+(-2 xx 0.125)/(4 + sqrt(4^2 - 4xx 3.5 xx 0.125))`
`=0.5+(-0.25)/(4 + sqrt(14.25))`
`=0.5+(-0.25)/(4 + 3.7749)`
`=0.4678`
Relative percent error
`varepsilon_(a^1)=|(x_3-x_2)/x_3| xx 100%=|(0.4678-0.5)/0.4678| xx 100%=6.8729%`
Now,
`x_0=x_1=1`
`x_1=x_2=0.5`
`x_2=x_3=0.4678`
`2^(nd)` iteration :
`f(x_0)=f(1)=1^3+2*1^2+1-1=3`
`f(x_1)=f(0.5)=0.5^3+2*0.5^2+0.5-1=0.125`
`f(x_2)=f(0.4678)=0.4678^3+2*0.4678^2+0.4678-1=0.008`
`h_1=x_1-x_0=0.5-1=-0.5`
`h_2=x_2-x_1=0.4678-0.5=-0.0322`
`delta_1=(f(x_1)-f(x_0))/h_1=(0.125-3)/-0.5=5.75`
`delta_2=(f(x_2)-f(x_1))/h_2=(0.008-0.125)/-0.0322=3.6385`
`a=(delta_2-delta_1)/(h_2+h_1)=(3.6385-5.75)/(-0.0322+-0.5)=3.9678`
`b=a xx h_2 + d_2=3.9678xx-0.0322+3.6385=3.5109`
`c=f(x_2)=0.008`
`x_3=x_2+(-2c)/(b +- sqrt(b^2-4ac))`
`x_3=x_2+(-2c)/(b +sign(b) sqrt(b^2-4ac))`
`=0.4678+(-2 xx 0.008)/(3.5109 + sqrt(3.5109^2 - 4xx 3.9678 xx 0.008))`
`=0.4678+(-0.016)/(3.5109 + sqrt(12.1994))`
`=0.4678+(-0.016)/(3.5109 + 3.4928)`
`=0.4656`
Relative percent error
`varepsilon_(a^2)=|(x_3-x_2)/x_3| xx 100%=|(0.4656-0.4678)/0.4656| xx 100%=0.491%`
Now,
`x_0=x_1=0.5`
`x_1=x_2=0.4678`
`x_2=x_3=0.4656`
`3^(rd)` iteration :
`f(x_0)=f(0.5)=0.5^3+2*0.5^2+0.5-1=0.125`
`f(x_1)=f(0.4678)=0.4678^3+2*0.4678^2+0.4678-1=0.008`
`f(x_2)=f(0.4656)=0.4656^3+2*0.4656^2+0.4656-1=0`
`h_1=x_1-x_0=0.4678-0.5=-0.0322`
`h_2=x_2-x_1=0.4656-0.4678=-0.0023`
`delta_1=(f(x_1)-f(x_0))/h_1=(0.008-0.125)/-0.0322=3.6385`
`delta_2=(f(x_2)-f(x_1))/h_2=(0-0.008)/-0.0023=3.5202`
`a=(delta_2-delta_1)/(h_2+h_1)=(3.5202-3.6385)/(-0.0023+-0.0322)=3.4334`
`b=a xx h_2 + d_2=3.4334xx-0.0023+3.5202=3.5124`
`c=f(x_2)=0`
`x_3=x_2+(-2c)/(b +- sqrt(b^2-4ac))`
`x_3=x_2+(-2c)/(b +sign(b) sqrt(b^2-4ac))`
`=0.4656+(-2 xx 0)/(3.5124 + sqrt(3.5124^2 - 4xx 3.4334 xx 0))`
`=0.4656+(0.0001)/(3.5124 + sqrt(12.3375))`
`=0.4656+(0.0001)/(3.5124 + 3.5125)`
`=0.4656`
Relative percent error
`varepsilon_(a^3)=|(x_3-x_2)/x_3| xx 100%=|(0.4656-0.4656)/0.4656| xx 100%=0.0026%`
Approximate root of the equation `x^3+2x^2+x-1=0` using Muller method is `0.4656` (After 3 iterations)
`n` | `x_0` | `x_1` | `x_2` | `f(x_0)` | `f(x_1)` | `f(x_2)` | `a` | `b` | `c` | `x_3` | `varepsilon_(a^n` |
1 | 0 | 1 | 0.5 | -1 | 3 | 0.125 | 3.5 | 4 | 0.125 | 0.4678 | 6.8729 |
2 | 1 | 0.5 | 0.4678 | 3 | 0.125 | 0.008 | 3.9678 | 3.5109 | 0.008 | 0.4656 | 0.491 |
3 | 0.5 | 0.4678 | 0.4656 | 0.125 | 0.008 | 0 | 3.4334 | 3.5124 | 0 | 0.4656 | 0.0026 |
This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then