0

Derive a formula of the form

$$\int_{a}^{b}f(x)dx=w_0f(a)+w_1f(b)+w_2f'(a)+w_3f'(b)$$

that is exact for polynomials of the highest degree possible.

Not sure how to derive this formula. Possibly method of undetermined coefficients, but I'm not sure. Any help would be great :)

Drake
  • 851

1 Answers1

0

The fact that the right hand side contains $f(a)$, $f(b)$, $f^\prime(a)$ and $f^\prime(b)$ makes me think to the application of the integration by parts.

Indeed, on integrating by parts the first time, we have

$$\int_a^b f(x)dx=\left[xf(x) \right]_a^b-\int_a^bxf^\prime(x)dx$$

On integrating by parts the second time, we finally have

$$\int_a^b f(x)dx=-af(a)+bf(b)+\frac{a^2}{2}f^\prime(a)-\frac{b^2}{2}f^\prime(b)+\int_a^b\frac{x^2}{2}f^{\prime\prime}(x)dx.$$

giving $w_0=-a$, $w_1=b$, $w_2=a^2/2$ and $w_3=-b^2/2$.

The error of this formula is provided by

$$R(x)=\int_a^b\frac{x^2}{2}f^{\prime\prime}(x)dx$$

which is vanishing if $f^{\prime\prime}(x)=0$, namely, if $f^\prime(x)=c$ or $f(x)=cx+d$. So, the above integration formula is exact for polynomials of degree $1$.

Vitality
  • 378