The method of choice for any engineer given a differential equation to solve is to numerically approximate it using a finite difference scheme, which is to approximate the continous differential equation with a discrete difference equation, and solve this difference equation.
In the following we implement the two schemes described in chapter 14.7 of Hull (1993), the implicit finite differences and the the explicit finite differences.
Brennan and Schwartz (1978) is one of the first finance applications of finite differences. Section 14.7 of Hull (1993) has a short introduction to finite differences. Wilmott et al. (1994) is an exhaustive source on option pricing from the perspective of solving partial differential equations.
For European options we do not need to use the finite difference scheme, but we show how one would find the european price for comparison purposes. We show the case of an explitit finite difference scheme. This is an alternative to the implicit finite difference scheme The explicit version is faster, but a problem with the explicit version is that it may not converge. The following follows the discussion of finite differences starting on page 356 of Hull (1993).