Dissipative second-order forward advection semidiscretization (source code)

= Dissipative second-order forward advection semidiscretization
{title2=$u'_m=h^{-1}(-3u_m/2+2u_{m+1}-u_{m+2}/2)$}

For periodic indexing let $S$ be the unitary forward shift. The operator is $A=-3I/2+2S-S^2/2$. A <discrete Fourier transform> diagonalizes it with eigenvalue $\lambda(\theta)=-3/2+2e^{i\theta}-e^{2i\theta}/2$ and real part $-(1-\cos\theta)^2$. Consequently $\|e^{tA/h}\|_2\le1$ for every $t\ge0$, uniformly in the grid. Equivalently $A+A^*=-\tfrac12(2I-S-S^*)^2$, proving decay of the discrete energy directly. The result is semidiscrete <stability>; a further time discretization must also have adequate <absolute stability>.