Laplacian as departure from a local average (source code)

= Laplacian as departure from a local average
{c}
{title2=$A_hf-f=\tfrac14h^2\Delta f+O(h^4)$}

The <Laplacian> detects whether a value lies below or above nearby values, to second order. For a <scalar field> whose <partial derivatives> through order four are <continuous functions>, take the <arithmetic mean> of four equally spaced neighbors:
$$
A_hf(x,y)=\frac{f(x+h,y)+f(x-h,y)+f(x,y+h)+f(x,y-h)}4.
$$
Applying <Taylor's theorem> in each coordinate cancels the first- and third-order terms between opposite neighbors. The two pairs leave
$$
A_hf(x,y)-f(x,y)=\frac{h^2}4\Delta f(x,y)+O(h^4),\qquad h\to0.
$$
This is an <asymptotic expansion>, rather than an equality for arbitrary $h$. Rearranging gives the familiar <central finite difference> approximation
$$
\Delta f(x,y)=\frac{f(x+h,y)+f(x-h,y)+f(x,y+h)+f(x,y-h)-4f(x,y)}{h^2}+O(h^2).
$$
This <finite difference> replaces <partial derivatives> by five sampled values. The <arithmetic mean> lies above the center for a sufficiently small $h$ if the <Laplacian> is strictly positive there, and below if it is strictly negative. A zero <Laplacian> cancels this second-order discrepancy without requiring equality of individual values.

At $(0,0)$, the bowl $x^2+y^2$ has center value zero and four neighbor values $h^2$, so the discrepancy is exactly $h^2$. The saddle $x^2-y^2$ has neighbor values $h^2,h^2,-h^2,-h^2$, whose <arithmetic mean> is exactly zero. For the <Gaussian function> $e^{-x^2-y^2}$ the discrepancy is $e^{-h^2}-1=-h^2+O(h^4)$, agreeing with $\Delta f(0,0)=-4$.

A <harmonic function> need not equal this four-neighbor <arithmetic mean> for a finite $h$. The <polynomial> $f(x,y)=x^4-6x^2y^2+y^4$ has $\Delta f=0$ everywhere, but $A_hf(0,0)=h^4$. Higher-order terms remain even when the second-order terms cancel.

At a <local minimum>, each coordinate <second derivative> is at least zero, hence the <Laplacian> is at least zero. At a <local maximum> the inequality reverses. The sum alone does not characterize an extremum: cancellation at a <saddle point of a scalar function> can also produce zero. The local-average interpretation explains why the <heat equation> smooths differences, and helps motivate the <heat equation maximum principle>.