Approximation of $2$nd Derivative Up to $O(h^4)$

49 Views Asked by At

Investigate if it is possible to obtain 4th order accuracy using 5 points for a 2nd derivative approximation, i.e. is it possible to determine a, b, c, d, e in

$$y''(0) = \frac{ay(2h)+by(h)+cy(0)+dy(-h)+ey(-2h)}{h^2}+O(h^4)$$

The solution starts by saying that due to symmetry properties $a=e, b=d$ but i don't understand why.

2

There are 2 best solutions below

0
On BEST ANSWER

By Taylor expansion we know that

$$\begin{align} y(-h) &=y(0)\color{red}{-}hy'(0)+\frac{h^2}{2!}y''(0)\color{red}{-}\frac{h^3}{3!}y'''(0)+\frac{h^4}{4!}y''''(0)+O(h^4) \\ y(h) &=y(0)+hy'(0)+\frac{h^2}{2!}y''(0)+\frac{h^3}{3!}y'''(0)+\frac{h^4}{4!}y''''(0)+O(h^4) \end{align} \tag{1}$$

and hence

$$y(-h)+y(h)= y(0) + 2 \frac{h^2}{2!}y''(0) + 2 \frac{h^4}{4!}y''''(0)+O(h^6) \tag{2}$$

and replacing $h$ by $2h$ we get

$$y(-2h)+y(2h)= y(0) + 2 \frac{(2h)^2}{2!}y''(0) + 2 \frac{(2h)^6}{4!}y''''(0)+O(h^6) \tag{3}$$

Next, multiply $(2)$ by $16$ and subtract it from $(3)$ to eliminate $y''''(0)$

$$y(-2h)+y(2h)-16y(-h)-16y(h)= -15y(0) -8h^2y''(0) +O(h^6) \tag{4}$$

Or equivalently

$$y''(0)=\frac{-y(-2h)+16y(-h)-15y(0)+16y(h)-y(2h)}{8h^2}+O(h^4) \tag{5}$$

0
On

If $v(x)=y(-x)$ then $v''(0)=y''(0)$, so

if $y''(0) \approx \dfrac{ay(2h)+by(h)+cy(0)+dy(-h)+ey(-2h)}{h^2}$

then $v''(0) \approx \dfrac{av(2h)+bv(h)+cv(0)+dv(-h)+ev(-2h)}{h^2} \\ \qquad\,= \dfrac{ey(2h)+dy(h)+cy(0)+by(-h)+ay(-2h)}{h^2}$

but if these approximations are not equal then a better approximation for each would presumably be the average of the two

$y''(0) = v''(0) =\frac{y''(0) + v''(0)}{2} \approx \dfrac{\frac{a+e}{2} y(2h)+\frac{b+d}{2} y(h)+cy(0)+\frac{b+d}{2} y(-h)+\frac{a+e}{2} y(-2h)}{h^2}$

which has symmetric coefficients.