(6) |
It is important to appreciate that the numerical solution to a differential
equation is only an approximation to the actual solution. The actual
solution, , to Eq. (5) is (presumably)
a continuous function of a continuous
variable, . However, when we solve this equation numerically, the best that we can
do is to evaluate approximations to the
function at a series of discrete grid-points, the (say), where
and
. For the moment, we shall restrict our
discussion to equally spaced grid-points, where
(7) |
The simplest possible integration scheme was invented by the celebrated
18th century Swiss mathematician Leonhard Euler, and is, therefore, called
Euler's method. Incidentally, it is interesting to note that virtually
all of the standard methods used in numerical analysis were invented
before the advent of electronic computers. In olden days, people
actually performed numerical calculations by hand--and a very long and tedious
process it must have been! Suppose that we have evaluated
an approximation, , to the solution, , of Eq. (5) at the grid-point
. The approximate gradient of at this point is, therefore, given by
(8) |
(9) |