The finite difference method is a method for solving partial differential equations (PDEs). For example a PDE will involve a function u(x) defined for all x in the domain with respect to some given boundary condition. The purpose of the method is to determine an approximation to the function u(x).
The method requires the domain to be replaced by a grid. At each grid point each term in the partial differential is replaced by a difference formula which may include the values of u at that and neighbouring grid points. By substituting the difference formulae into the PDE, a difference equation is obtained.
In time-dependent PDEs, the FDM may be used in both space and time (as it is in the finite-difference time-domain (FD-TD) method in electromagnetics) or it may be used for the time component only, as is the case in the method of lines.