[Math] Simpson’s Rule derived from Lagrange Interpolation. Confused, please help.

lagrange-interpolationnumerical methodssimpsons rule

I'm reading my lecturer's notes on how to derive the Simpson's Rule using Lagrange's Interpolating Polynomial, but there's a point that doesn't quite seem right.

Here's a screenshot of the notes pointing out where I'm confused:
enter image description here

My problem is, how is it true that:

$$ \int_{-h}^{h} {(x+h)x \over (2h)(h)} y_2 = {{y_2} \over 2h^2 } \left[ {x^3 \over 3} – {hx^2 \over 2} \right]_{-h}^{h} $$

Where did the $ \space – {hx^2 \over 2} \space $ come from?

Shouldn't it be:

$$ \int_{-h}^{h} {(x+h)x \over (2h)(h)} y_2 = {{y_2} \over 2h^2 } \left[ {x^3 \over 3} + {hx^2 \over 2} \right]_{-h}^{h} $$

And if that's the case, doesn't the whole proof break?

Sorry if this is easy and straightforward to some, I'm really lost here.

Best Answer

You're exactly correct. The last term of the integral (in your first red box) is expressed correctly, but evaluated incorrectly (in your second red box).

Related Question