Finite Difference Methods for PDEs
Finite difference methods approximate partial derivatives on a discrete grid. They are the most direct approach to numerical PDEs and provide the clearest illustration of stability, consistency, and convergence concepts.
Discretization of Differential Operators
On a grid with spacing , standard finite difference approximations include:
- Forward: ()
- Backward: ()
- Central: ()
- Second derivative: ()
The five-point Laplacian on a 2D grid: .
The Poisson equation on the unit square with Dirichlet boundary conditions, discretized on an grid, gives a system where is the block tridiagonal matrix with the 5-point stencil. The matrix is SPD, sparse (at most 5 nonzeros per row), and has condition number .
Heat Equation: Explicit and Implicit Schemes
For , the Forward Time Central Space (FTCS) scheme is , or where . The scheme is stable if and only if (CFL condition), giving . This severe restriction makes FTCS impractical for fine grids.
The Crank-Nicolson scheme averages the explicit and implicit discretizations: where . Crank-Nicolson is unconditionally stable (no CFL restriction) and second-order in both time and space: . It requires solving a tridiagonal system at each time step, costing .
Wave Equation
For , the standard explicit scheme where is stable iff (CFL condition). At the scheme is exact (it reproduces d'Alembert's solution), a remarkable property not shared by other PDEs. The CFL condition has a physical interpretation: the numerical domain of dependence must contain the physical domain of dependence.