Sixth-order source correction of the nine-point Poisson stencil (source code)

= Sixth-order source correction of the nine-point Poisson stencil
{title2=$D_9U=f+\tfrac{h^2}{12}\Delta f+\tfrac{h^4}{360}(f_{xxxx}+4f_{xxyy}+f_{yyyy})$}

The <nine-point finite-difference stencil> for the <Laplacian> has expansion $D_9u=\Delta u+h^2\Delta^2u/12+h^4(u_{xxxxxx}+u_{yyyyyy}+5u_{xxxxyy}+5u_{xxyyyy})/360+O(h^6)$. If $\Delta u=f$, differentiating this equation gives $u_{xxxxyy}+u_{xxyyyy}=f_{xxyy}$ and $u_{xxxxxx}+u_{yyyyyy}=\Delta^2f-3f_{xxyy}$. Hence the corrected compact equation
$$
D_9U=f+\frac{h^2}{12}\Delta f+\frac{h^4}{360}(f_{xxxx}+4f_{xxyy}+f_{yyyy})
$$
has sixth-order normalized <consistency of a numerical method>. Source <derivatives> can be supplied analytically; numerical approximation of $\Delta f$ must be fourth order and of the fourth <derivatives> second order. With exact square-grid <Dirichlet boundary data> and uniformly smooth solution, the <discrete maximum principle> inverse bound converts this residual into sixth-order nodal convergence. The unknown stencil stays compact even if more distant known source values are used.