Numerical Integration: Trapezoidal & Simpson's Rules

25 min
0/4 practice checks

When an integral abf(x)dx\int_a^b f(x)\, dx has no elementary antiderivative, we approximate it.

Trapezoidal rule (single application): replace the curve by a straight line across [a,b][a, b]:

abfdxba2(f(a)+f(b)).\int_a^b f\, dx \approx \frac{b - a}{2}\big(f(a) + f(b)\big).

With nn equal strips of width h=banh = \tfrac{b-a}{n}:   h2(f0+2f1++2fn1+fn).\;\dfrac{h}{2}\big(f_0 + 2f_1 + \cdots + 2f_{n-1} + f_n\big).

Simpson's rule (needs an even number of strips) fits parabolas instead of straight lines:

h3(f0+4f1+2f2+4f3++fn).\frac{h}{3}\big(f_0 + 4f_1 + 2f_2 + 4f_3 + \cdots + f_n\big).

Worked example. For 02x2dx\int_0^2 x^2\, dx (exact value 832.667\tfrac{8}{3} \approx 2.667): Simpson with n=2n = 2 gives 13(0+4(1)+4)=83\tfrac{1}{3}(0 + 4(1) + 4) = \tfrac{8}{3} — exact, because Simpson is perfect for quadratics.

Simpson's rule requires the number of intervals (strips) to be…

Estimate 02x2dx\int_0^2 x^2 \, dx using the trapezoidal rule with a single application (one strip).

Estimate 02x2dx\int_0^2 x^2 \, dx using the composite trapezoidal rule with n=2n = 2 strips (h=1h = 1).

Estimate 02x2dx\int_0^2 x^2 \, dx using Simpson's rule with n=2n = 2 (h=1h = 1). Give your answer to 3 decimal places.