Approximation of derivative - Order of accuracy

121 Views Asked by At

The derivative of a function $f$ can be approximated by using the following second-order method $$ f'(x) \approx \frac{1}{h}(e^{hD}-1-\frac{1}{2}(e^{hD}-1)^2)f(x). $$ The error of this approximation is $\frac{1}{3h}(e^{hD}-1)^3f(x)$.

How can one show that this in fact is a second-order approximation? That is, how do I show that $$ \frac{1}{3h}(e^{hD}-1)^3f(x) = -\frac{h^2}{3}f'''(x) ? $$

$D$ is the differential operator.

2

There are 2 best solutions below

0
On BEST ANSWER

I had kind of a hard time understanding what this post meant, but my conclusion is that $$e^{hD}f(x)=\sum_{n=0}^{\infty}\frac1{n!}h^h\frac{d^n}{dx^n}f(x)=f(x+h)$$ Just an expression of the Taylor series with a linear differential operator. Similarly, $\left(e^{hD}\right)^kf(x)=f(x+kh)$. So then $$\begin{align}f^{\prime}(x)&=Df(x)=\frac1h(hD)f(x)=\frac1h\ln(e^{hD})f(x)=\frac1h\ln\left(1+(e^{hD}-1)\right)f(x)\\ &=\frac1h\left((e^{hD}-1)-\frac12(e^{hD}-1)^2+\frac13(e^{hD}-1)^3\right)f(x)+O(h^4)\end{align}$$ And then $$\begin{align}(e^{hD}-1)^3f(x)&=\left(1+hD+O(h^2)-1\right)^3f(x)\\ &=(h^3D^3+O(h^4))f(x)=h^3f^{\prime\prime\prime}(x)+O(h^4)\end{align}$$ So that would mean $$\begin{align}f^{\prime}(x)-\frac{-f(x+2h)+4f(x_h)-3f(x)}{2h}&=\frac{f(x+3h)-3f(+2h)+3f(x_h)-f(x)}{3h}+O(h^3)\\ &=\frac{h^2}3f^{\prime\prime\prime}(x)+O(h^3)\end{align}$$ But formal manipulation fo operator arithmetic like this isn't usually considered proof, so let's start with $$\begin{align}f(x+h)-f(x)&=\int_x^{x+h}f^{\prime}(t)dt=\left.-(x+h-t)f^{\prime}(t)\right|_x^{x+h}+\int_x^{x+h}(x+h-t)f^{\prime\prime}(t)dt\\ &=hf^{\prime}(x)-\left.\frac12(x+h-t)^2f^{\prime\prime}(t)\right|_x^{x+h}+\frac12\int_x^{x+h}(x+h-t)^2f^{\prime\prime\prime}(t)dt\\ &=hf^{\prime}(x)+\frac12h^2f^{\prime\prime}(x)+\frac12\int_x^{x+h}(x+h-t)^2f^{\prime\prime\prime}(t)dt\end{align}$$ Also $$\begin{align}f(x+2h)-f(x)&=2hf^{\prime}(x)+2h^2f^{\prime\prime}(x)+\frac12\int_x^{x+2h}(x+2h-t)^2f^{\prime\prime\prime}(t)dt\\ f(x+3h)-f(x)&=3hf^{\prime}(x)+\frac92h^2f^{\prime\prime}(x)+\frac12\int_x^{x+3h}(x+3h-t)^2f^{\prime\prime\prime}(t)dt\end{align}$$ Then we can add up $$\begin{align}f(x+3h)-3f(x+2h)+3f(x+h)-f(x)&=(1-3+3-1)f(x)+(3-6+3)hf^{\prime}(x)\\ &\quad+\left(\frac92-6+\frac32\right)h^2f^{\prime\prime}(x)+\int_x^{x+3h}K_3(t)f^{\prime\prime\prime}(t)dt\\ &=\int_x^{x+3h}K_3(t)f^{\prime\prime\prime}(t)dt\end{align}$$ Where the Peano kernel $$K_3(t)=\begin{cases}\frac12(t-x)^2&x\le t\le x+h\\ -x^2-\frac32h^2-t^2-3xh+2xt+3ht&x+h\le t\le x+2h\\ \frac12(x+3h-t)^2&x+2h\le t\le x+3h\end{cases}$$ Since $K_3(t)\ge0$ for $x\le t\le x+3h$ we can see that $$\min_{t\in[x,x+3h]}f^{\prime\prime\prime}(t)\int_x^{x+3h}K_3(t)dt\le\int_x^{x+3h}K_3(t)f^{\prime\prime\prime}(t)dt\le\max_{t\in[x,x+3h]}f^{\prime\prime\prime}(t)\int_x^{x+3h}K_3(t)dt$$ By the intermediate value theorem we can conclude $$\begin{align}\int_x^{x+3h}K_3(t)f^{\prime\prime\prime}(t)dt&=f^{\prime\prime\prime}(\xi_3)\int_x^{x+3h}K_3(t)dt=h^3f^{\prime\prime\prime}(\xi_3)\end{align}$$ For some $\xi_3\in(x,x+3h)$ which means $$\frac{f(x+3h)-3f(x+2h)+3f(x+h)-f(x)}{3h}=\frac{h^2}3f^{\prime\prime\prime}(\xi_3)$$ Also we find $$\begin{align}-f(x+2h)+4f(x+h)-3f(x)&=(-1+4-3)f(x)+(-2+4)hf^{\prime}(x)\\ &\quad+(-2+2)h^2f^{\prime\prime}(x)+\int_x^{x+2h}K_2(t)f^{\prime\prime\prime}(t)dt\\ &=2hf^{\prime}(x)+\int_x^{x+2h}K_2(t)f^{\prime\prime\prime}(t)dt\end{align}$$ Where this Peano kernel is $$K_2(t)=\begin{cases}\frac32x^2+\frac32t^2+2xh-3xt-2ht&x\le t\le x+h\\ -\frac12(x+2h-t)^2&x+h\le t\le x+2h\end{cases}$$ Since $K_2(t)\le0$ for $x\le t\le x+2h$ the intermediate value theorem will again be applicable so $$\int_x^{x+2h}K_2(t)f^{\prime\prime\prime}(t)dt=f^{\prime\prime\prime}(\xi_2)\int_x^{x+2h}K_2(t)dt=-\frac23h^2f^{\prime\prime\prime}(\xi_2)$$ For some $\xi_2\in(x,x+2h)$ and so $$f^{\prime}(x)-\frac{-f(x+2h)+4f(x+h)-3f(f)}{2h}=\frac{h^2}3f^{\prime\prime\prime}(\xi_2)$$

0
On

Using a forward third order finite difference we get that

$ f'''(x)\\ \approx\frac{1}{3h^3}(f(x+3h)-3f(x+2h)+3f(x+h)-f(x))\\ =\frac{1}{3h^3}(e^{3hD}f(x)-3e^{2hD}f(x)+3e^{hD}f(x)-f(x))\\ =\frac{1}{3h^3}(e^{3hD}-3e^{2hD}+3e^{hD}-1)f(x)\\ \frac{1}{3h^3}(e^{hD}-1)^3f(x)\\ $