structural:expansion
Numerical solutions to second-order one-dimensional boundary value problems

Boundary value problems (BVPs) are usually solved numerically by solving an approximately equivalent matrix problem obtained by discretizing the original BVP. The most commonly used method for numerically solving BVPs in one dimension is called the Finite Difference Method. This method takes advantage of linear combinations of point values to construct finite difference coefficients that describe derivatives of the function. For example, the second-order central difference approximation to the first derivative is given by:

and the second-order central difference for the second derivative is given by:

In both of these formulae, h = x i − x i − 1 {\displaystyle h=x_{i}-x_{i-1}} is the distance between neighbouring x values on the discretized domain. One then constructs a linear system that can then be solved by standard matrix methods. For example, suppose the equation to be solved is:

The next step would be to discretize the problem and use linear derivative approximations such as

and solve the resulting system of linear equations. This would lead to equations such as:

On first viewing, this system of equations appears to have difficulty associated with the fact that the equation involves no terms that are not multiplied by variables, but in fact this is false. At i = 1 and n − 1 there is a term involving the boundary values u (0) = u 0 {\displaystyle u(0)=u_{0}} and u (1) = u n {\displaystyle u(1)=u_{n}} and since these two values are known, one can simply substitute them into this equation and as a result have a non-homogeneous system of linear equations that has non-trivial solutions.