Derivation of Simspon's 1/3 rule using lagrange polynomial

685 Views Asked by At

Taking the Lagrange interpolation formular for a second order polynomial $$f_2(x)=L_0(x)f(x_0)+L_1(x)f(x_1)+L_2(x)f(x_2)$$ Where $$\begin{align}L_0(x)&=\frac{(x-x_1)(x-x_2)}{(x_0-x_1)(x_0-x_2)}\\L_1(x)&=\frac{(x-x_0)(x-x_2)}{(x_1-x_0)(x_1-x_2)}\\L_2(x)&=\frac{(x-x_0)(x-x_1)}{(x_2-x_0)(x_2-x_1)}\end{align}$$ Therefore, $$f_2(x)=\frac{(x-x_1)(x-x_2)}{(x_0-x_1)(x_0-x_2)}f(x_0)+\frac{(x-x_0)(x-x_2)}{(x_1-x_0)(x_1-x_2)}f(x_1)+\frac{(x-x_0)(x-x_1)}{(x_2-x_0)(x_2-x_1)}f(x_2)$$ The area of $f(x)$ under the interval $[x_0,x_2]$ is given by $$\begin{align}\int_{x_0}^{x_2}f(x)dx&\approx\int_{x_0}^{x_2}\left[L_0(x)f(x_0)+L_1(x)f(x_1)+L_2(x)f(x_2)\right]dx\\\int_{x_0}^{x_2}f(x)dx&\approx\left[\frac{(x-x_1)(x-x_2)}{(x_0-x_1)(x_0-x_2)}f(x_0)+\frac{(x-x_0)(x-x_2)}{(x_1-x_0)(x_1-x_2)}f(x_1)+\frac{(x-x_0)(x-x_1)}{(x_2-x_0)(x_2-x_1)}f(x_2)\right]dx\end{align}$$

After integrating I reached this$$\int_{x_0}^{x_2}f(x)dx\approx\left[\frac{\frac{x^3}{3}-\frac{x^2(x_2+x_1)}{2}+(x_1x_2)x}{(x_0-x_1)(x_0-x_2)}f(x_0)+\frac{\frac{x^3}{3}-\frac{x^2(x_2+x_0)}{2}+(x_0x_2)x}{(x_1-x_0)(x_1-x_2)}f(x_1)+\frac{\frac{x^3}{3}-\frac{x^2(x_0+x_1)}{2}+(x_1x_0)x}{(x_2-x_1)(x_2-x_0)}f(x_2)\right]$$ but after this I am unable to get the answer. Can anyone help me, please?

1

There are 1 best solutions below

0
On

The Wikipedia article on Simpson's rule also gives your deviation, but suppresses the calculations that you could not master. Maybe you forgot to input that $x_0=a$, $x_1={1\over2}(a+b)$, $x_2=b$.

At any rate I would suggest to use another approach. We may assume $x_0=-1$, $x_1=0$, $x_2=1$ and verify easily that Simpson's rule gives the correct integral values for the three parabolas $y=ax^2+bx+c$ having $y=1$ at one of the three points and $y=0$ at the other two points. This and the "linearity of everything" proves your claim.