Jacobi's algorithm extended to the diffusion equation in two dimensions, the second derivative
The second derivative with respect to
y reads
uyy≈uli,j+1−2uli,j+uli,j−1h2.
We use now the so-called backward going Euler formula for the first derivative in time. In its discretized form we have
ut≈uli,j−ul−1i,jΔt,
resulting in
uli,j+4αuli,j−α[uli+1,j+uli−1,j+uli,j+1+uli,j−1]=ul−1i,j,
where the right hand side is the only known term, since starting with
t=t0, the right hand side is entirely
determined by the boundary and initial conditions. We have
α=Δt/h2.