Approximate the integral
∫08(x2−x+3)dxwith n=8 using the Simpson's rule.
∫abf(x)dx≈3Δx(f(x0)+4f(x1)+2f(x2)+...
+2f(xn−2)+4f(xn−1+f(xn)) where Δx=nb−a
We have that a=0,b=8,n=8. Therefore Δx=88−0=1.
Divide the interval[0,8]into n=8 subintervals of the length Δx=1 with the following endpoints: a=0,1,2,3,4,5,6,7,8=b.
Now, just evaluate the function at these endpoints.
f(x0)=f(0)=3
4f(x1)=4f(1)=12
2f(x2)=2f(2)=10
4f(x3)=4f(3)=36
2f(x4)=2f(4)=30
4f(x5)=4f(5)=92
2f(x6)=2f(6)=66
4f(x7)=4f(7)=180
f(x8)=f(8)=59
31(3+12+10+36+30+92+66+180+59)
=3488≈162.6667
∫08(x2−x+3)dx≈3488≈162.6667
Comments
Leave a comment