Problem 198
Easy Further Applications

Show that Simpson's formula is exact

Show that Simpson's formula is exact for $f(x)=a_0x^3+a_1x^2+a_2x+a_3$.

Explanation of Method

Center the interval at $x_1=c$ with half-width $h$, so $x_0=c-h$ and $x_2=c+h$; expand both the exact integral of the cubic and Simpson's weighted sum $\tfrac{h}{3}[f(x_0)+4f(x_1)+f(x_2)]$ in powers of $h$ about $c$, and show every term matches.

Step 1: Simpson's formula and notation

With $x_1=(x_0+x_2)/2=c$ and $h=(x_2-x_0)/2$, so $x_0=c-h,\ x_2=c+h$:

\[I_{\text{Simpson}}=\frac{h}{3}\left[f(x_0)+4f(x_1)+f(x_2)\right].\]

Step 2: Exact integral, expressed via $c,h$

Direct antidifferentiation and use of the binomial expansions for $(c\pm h)^2,(c\pm h)^3,(c\pm h)^4$ (the odd-power differences survive, even-power differences cancel) gives:

\[I_{\text{exact}}=\int_{c-h}^{c+h}(a_0x^3+a_1x^2+a_2x+a_3)\,dx=2h\left(a_0c^3+a_1c^2+a_2c+a_3\right)+2h^3\left(a_0c+\frac{a_1}{3}\right).\]

Step 3: Expand $f(x_0),f(x_1),f(x_2)$ about $c$

Writing $f(c\pm h)$ via the binomial expansion and adding $f(c-h)+4f(c)+f(c+h)$, every term with an odd power of $h$ cancels between the $+h$ and $-h$ contributions, leaving:

\[f(x_0)+4f(x_1)+f(x_2)=6\left(a_0c^3+a_1c^2+a_2c+a_3\right)+6a_0ch^2+2a_1h^2.\]

Step 4: Simpson's sum

\[I_{\text{Simpson}}=\frac{h}{3}\left[6(a_0c^3+a_1c^2+a_2c+a_3)+6a_0ch^2+2a_1h^2\right]=2h(a_0c^3+a_1c^2+a_2c+a_3)+2h^3\left(a_0c+\frac{a_1}{3}\right).\]

Step 5: Compare

This is identical, term by term, to $I_{\text{exact}}$ from Step 2:

\[\boxed{I_{\text{exact}}=I_{\text{Simpson}}}\]

Step 6: Numerical check

For $f(x)=2x^3+3x^2-x+5$ on $[0,2]$ ($x_0=0,x_1=1,x_2=2,h=1$): exact integral $=24$; Simpson's sum $=\tfrac13[5+4(9)+31]=\tfrac{72}{3}=24$, an exact match.


Result

Final answer:

\[\boxed{\int_{x_0}^{x_2}(a_0x^3+a_1x^2+a_2x+a_3)\,dx=\frac{h}{3}\left[f(x_0)+4f(x_1)+f(x_2)\right]}\]