
Let’s examine the following two-point boundary-value problem:
Notice the first-order derivative term is missing from the differential equation. This omission is made without the loss of generality, as demonstrated in “z”(t) + p(t)z'(t) + q(t)z(t) = f(t) transformed“.
Following the approach in “Applying the Finite Difference Method to Boundary-Value Problems 1“, we first divide the interval into
sub-intervals, each of length
by the grid points
Next, the derivative is replaced by its finite difference approximation from “Deriving Finite Difference Approximations of the Derivatives“:
Since the solution satisfies the following relationships:
we consider to be the approximations of the solution
at the the grid points
if they satisfy the equations:
where and
.
In matrix form, (*) is a system of linear equations in the
unknowns
:
Solving this linear system yields for
.