2 First derivatives
Our aim is to approximate the slope of a curve at a particular point in terms of and the value of at a nearby point where . The shorter broken line Figure 11 may be thought of as giving a reasonable approximation to the required slope (shown by the longer broken line), if is small enough.
Figure 11
So we might approximate
This is called a one-sided difference or forward difference approximation to the derivative of .
A second version of this arises on considering a point to the left of , rather than to the right as we did above. In this case we obtain the approximation
This is another one-sided difference , called a backward difference , approximation to .
A third method for approximating the first derivative of can be seen in Figure 12.
Figure 12
Here we approximate as follows
This is called a central difference approximation to .
Key Point 11
First Derivative Approximations
Three approximations to the derivative are
-
the one-sided (forward) difference
-
the one-sided (backward) difference
- the central difference
In practice, the central difference formula is the most accurate.
These first, rather artificial, examples will help fix our ideas before we move on to more realistic applications.
Example 18
Use a forward difference, and the values of shown, to approximate the derivative of at .
Work to 8 decimal places throughout.
Solution
One advantage of doing a simple example first is that we can compare these approximations with the ‘exact’ value which is
Note that the accuracy levels of the four approximations in Example 15 are:
- 1 d.p.
- 2 d.p.
- 3 d.p.
-
3 d.p. (almost 4 d.p.)
The errors to 6 d.p. are:
- 0.023537
- 0.002486
- 0.000250
-
0.000025
Notice that the errors reduce by about a factor of 10 each time.
Example 19
Use a central difference, and the value of shown, to approximate the derivative of at .
Work to 8 decimal places throughout.
Solution
This time successive approximations generally have two extra accurate decimal places indicating a superior formula. This is illustrated again in the following Task.
Task!
Let
and
. Using both a forward difference and a central difference, and working to 8 decimal places, approximate
using
and
.
(Note that this is another example where we can work out the exact answer, which in this case is
.)
Using the forward difference we find, for
and for we obtain
Using central differences the two approximations to are
and
The accurate answer is, of course, 0.33333333
There is clearly little point in studying this technique if all we ever do is approximate quantities we could find exactly in another way. The following example is one in which this so-called differencing method is the best approach.
Example 20
The distance of a runner from a fixed point is measured (in metres) at intervals of half a second. The data obtained are
Use central differences to approximate the runner’s velocity at times s and s.
Solution
Our aim here is to approximate
. The choice of
is dictated by the available data given in the table.
Using data with
s at its centre we obtain
Data centred at s gives us the approximation
Note the value of used.
Task!
The velocity (in ) of a rocket measured at half second intervals is
Use central differences to approximate the acceleration of the rocket at times s and s.
Using data with s at its centre we obtain
.
Data centred at s gives us the approximation
.