The Trapezoid rule applied to $\displaystyle \int_0^2 \! f(x) \, dx.$ gives the value 5 and the Midpoint rule gives the value 4. What value does Simpson's rule give?
It should be 13/3 but I don't see how to get it.
Midpoint Rule => $\displaystyle M = (b-a)f \left (\frac{a+b}{2} \right )$
Trapezoidal Rule => $\displaystyle T = \frac{1}{2}(b-a)(f(a) + f(b))$
Simpsons Rule => $\displaystyle S = \frac{b-a}{6} \bigg{[}f(a) + 4f \left (\frac{a+b}{2} \right ) + f(b) \bigg{]} = \frac{(b-a)(f(a) + f(b))}{6} + \frac{2}{3}(b-a)f \left (\frac{a+b}{2} \right )$
$\displaystyle = \frac{T}{3} + \frac{2M}{3} = \frac{5}{3} + \frac{8}{3} = \frac{13}{3}$