Integrate (1/(x+1)) dx within the limits 0 to 4 in four parts using Simpson rule
Solution
For function f(x) with division interval [a,b] in four parts
h = (b-a)/4, x0 = a, x1 = a+h, x2 = a+2h, x3 = a+3h, x4 = b
For given integral
h = 1, x0 = 0, x1 = 1, x2 = 2, x3 = 3, x4 = 4
If fi = f(xi) = 1/(xi+1) then integral value using Simpson rule is
I = (f0+4f1+2f2+4f3+f4)/3
f0 = 1, f1 = 0.5, f2 = 0.33333, f3 = 0.25, f4 = 0.2
Therefore I = 1.622
Exact value of given integral is ln(5) = 1.609
Solution I = 1.622
Comments
Leave a comment