Solution (source code)

= Solution
{c}

With zero boundary values eliminated, the diagonal of $L_h$ is $-4I/h^2$. The <Jacobi method> is therefore
$$
J=I+\tfrac14h^2L_h,
$$
which averages the four neighboring components. The <sine> addition identity shows that the supplied product vectors are <eigenvectors>, with
$$
\boxed{\lambda_{pq}(J)=\tfrac12[\cos(p\pi h)+\cos(q\pi h)].}
$$
The discrete <sine> vectors form a basis, so these are all <eigenvalues>. Their largest modulus is
$$
\boxed{\rho(J)=\cos(\pi h),}
$$
attained at the lowest and highest <sine> frequencies. Thus the asymptotic error reduction factor per iteration is $\cos(\pi h)$. If the convergence rate is expressed logarithmically, $R=-\log\rho(J)\sim\pi^2h^2/2$ as $h\to0$. A fixed error reduction therefore takes $O(h^{-2})$ Jacobi sweeps. For the special grid $m=2$, $J=0$ and one sweep solves its single interior equation.