3. Find Solution of an equation x^3-2x+1 using Simpson's 1/3 rule
x1 = 2 and x2 = 4
Step value (h) = 0.5Solution:Equation is `f(x)=x^3-2x+1`.
The value of table for `x` and `y`
| x | 2 | 2.5 | 3 | 3.5 | 4 |
|---|
| y | 5 | 11.625 | 22 | 36.875 | 57 |
|---|
Method-1:Using Simpsons `1/3` Rule
`int y dx=h/3 [(y_0+y_4)+4(y_1+y_3)+2(y_2)]`
`int y dx=0.5/3 [(5 +57)+4xx(11.625+36.875)+2xx(22)]`
`int y dx=0.5/3 [(5 +57)+4xx(48.5)+2xx(22)]`
`int y dx=0.5/3 [(62)+(194)+(44)]`
`int y dx=50`
Solution by Simpson's `1/3` Rule is `50`
Method-2:Using Simpsons `1/3` Rule
`int y dx=h/3 [y_0+4y_1+2y_2+4y_3+y_4]`
`y_0=5`
`4y_1=4*11.625=46.5`
`2y_2=2*22=44`
`4y_3=4*36.875=147.5`
`y_4=57`
`int y dx=0.5/3*(5+46.5+44+147.5+57)`
`int y dx=0.5/3*(300)`
`int y dx=50`
Solution by Simpson's `1/3` Rule is `50`
This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then