Explicit Scheme, boundary conditions
The boundary conditions are
u(0,t)=a(t)t≥0,
and
u(L,t)=b(t)t≥0,
where
a(t) and
b(t) are two functions which depend on time only, while
g(x) depends only on the position
x.
Our next step is to find a numerical algorithm for solving this equation. Here we recur
to our familiar equal-step methods
and introduce different step lengths for the space-variable
x and time
t through
the step length for
x
Δx=1n+1
and the time step length
Δt. The position after
i steps and
time at time-step
j are now given by
tj=jΔtj≥0xi=iΔx0≤i≤n+1