# Solve a problem

Statement of the problem:

$f '$ is Lipchitz, then

$|\displaystyle\sum_{j=1}^n\frac{f_j+f_{j+1}}{2}-\int_0^1 f(x)\mathrm{d}x|\le CL\Delta x^2$

for some constant C.

Proof:

We first state a lemma here.

$f(x)-f(y)=f'(x)(x-y)+\displaystyle\frac{f'(\zeta)-f'(y)}{2(\zeta-y)}(x-y)^2$,

for some $\zeta\in(x,y)$.

Because we do not know whether $f''$ exists.

Proof for lemma:

Without loss of generality, we assume $y=0$.

Then we have to prove:

$f(x)-f(0)=f'(0)x+\displaystyle\frac{f'(\zeta)-f'(0)}{2(\zeta-0)}x^2$

Set $g=f(x)-f'(0)x$, then we have to prove:

$g(x)-g(0)=\displaystyle\frac{g'(\zeta)}{2\zeta}x^2$,

which is equivalent to:

$\displaystyle\frac{g(x)-g(0)}{x^2}=\frac{g'(\zeta)}{2\zeta}$,

use the formula that, there exists a $\phi$, s.t.

$\displaystyle\frac{F(x)-F(y)}{G(x)-G(y)}=\frac{F'(\phi)}{G'(\phi)}$.

The lemma is proved.

Let’s prove the original problem. By the lemma,

$f(x)-f_j=f'_j(x-j\Delta x)+\displaystyle\frac{f'(\zeta)-f'_j}{2(\zeta-j\Delta x)}(x-j\Delta x)^2$,

$f_{j+1}-f_j=f'_j\Delta x+\displaystyle\frac{f'(\eta)-f'_j}{2(\eta-j\Delta x)}\Delta x^2$,

$\displaystyle\int_{j\Delta x}^{(j+1)\Delta x}(f(x)-\displaystyle\frac{f_j+f_{j+1}}{2})\mathrm{d}x\le\int \{f'_j[x-(j+\frac{1}{2})\Delta x]+\frac{1}{2}L(x-j\Delta x)^2+\frac{1}{2}L\Delta x^2\}\mathrm{d}x$

The first term is zero!

Then on every interval, the difference is of order three!

$\Box$