The midpoint rule (also known as the midpoint approximation) uses the midpoints of a subinterval:
∫abf(x)dx≈Δx(f(2x0+x1)+f(2x1+x2)+f(2x2+x3)+⋯+f(2xn−2+xn−1)+f(2xn−1+xn))
where Δx=nb−a
We have that f(x)=1−x2,a=−1,b=1, and n=4
Therefore, Δx=41−(−1)=21
Divide the interval [−1,1] into n=4 subintervals of the length Δx=21 with the following endpoints: a=−1,−21,0,21,1=b
Now, just evaluate the function at the midpoints of the subintervals.
f(2x0+x1)=f(2−1−21)=f(−43)=167=0.4375f(2x1+x2)=f(2−21+0)=f(−41)=1615=0.9375f(2x2+x3)=f(20+21)=f(41)=1615=0.9375f(2x3+x4)=f(221+1)=f(43)=167=0.4375
Finally, just sum up the above values and multiply by Δx=21:
21(0.4375+0.9375+0.9375+0.4375)=1.375
Comments