I need to approximate the derivative $u'$ at the point $x$ by taking the points $x−h$, $x+h$ and $x+2h$ into account, and the order should be 3. we suppose that the function $u$ is regular.
My attempt: Since the order should be 3 and we approximate the first derivative, by using Taylor expansion we will devise by h, therefore we should develop until the fourth-order:
$u(x+h)=u(x)+h u^{\prime}(x)+\frac{h^{2}}{2} u^{\prime \prime}(x)+\frac{h^{3}}{3!} u^{(3)}(x)+\frac{h^{4}}{4!} u^{(4)}\left(\xi_{1}\right)$
$u(x-h)=u(x)-h u^{\prime}(x)+\frac{h^{2}}{2} u^{\prime \prime}(x)-\frac{h^{3}}{6} u^{(3)}(x)+\frac{h^{4}}{4!} u^{(4)}\left(\xi_{2}\right)$
$u(x+2h)=u(x)+2h u^{\prime}(x)+2h^{2} u^{\prime \prime}(x)+\frac{4h^{3}}{3} u^{(3)}(x)+\frac{2h^{4}}{3} u^{(4)}\left(\xi_{3}\right)$
where $\left.\xi_{1} \in\right]x,x+h\left[, \xi_{2} \in\right] x-h, x[,$ and $\left.\xi_{3} \in\right]x,x+2h[$
Next, I have to solve a linear system in order to vanish the second and the third derivatives
$\alpha_0u(x+h)=\alpha_0u(x)+\alpha_0h u^{\prime}(x)+\alpha_0\frac{h^{2}}{2} u^{\prime \prime}(x)+\alpha_0\frac{h^{3}}{3!} u^{(3)}(x)+\alpha_0\frac{h^{4}}{4!} u^{(4)}\left(\xi_{1}\right)$
$\alpha_1u(x-h)=\alpha_1u(x)-\alpha_1h u^{\prime}(x)+\alpha_1\frac{h^{2}}{2} u^{\prime \prime}(x)-\alpha_1\frac{h^{3}}{6} u^{(3)}(x)+\alpha_1\frac{h^{4}}{4!} u^{(4)}\left(\xi_{2}\right)$
$\alpha_2u(x+2h)=\alpha_2u(x)+2\alpha_2h u^{\prime}(x)+2\alpha_2h^{2} u^{\prime \prime}(x)+\alpha_2\frac{4h^{3}}{3} u^{(3)}(x)+\alpha_2\frac{2h^{4}}{3} u^{(4)}\left(\xi_{3}\right)$
by summing up the three equations we found:
$\alpha_0u(x+h)+\alpha_1u(x-h)+\alpha_2u(x+2h)=[\alpha_0+\alpha_1+\alpha_2]u(x)+[\alpha_0h-\alpha_1h+2\alpha_2h] u^{\prime}(x)+[\alpha_0\frac{h^{2}}{2}+\alpha_1\frac{h^{2}}{2}+2\alpha_2h^{2} ] u^{\prime \prime}(x)+[\alpha_0\frac{h^{3}}{3!}-\alpha_1\frac{h^{3}}{6}+\alpha_2\frac{4h^{3}}{3}] u^{(3)}(x)+\alpha_0\frac{h^{4}}{4!} u^{(4)}\left(\xi_{1}\right) + \alpha_1\frac{h^{4}}{4!} u^{(4)}\left(\xi_{2}\right)+\alpha_2\frac{2h^{4}}{3} u^{(4)}\left(\xi_{3}\right)$
I think I'm able to continue my calculation but I am stuck to proof clearly that there exist an $\eta \in ]?[$ such as: $\alpha_0\frac{h^{4}}{4!} u^{(4)}\left(\xi_{1}\right) + \alpha_1\frac{h^{4}}{4!} u^{(4)}\left(\xi_{2}\right)+\alpha_2\frac{2h^{4}}{3} u^{(4)}\left(\xi_{3}\right)=[\alpha_0\frac{h^{4}}{4!} + \alpha_1\frac{h^{4}}{4!} +\alpha_2\frac{2h^{4}}{3} ]u^{(4)}\left(\eta\right)$
I'll be grateful, thanks.
That's the problem with the Lagrange form for the remainder. You get those $u^{(4)}\left(\xi_k\right)$ terms and if all the coefficients have the same sign all is well, but what if, as is the case here, they don't? Well, maybe you can make it work somehow but the Peano kernel theorem gives you a form for the remainder that allows you to come to conclusions in a straightforward fashion. The only problem is that it's kinda difficult to apply. In this case, $$\begin{align}u(x)-u(x-h)&=\int_{x-h}^xu^{\prime}(t)dt=\left.-(x-h-t)u^{\prime}(t)\right|_{x-h}^x+\int_{x-h}^x(x-h-t)u^{\prime\prime}(t)dt\\ &=hu^{\prime}(x)\left.-\frac12(x-h-t)^2u^{\prime\prime}(t)\right|_{x-h}^x+\frac12\int_{x-h}^x(x-h-t)^2u^{\prime\prime\prime}(t)dt\\ &=hu^{\prime}(x)-\frac12h^2u^{\prime\prime}(x)\left.-\frac16(x-h-t)^3u^{\prime\prime\prime}(t)\right|_{x-h}^x+\frac16\int_{x-h}^x(x-h-t)^3u^{(4)}(t)dt\\ &=hu^{\prime}(x)-\frac12h^2u^{\prime\prime}(x)+\frac16h^3u^{\prime\prime\prime}(x)+\frac16\int_{x-h}^x(x-h-t)^3u^{(4)}(t)dt\end{align}$$ Similarly we can show that $$u(x+h)-u(x)=hu^{\prime}(x)+\frac12h^2u^{\prime\prime}(x)+\frac16h^3u^{\prime\prime\prime}(x)+\frac16\int_x^{x+h}(x+h-t)^3u^{(4)}(t)dt$$ And $$u(x+2h)-u(x)=2hu^{\prime}(x)+2h^2u^{\prime\prime}(x)+\frac43h^3u^{\prime\prime\prime}(x)+\frac16\int_x^{x+2h}(x+2h-t)^3u^{(4)}(t)dt$$ Then $$\begin{align}&-\frac13u(x-h)-\frac12u(x)+u(x+h)-\frac16u(x+2h)\\ &\quad=\left(-\frac13-\frac12+1-\frac16\right)u(x)+\left(\frac13+1-\frac13\right)hu^{\prime}(x)+\left(-\frac16+\frac12-\frac13\right)h^2u^{\prime\prime}(x)\\ &\quad\quad\left(\frac1{18}+\frac16-\frac29\right)h^3u^{\prime\prime\prime}(x)+\int_{x-h}^{x+2h}K(t)u^{(4)}(t)dt\\ &\quad=hu^{\prime}(x)+\int_{x-h}^{x+2h}K(t)u^{(4)}(t)dt\end{align}$$ Where $$K(t)=\begin{cases}\frac1{18}(x-h-t)^3&x-h<t<x\\ \frac16(x+h-t)^3-\frac1{36}(x+2h-t)^3&x<t<x+h\\ -\frac1{36}(x+2h-t)^3&x+h<t<x+2h\end{cases}$$ The nice thing for this problem is that $K(t)\le0$ for $x-h<t<x+2h$ so $$\max_{t\in[x-h,x+2h]}u^{(4)}(t)\int_{x-h}^{x+2h}K(t)dt\le\int_{x-h}^{x+2h}K(t)u^{(4)}(t)dt\le\min_{t\in[x-h,x+2h]}u^{(4)}(t)\int_{x-h}^{x+2h}K(t)dt$$ And so by the intermediate value theorem there is some $\xi\in(x-h,x+2h)$ such that $$\int_{x-h}^{x+2h}K(t)u^{(4)}(t)dt=u^{(4)}(\xi)\int_{x-h}^{x+2h}K(t)dt$$ We can work out $$\int_{x-h}^{x+2h}K(t)dt=-\frac1{12}h^4$$ So we may conclude that $$-\frac13u(x-h)-\frac12u(x)+u(x+h)-\frac16u(x+2h)=hu^{\prime}(x)-\frac1{12}h^4u^{(4)}(\xi)$$ This is a situation where it's a lot harder to prove that the error has the form it does than to evaluate the constant. If we assumed it was $Ch^4u^{(4)}(\xi)$ we could just plug in $u(x)=x^4$ and we would arrive immediately at the conclusion that $C=-\frac1{12}$.
EDIT: We have
$u(x-h)=u(x)-hu^{\prime}(x)+\frac12h^2u^{\prime\prime}(x)-\frac16h^3u^{\prime\prime\prime}(x)+O(h^4)$
$u(x+h)=u(x)+hu^{\prime}(x)+\frac12h^2u^{\prime\prime}(x)+\frac16h^3u^{\prime\prime\prime}(x)+O(h^4)$
$u(x+2h)=u(x)+2hu^{\prime}(x)+2h^2u^{\prime\prime}(x)+\frac43h^3u^{\prime\prime\prime}(x)+O(h^4)$
We want to zap the $h^2u^{\prime\prime}(x)$ and $h^3u^{\prime\prime\prime}(x)$ terms so let's take a linear combination $u(x+h)+au(x-h)+bu(x+2h)$. That yields $2$ linear equations in $2$ unknowns:
$\frac12a+\frac12+2b=0$
$-\frac16a+\frac16+\frac43b=0$
Multiply the first equation by $2$ and the second by $3$ and subtract to get
$\frac32a+\frac12=0$.
Multiply the first equation by $1$ and the second by $3$ and add to get
$1+6b=0$
Thus $a=-\frac13$ and $b=-\frac16$. The $hu^{\prime}(x)$ term now looks like
$\left(-\frac13(-1)+(1)(1)-\frac16(2)\right)hu^{\prime}(x)=hu^{\prime}(x)$
And so far we have
$\left(-\frac13+1-\frac16\right)u(x)=\frac12u(x)$
So we are going to have to subtract $\frac12u(x)$ to get
$-\frac13u(x-h)-\frac12u(x)+u(x+h)-\frac16u(x+2h)=hu^{\prime}(x)+O(h^4)$
As for your second comment consider that for example $$\int_x^{x+h}(x+h-t)^4dt=\int_{x-h}^{x+2h}\operatorname{\Theta}(t-x)\operatorname{\Theta}(x+h-t)(x+h-t)^4dt$$ Where $$\operatorname{\Theta}(x)=\begin{cases}0&x<0\\1&x\ge0\end{cases}$$ So we could have written the Peano kernel out with those $\Theta$ functions but I considered it less confusing to use cases instead.