<s>[INST] Simpson's Rule in Numerical Integration I have a problem in proving that the simple Simpson’s rule  $$\int_a^b f(x) dx \approx \frac{(b − a)}6[ f (a) + 4 f \left(\frac{a + b}{2}\right) + f (b)]$$ 
is exact for all cubic polynomials.
I am a little bit confused about using the change of variable $$x = a + t (b − a)$$ for a general interval [a, b].
 [/INST] If the change of variables bothers you, you don't really need it: it just makes some of the formulas somewhat simpler, because it means you can take $a=0$.
If $f(x) = c_0 + c_1 x + c_2 x^2 + c_3 x^3$, 
$$ \eqalign{\int_a^b f(x)\; dx &= \left. c_0 x + c_1 \frac{x^2}{2} + c_2 \frac{x^3}{3} + c_3 \frac{x^4}{4} \right|_{a}^b  \cr &= c_0 (b-a) + c_1 \frac{b^2-a^2}{2} + c_2 \frac{b^3 - a^3}{3} + c_3 \frac{b^4 - a^4}{4}}$$
$$ \eqalign{\frac{b-a}{6} &\left(f(a) + 4 f\left(\frac{a+b}{2}\right) + f(b)\right)\cr
&= \frac{b-a}{6}\left(6 c_0 + c_1 \left(a + 4\left(\frac{a+b}{2}\right)+b\right) + c_2 \left(a^2 + 4\left(\frac{a+b}{2}\right)^2+b^2\right) + c_3   \left(a^3 + 4\left(\frac{a+b}{2}\right)^3+b^3\right)  \right)}$$
Expand this all out and see that this is the same expression you got for
the integral.
</s>