= Finite difference method
{wiki}
A <finite difference method> approximates a <differential equation> by replacing <derivatives> with weighted combinations of nearby sampled <function> values. <Finite difference coefficients> are chosen by matching low-degree <polynomials> or a <Taylor expansion>. The resulting unknowns live on a grid, where the differential equation becomes a system of algebraic update or boundary equations.
For the one-dimensional <heat equation> $u_t=\nu u_{xx}$ with $\nu>0$, a <forward Euler method> in time and a <second-order central difference> in space give
$$
U_j^{n+1}=U_j^n+r(U_{j-1}^n-2U_j^n+U_{j+1}^n),\qquad r=\nu\Delta t/h^2.
$$
For $0\leq r\leq1/2$, the coefficients are nonnegative and sum to one, so each new value is a <convex combination> of neighboring values. This yields a <maximum norm> contraction for compatible homogeneous boundaries.<Finite Difference Computing with PDEs by Hans Petter Langtangen and Svein Linge>[Chapter3, section3.1, Forward Euler discretization of one-dimensional diffusion]{ref}
<Consistency of a numerical method> measures how accurately the grid equation reproduces a smooth exact solution; <stability of a numerical method> controls propagation of perturbations. Both matter for <numerical convergence>. A correct interior formula also needs a compatible <boundary closure of a difference scheme> and suitable <initial conditions>.
Back to article page