Jacobi's algorithm extended to the diffusion equation in two dimensions, the second derivative
The second derivative with respect to \( y \) reads
$$
\begin{equation*}
u_{yy}\approx \frac{u^{l}_{i,j+1}-2u^{l}_{i,j}+u^{l}_{i,j-1}}{h^2}.
\end{equation*}
$$
We use now the so-called backward going Euler formula for the first derivative in time. In its discretized form we have
$$
\begin{equation*}
u_{t}\approx \frac{u^{l}_{i,j}-u^{l-1}_{i,j}}{\Delta t},
\end{equation*}
$$
resulting in
$$
\begin{equation*}
u^{l}_{i,j}+4\alpha u^{l}_{i,j}- \alpha\left[u^{l}_{i+1,j}+u^{l}_{i-1,j}+u^{l}_{i,j+1}+u^{l}_{i,j-1}\right] = u^{l-1}_{i,j},
\end{equation*}
$$
where the right hand side is the only known term, since starting with \( t=t_0 \), the right hand side is entirely
determined by the boundary and initial conditions. We have \( \alpha=\Delta t/h^2 \).