Compact fourth-order Helmholtz stencil (source code)

= Compact fourth-order Helmholtz stencil
{title2=$h^{-2}\Gamma_9u+\lambda M_hu=0$}

Let $\Gamma_9$ have center weight $-10/3$, axial weights $2/3$ and diagonal weights $1/6$, and let $M_h$ have center weight $2/3$ and axial weights $1/12$. <Taylor expansion> gives $h^{-2}\Gamma_9u=\Delta u+h^2\Delta^2u/12+O(h^4)$ and $M_hu=u+h^2\Delta u/12+O(h^4)$. On a smooth solution of the constant-coefficient <Helmholtz equation>, the second-order term becomes $h^2\Delta(\Delta u+\lambda u)/12=0$. Thus the normalized PDE residual is fourth order, while the original unscaled stencil residual is sixth order. This local cancellation alone does not prove uniform global accuracy at or near a resonance.