You should already be familiar with the idea of analytical differentiation and be able to differentiate simple functions like
and
.
If you don’t know how to do this, look it up now in any A level textbook or the relevant section of the Calculus Wikibook.
Sometimes functions are highly non-linear and a closed form for the derivative may be difficult to calculate. For example
Alternatively,
can be defined as the solution to an equation, so we can not calculate a closed form for
to which the traditional rules of differentiation may be applied.
In such cases we may calculate a numerical approximation for the derivative using the following difference formulae.
Suppose
.
Let the points
be equally spaced over the interval
, and let
.
Now let
.
is given by:
is given by:
is given by:
is given by:
Where
is assumed to be small, the smaller
is, the better the approximation becomes.
The derivation of these forms is undertaken in the next exercise.