Periodic Poisson equation on a four-point cycle (source code)

= Periodic Poisson equation on a four-point cycle
{title2=$2x_n-x_{n-1}-x_{n+1}=b_n$}

Consider the discrete <linear system> $Lx=b$ with
$$
L=\begin{pmatrix}
2&-1&0&-1\\
-1&2&-1&0\\
0&-1&2&-1\\
-1&0&-1&2
\end{pmatrix},
\qquad b=(1,0,-1,0)^T.
$$
This is a finite periodic analogue of the <Poisson equation>, using the negative second <finite difference> with unit grid spacing. It is also a <Graph Laplacian> equation on a <cycle graph>; no continuum approximation is being claimed here.

\Image[/periodic-circulant-poisson-solution.png]
{title=Balanced forcing and the mean-zero solution on a four-node ring}

Summing the four equations gives zero on the left, since each value occurs twice positively and twice negatively. A necessary condition is therefore $\sum_n b_n=0$. The <Fourier diagonalization of a circulant matrix> shows that this is also sufficient: the only zero <eigenvalue> of $L$ is the constant mode $k=0$, and $\widehat b_0=\sum_n b_n$.

For the displayed forcing, the <discrete Fourier transform> gives
$$
\widehat b=(0,2,0,2)^T,
\qquad
(\lambda_0,\lambda_1,\lambda_2,\lambda_3)=(0,2,4,2).
$$
Divide only at the three nonzero <eigenvalues>, and choose $\widehat x_0=0$ to impose zero <arithmetic mean>:
$$
\widehat x=(0,1,0,1)^T,
\qquad
\boxed{x=(1/2,0,-1/2,0)^T.}
$$
Direct substitution gives $Lx=(1,0,-1,0)^T$. All other <vectors> satisfying the <linear system> are $x+a(1,1,1,1)^T$, because the <kernel> is the space of constant <vectors>. Thus balanced forcing determines the differences between values, while a reference level is an extra choice. This small model explains why a periodic <Poisson equation> needs both a compatibility condition and a normalization.