Learning path

Full curriculum

Full curriculum

Unit content

Finite-difference discretization of differential equations

A differential equation defined over a continuous domain can be approximated on a finite set of grid points by replacing derivatives with finite-difference formulas.

For example, the second derivative can be approximated on a uniform grid by

$$u''(x_i)\approx\frac{u_{i+1}-2u_i+u_{i-1}}{h^2}.$$

Substituting such formulas into a differential equation produces algebraic equations for the unknown grid values.

Boundary conditions determine how values at the ends or edges of the grid are constrained. For time-dependent equations, spatial discretization is combined with a time-stepping method.

Refining the grid should reduce discretization error only when the discrete equations approximate the intended continuous problem appropriately and the numerical scheme remains well behaved under refinement.

Finite differences provide a general bridge from differential equations to finite computation; fluid, heat and wave simulations then add domain-specific conservation laws and numerical choices.