Solution (source code)

= Solution

Subtracting the fixed point from the <weighted Jacobi method> gives
$$
\mathbf e^{(\nu+1)}=H_\omega\mathbf e^{(\nu)},
\qquad
\boxed{H_\omega=I-\omega D^{-1}A=I+\frac{\omega}{2}A.}
$$
Put $x=\pi/(n+1)$. Acting on the supplied sine <eigenvector> gives
$$
(A\mathbf v_k)_i
=\sin((i-1)kx)-2\sin(ikx)+\sin((i+1)kx)
=[-2+2\cos(kx)]\sin(ikx).
$$
Therefore
$$
\boxed{\lambda_k(A)
=-2+2\cos(kx)
=-4\sin^2\frac{kx}{2},}
$$
and the corresponding eigenvalues of the <iteration matrix> are
$$
\boxed{\lambda_k(\omega)
=1+\frac{\omega}{2}\lambda_k(A)
=1-\omega+\omega\cos(kx)
=1-2\omega\sin^2\frac{kx}{2}.}
$$