Numerical integration: Proof of quadrature error

314 Views Asked by At

I found this interesting problem relating to numerical mathematics that I (nor any of my peers) seem able to complete on our own, so here goes:

Let $f\in C[0,1]$ and let $I(f)$ denote the integral $\int_o^1 f(x) dx$.

A quadrature formula is given by $Q(f) = \frac{1}{3}(f(0) + f(\frac{1}{2}) + f(1))$.

We can show that Q is precise for all polynomials of first degree but not for those of degree two.

What we cannot show is the following inequality for $f\in C^2[0,1]$ for the error:

$ | I(f) - Q(f) | \leq \frac{5}{72} max_{x\in [0,1]} |f^{''}(x)|$

The given hint is: $\frac{5}{72} = \frac{2}{3}\cdot \frac{1}{12} + \frac{1}{3} \cdot \frac{1}{24}$

Many thanks!

2

There are 2 best solutions below

3
On

Let $F'(x)=f(x)$. Then on integration by parts, $$\begin{align}F(1)-F(0)&=\int_0^1f(x)dx=-\left.(1-x)f(x)\right|_0^1+\int_0^1(1-x)f^{\prime}(x)dx\\ &=f(0)-\left.\frac12(1-x)^2f^{\prime}(x)\right|_0^1+\frac12\int_0^1(1-x)^2f^{\prime\prime}(x)dx\\ &=f(0)+\frac12f^{\prime}(0)+\frac12\int_0^1(1-x)^2f^{\prime\prime}(x)dx\end{align}$$ $$\begin{align}f\left(\frac12\right)-f(0)&=\int_0^{1/2}f^{\prime}(x)dx=-\left.\left(\frac12-x\right)f^{\prime}(x)\right|_0^{1/2}+\int_0^{1/2}\left(\frac12-x\right)f^{\prime\prime}(x)dx\\ &=\frac12f^{\prime}(0)+\int_0^{1/2}\left(\frac12-x\right)f^{\prime\prime}(x)dx\end{align}$$ $$\begin{align}f\left(1\right)-f(0)&=\int_0^{1}f^{\prime}(x)dx=-\left.\left(1-x\right)f^{\prime}(x)\right|_0^{1}+\int_0^{1}\left(1-x\right)f^{\prime\prime}(x)dx\\ &=f^{\prime}(0)+\int_0^{1}\left(1-x\right)f^{\prime\prime}(x)dx\end{align}$$ So $$F(1)-F(0)-\frac13f(0)-\frac13f\left(\frac12\right)-\frac13f(1)=\\ \begin{align}&f(0)+\frac12f^{\prime}(0)+\frac12\int_0^1(1-x)^2f^{\prime\prime}(x)dx\\ &-\frac13f(0)\\ &-\frac13f(0)-\frac16f^{\prime}(0)-\frac13\int_0^{1/2}\left(\frac12-x\right)f^{\prime\prime}(x)dx\\ &-\frac13f(0)-\frac13f^{\prime}(0)-\frac13\int_0^{1}\left(1-x\right)f^{\prime\prime}(x)dx\\ &=\int_0^1K(x)f^{\prime\prime}(x)dx\end{align}$$ Where the Peano kernel is $$K(x)=\left\{\begin{array}{ll}x\left(\frac12x-\frac13\right),&0\le x\le\frac12\\ (1-x)\left(\frac16-\frac12x\right),&\frac12\le x\le1\end{array}\right.$$ Since $K(x)\le0$ for $0\le x\le1$ it follows that $$\max_{0\le x\le1}f^{\prime\prime}(x)\int_0^1K(x)dx\le\int_0^1K(x)f^{\prime\prime}(x)dx\le\min_{0\le x\le1}f^{\prime\prime}(x)\int_0^1K(x)dx$$ Carrying out the integral and applying the intermediate value theorem for $f^{\prime\prime}(x)$ assumed continuous for $x\in[0,1]$ we have $$\int_0^1f(x)dx-\frac13f(0)-\frac13f\left(\frac12\right)-\frac13f(1)=-\frac1{24}f^{\prime\prime}(\xi)$$ For some $0<\xi<1$. See how the use of the Peano kernel got us a better estimate than was required in the original statement of the problem.

0
On

Switch to the related problem of computing $$ \int_{-a}^ag(x)dx \approx \frac{2a}3[g(-a)+g(0)+g(a)] $$ where the connection to the given problem is $g(x)=f(\frac12+x)$ and $a=\frac12$. Now consider the difference function $$ e(a)=\int_{-a}^ag(x)dx - \frac{2a}3[g(-a)+g(0)+g(a)],~~e(0)=0. $$ Then \begin{align} e'(a)&=[g(a)+g(-a)]-\frac23[g(-a)+g(0)+g(a)]-\frac{2a}3[g'(a)-g'(-a)] \\ &=\frac13[g(a)-2g(0)+g(-a)]-\frac{2a}3[g'(a)-g'(-a)],& e'(0)&=0, \\ e''(a)&=-\frac13[g'(a)-g'(-a)]-\frac{2a}3[g''(a)+g''(-a)],& e''(0)&=0, \\ e'''(a)&= -[g''(a)+g''(-a)]-\frac{2a}3[g'''(a)-g'''(-a)],& e'''(0)&=-2g''(0). \end{align} From this one could expect that $e(a)=-\frac13g''(\alpha)$.

To verify this, apply the extended mean value theorem repeatedly. By it there exist numbers $a>a_1>a_2>|a_3|$ with \begin{align} \frac{e(a)}{a^3}=\frac{e'(a_1)}{3a_1^2}=\frac{e''(a_2)}{6a_2} &=-\frac{g'(a_2)-g'(-a_2)}{18a_2}-\frac{g''(a_2)+g''(-a_2)}9 \\ &=-\frac{g''(-a_2)+g''(a_3)+g''(a_2)}9=-\frac13g''(\alpha), \end{align} the last by the intermediate value theorem for the continuous function $g''$. Thus the error satisfies $$ |e(a)|\le \frac{a^3}3\max_{x\in[-a,a]}|g''(x)| $$ Now switching back to the given problem, we get $$ \int_0^1f(x)dx = \frac{f(0)+f(\tfrac12)+f(1)}3 -\frac1{24}f''(\eta). $$ Note that $\frac1{24}=\frac{3}{72}$ is smaller than the claimed $\frac{5}{72}$.