= Solution
With $\mathbf u=(u_1,\ldots,u_n)^T$ and $\mathbf b=h^2(f_1,\ldots,f_n)^T$, the system is
$$
\boxed{
A\mathbf u=\mathbf b,
\qquad
A=
\begin{pmatrix}
-2&1\\
1&-2&1\\
&\ddots&\ddots&\ddots\\
&&1&-2&1\\
&&&1&-2
\end{pmatrix}.}
$$
Its diagonal part is $D=-2I$. The <weighted Jacobi method>, also called the <Relaxed Jacobi method>, is
$$
\mathbf u^{(\nu+1)}
=\mathbf u^{(\nu)}
+\omega D^{-1}
\left(\mathbf b-A\mathbf u^{(\nu)}\right).
$$
Componentwise,
$$
\boxed{
u_i^{(\nu+1)}
=(1-\omega)u_i^{(\nu)}
+\frac{\omega}{2}
\left(u_{i-1}^{(\nu)}+u_{i+1}^{(\nu)}-h^2f_i\right),}
$$
with $u_0^{(\nu)}=u_{n+1}^{(\nu)}=0$.
Back to article page