Finite Differences

Most PDEs cannot be solved by a tidy formula. The practical route is numerical: chop space and time into a grid and replace each partial derivative with a difference quotient. For the heat equation u_t = \alpha u_{xx} on a grid with spacing \Delta x and time step \Delta t, write u_i^n \approx u(x_i, t_n) and approximate:

u_t \approx \frac{u_i^{n+1} - u_i^n}{\Delta t}, \qquad u_{xx} \approx \frac{u_{i+1}^n - 2u_i^n + u_{i-1}^n}{\Delta x^2}.

The explicit update rule

Substitute and solve for the one unknown at the new time level, u_i^{n+1}. Writing the mesh ratio r = \alpha\,\Delta t/\Delta x^2, the explicit scheme is

u_i^{n+1} = u_i^n + r\big(u_{i+1}^n - 2u_i^n + u_{i-1}^n\big).

Each new value is computed directly from three old neighbours — no equations to solve, just arithmetic marched forward in time. The pattern of grid points it touches is the stencil: three points at the current level feeding one at the next. It is the discrete echo of the heat equation's meaning — each point edges toward the average of its neighbours.

The stencil

The three filled points at the lower level are the known values u_{i-1}^n, u_i^n, u_{i+1}^n; the arrows feed them into the single new value u_i^{n+1} directly above. Sweep this stencil across the grid and step forward to advance the whole solution one time level.