finite-difference method

Quick Reference

A widely applicable discretization method for the solution of ordinary and partial differential equations. In this approach all derivatives are replaced by approximations that involve solution values only, so in general the differential equation is reduced to a system of nonlinear equations or linear algebraic equations. For example, in the problem

y″ + by′ + cy = d 0≤x≤1,

y(0) = α, y(1) = β,

where b, c, d, α, and β are given constants, the interval [0,1] is first divided into equal subintervals of length h; h is called the stepsize (or mesh or grid size). This gives the mesh points (or grid points) xn

xn = nh,

n = 0,1,…,N+1,

h = 1/(N+1)

At interior mesh points the derivatives are now replaced by finite-difference approximations, e.g.

y′(xn) ≊ (½h)[y(xn+1) — y(xn−1)]

y″(xn) ≊ (1/h2)[y(xn+1) – 2y(xn) + y(xn−1)]

When combined with the boundary conditions these approximations result in a system of equations for approximations to

y(xn), n = 1, 2,…, N

. Nonlinear differential equations yield a system of nonlinear equations.

Subjects: Computing.

Reference entries