4 Methods for calculating gradient
Occasionally you may be faced with two different pairs of values or coordinates with which to determine the parameters of a linear function. Put another way, two pairs of values are needed to determine the two (unknown) parameters. Perhaps, unconsciously, you might have used this result already when carrying out the rain barrel task. The gradient, written as in the answer, may be expressed also as since the line connects the (time, level of water) coordinates (20, 1.5) with (0, 0). In general the gradient is given by
Once the gradient of the line has been calculated, it can be used with one of the known points to determine the intercept. If one of the points is (0, 0) the intercept is zero.
Suppose that a new type of automatic car is being road tested. The measuring team wants to know the maximum acceleration between and . It plans to calculate this by assuming that it is constant and measuring the time taken from rest to achieve a speed of at maximum acceleration. In their first test the speedometer reading is after 12 s from start of timing and motion. We can think of these values in terms of (time, velocity) coordinates. At the start of timing the coordinates are . When the speedometer reads the coordinates are . If the acceleration is constant then its magnitude will be given by the gradient of the line joining these two points. Using the ‘change in variable idea’, the gradient is , and so the magnitude of the acceleration is . The ’change in variable’ route to calculating the gradient is an abridged version of a more general method. The two pairs of coordinates may be used with the general equation of a line to work out the parameters of the particular line that passes through these two points. The assumption of constant acceleration leads to a linear relationship between the velocity ( ) and time ( s) of the form where and are the parameters corresponding to gradient and intercept respectively. The road test gives = 0 when = 12. These may be substituted into the general form to give
0 = 0 + and 30 = 12 + .
You may recognise that these are simultaneous equations. The first gives = 0 which may be substituted into the second to give = 2.5, corresponding to an acceleration of as before.
Suppose that the test team carry out a second test. In this test they note when speeds of and are reached and assume constant acceleration between these times and speeds. The speedometer reads , after 4 seconds from the start of motion and after 9 s from the start of motion. We apply the general method to the data from this test. The (time, velocity) coordinates corresponding to the readings are and . The equations resulting from substitutions in the general form are
We use the elimination method of solving these simultaneous equations ( HELM booklet 3). The first of these equations may be subtracted from the second to eliminate .
or
The resulting value of may be substituted into either of the equations expressing the data to calculate . In the first, , so The resulting model is
This model predicts an acceleration of , which is fairly close to the previous result of but if we try to use this model at = 0, what do we predict? The model predicts that when This is not consistent with being the time at which the vehicle starts to move! So, even if the acceleration is constant between 15 and , it does not have the same values between and 15 m as either between 15 m and 27 m and . A more general principle is illustrated by this example. It may be dangerous to use a model based on certain data at points other than those given by these data! The business of using a model outside the range of data for which is is known to be valid is called extrapolation . Use of the model between the data points on which it is based is called interpolation . So the general principle may also be stated as that it is very risky to extrapolate and it can be risky to interpolate . Nevertheless extrapolation or interpolation may be part of the purpose for a mathematical model in the first place.
The method of finding gradient and intercept just exemplified may be generalised. Suppose that we are specifying a linear function where the dependent variable is and the independent variable is . We represent two known points by and The gradient, , for the straight line, may be calculated either from or by substituting when in to obtain two simultaneous equations. Subtraction of these eliminates and allows to be calculated. The intercept of the line on the y-axis, , may be found by substitution in , of either and or and .
Task!
Use the general method to deduce the different accelerations (assuming that they are constant) between the start of motion and and between velocities of and .
For the (time, velocity) coordinates and ,
From the first of these b = 0 and hence, in the second, So the acceleration up to is . For the (time, velocity) coordinates and ,
Subtracting the first from the second gives
so the acceleration between and is
Linear functions may be useful in economics. A lot of attention is paid to the way in which demand for a product varies with its price. A measure of demand is the number of items sold, if available, in a given period. For example, the purpose might be to determine the best price for a product given certain details about costs and with certain assumptions about the way the number of items sold per month varies with price. The price affects the profit and hence, in turn, the number manufactured in response to the demand. The number of items manufactured in a given period is known as the supply . Information about the variation of demand or supply with price may be obtained from market surveys. Constant functions are not appropriate in this context since both demand and supply vary with price. In the absence of other information the simplest way to model the variation of either demand or supply with price is to use a linear function.
Task!
When the price of a luxury consumer item is £ , a market survey reveals that the demand is 100,000 items per year. However another survey has shown that at a price of £ , the demand for the item is 200,000 items per year. Assuming that both surveys are valid, find a linear function that relates demand to price . What demand would be predicted by the linear function at a price of £ ? Comment on the validity of both predictions.
The linear function will be of the form
The limits on represent the given range of data on price. Substituting the first pair of values of and :
Substituting the second pair of values:
Subtracting the first expression from the second:
Note that the negative gradient is consistent with the fact that demand falls as price increases. Check that the ‘Change in variable’ definition for finding works.
Change in dependent variable
Corresponding change in independent variable The ratio of these changes is
This value of may be used with the first pair of values,
so
and the linear function relating demand and price is
[A precautionary check is to make sure that this result is consistent with the other pairs of values. When , as required.] When = 750:
So a linear relationship between demand and the price for this luxury suggests a demand of 162500 items per year when the price per item is £ . At a price of £ , = 500, and the model predicts that
So the linear model suggests a demand of 225,000 items per year when the price per item is £ . Such a price however is outside the range of given data. Consequently the corresponding demand prediction represents an extrapolation and this might not be reliable. On the other hand, the price of £ lies within the given range of data and the corresponding demand prediction is an interpolation. If the given data points are close to each other then interpolation between these points is more reliable than extrapolation to points further away.