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
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,
At interior mesh points the derivatives are now replaced by finite-difference approximations, e.g.
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.