18 Rate of change
Imagine a car trip along a scenic road such as that shown in Figure 18.1. As the trip proceeds, the position varies; position is a function of time. The graph’s horizontal axis marks the elapsed time from the start of the trip. The vertical axis denotes the distance from the starting point.
At the end of the hour’s journey, the car’s position has changed by 25 miles from the start. The rate of change of the car’s position is a ratio: the change in position divided by the change in time:
Writing this as “25 miles per hour” is more compact, with the small word “per” doing the job of reminding that the quantity was produced by dividing change in position by change in time.
18.1 Outputs versus rates of change
Using functions to describe the car-trip situation, we can say that position is a function of time. We will call it
A rate of change for the function can be calculated by choosing two different values for time and evaluating the function at those times. The evaluation produces two different values for the output position. Calling the two times
The average rate of change of
The division of
A quantity with dimension L/T is utterly different than a quantity of dimension L or a quantity of dimension T. In other words, “25 miles per hour” is neither a position nor a time, it is a velocity.
One way to see that velocity is a different kind of quantity than position or time is that you measure the quantities in different ways. You might measure position by noting the passage of a mile marker along the side of the road. You can measure time by reference, say, to your level of boredom or by checking a clock or watch. Divide change in position by change in time to get velocity. But you can also sense velocity directly, by the level of noise in the car or the blurring of nearby objects along the road.
On a graph, you also measure in different ways changes in the input to a function and the corresponding changes in output. As always, start by picking the endpoints of an interval in the domain of the function. As an example, ?fig-stop-and-go-b marks the endpoints of an interval with
Draw a rectangle connecting the function values at the start and end of the interval. The change in input is the horizontal extent of the rectangle. The change in output is the vertical extent of the rectangle. If “vertical” and “horizontal” are enough to point out that the two measures are of different kinds of things, you will be reminded by your having to use two different scales for the two measurements.
Over the interval marked, the average rate of change of the function is still another kind of perceived quantity, the “slope” of the diagonal of the rectangle. Unfortunately, graphs do not typically include a scale for slope, but we have added a scale to Figure 18.2. From the slope scale, you can easily see that the average rate of change is a little less than 30 miles per hour.
18.2 Slope at a point
With a slope scale, you can dispense with the laborious process shown in ?fig-stop-and-go-b: marking an interval, drawing a rectangle, measuring the vertical change, etc. The slope scale lets you read off the rate of change at a glance: pick a point in the domain, look at the slope of the function at that point, and compare it to the slope scale.
Perhaps you can see that formally defining an interval isn’t an absolute necessity for defining a slope. Instead, you can perceive slope directly from a graph, even if it is hard to quantify without a special scale.
Using the slope scale in Figure 18.3, estimate the function’s slope at input
Place a ruler on the function graph so that the rule touches the graph at
At
The function’s slope at a specific input like
18.3 Slope function
Figure -Figure 18.3 shows that the rate of change of the car-position function changes during the trip. In other words, the rate of change of position is itself a function of time.
In general, for a function
where
A fun but unconventional way to display a slope function is to show the literal slope of
The conventional way to display a slope function is to show the numerical value of the slope by the position on the vertical axis, as in Figure 18.5. Such a graph is easy to read, but provides nothing but the axis label to remind you that the scale on the vertical axis is the slope of another function.
18.4 Average rate of change
In Chapter Chapter 19, we will start working with the instantaneous rate of change of a function. That concept is so important that you will tend to forget there was any such thing as the “average rate of change” over an interval.
Nevertheless, average rate of change can be a useful concept in many circumstances. To illustrate, Figure 18.6 shows a simplified model of the amount of usable wood harvestable from a typical tree in a managed forest of Ponderosa Pine. (You can see some actual forestry research models here.) Such a model, even if simplified, can provide useful insight for forestry planning.
The overall pattern in ?fig-over-tree is that the tree continues to grow until year 50, when it seems to have reached an equilibrium: perhaps growth goes to zero, or rot balances growth.
If managing a forest for wood production, it seems sensible to try to get as much wood out of the tree as possible. The maximum volume of wood occurs, in ?fig-over-tree, at about year 50. Does that mean that harvesting at year 50 is optimal? If not, when is the best time?
Good forestry practices are “sustainable.” Forests are managed to be continually productive rather than subject to a one-time extraction of value followed by desolation. For sustainability, it is important to consider the life cycle of the forest. After all, continual productivity implies that the forest will continue to produce value into the indefinite future.
One implication of managing for sustainability is that the quantity to optimize is not the volume of wood from a one-time harvest. Rather, it is the rate (per year) at which wood can be sustainably extracted from the forest.
Around year 25, the tree adds usable wood at the fastest instantaneous rate. This might suggest to some that a good time to harvest is near year 25. But, in fact, it makes no sense to harvest at the time of maximum rate of growth; why kill the tree when it is being most productive?
A better quantity to look at for deciding when to harvest is the average rate of growth in the volume of wood. Remember that “average rate of change” is the rate of change over an extended interval. For wood harvesting, the relevant interval is the time from planting until harvest.
Harvesting at year 25 will give a total change of 600 board feet over 25 years, corresponding to an average rate of change of
It is easy to construct a diagram that indicates whether year 35 is best for the harvest. Recall that our fundamental model of change is the straight-line function. So we will model the model of tree growth as a straight-line function. Like the model in Figure 18.6, our straight-line model will start with zero wood when planted. Furthermore, to be faithful to Figure 18.6, we will insist that the straight-line intersect or touch that curve.
Figure 18.7 reiterates the Figure 18.6 model of the tree annotated with several straight-line models that all give zero harvest-able wood at planting time. Each green line represents a scenario where harvest occurs at
Choose a harvest time that produces the steepest possible green segment to maximize average lumber volume per year. From Figure 18.7, that steepest line glances the growth curve near year 31 (shown as
It is best to find the argmax by creating a function that shows explicitly what one is trying to optimize. (In Chapter 24, we will use the name objective function to identify such function.) Here, the objective function is
The graph of ave_growth(year) makes clear the maximum average growth from planting to harvest will occur at about year 32.
There is no point waiting until after year 50.
At year 25, the tree is growing as fast as ever. You will get about 600 board feet of lumber.1 Should you harvest at year 25? No! That the tree is growing so fast means that you will have a lot more wood in years 26, 27, etc. The time to harvest is when the growth is getting smaller so that it is not worth waiting an extra year.
18.5 Dimension of a rate of change
The function named
The outputs of the two functions,
The dimension of the quantity
Keep in mind that the dimension
Whereas the dimension of the output
Suppose
Another example: Imagine a function pressure() with that takes altitude above sea level (in km) and output pressure (in kPa, “kiloPascal”).2 The derivative function, let’s call it
18.6 Drill
Part 1 What is the average rate of change of the function in Figure 18.9 on the interval
0.5 1 1.5 2
Part 2 Consider the average rate of change of the function in Figure 18.9 on the interval
- very close to 1/2
- slightly less than 1
- slightly greater than 1
- very close to 2
18.7 Exercises
Exercise 17.02
Each of the plots shows the graph of a function. Two specific inputs, labelled
Part A In plot (1), what is the rate of change over the interval
-15/2 15/2 2/15 -2/15 8/2 -8/2 2/8 -2/8 -15/5
Part B In plot (2), what is the rate of change over the interval
-17/2 2/17 -10/2 10/2 2/10 -2/10 -17/-5
Part C We haven’t told you exactly how to do this yet, but give it a try. What is the rate of change near the point marked
-1/2 -1 -2 -3 -3/2 -4 -5
Exercise 17.04
From the graph in ?fig-water-average, compute the average rate of change over the interval
Exercise 17.05
We will be working extensively with the change in output value of a function when the input value changes.
The change in the output value of a function
when the input changes from to is Notice that when we talk about the change from to we subtract from . That change is sometimes called the rise in the value of the function. Rise always compares (by subtraction) the two output values corresponding to two specific input values. Remember that and stand for specific numbers.Corresponding with the idea of the change in output being
the change in the input value to a function is . This is often called the run in the value of the input.
Part A True or false: In Graph I, the rise from a to b is positive.
TRUE FALSE
Part B True or false: In Graph I, the run from
TRUE FALSE
Part C True or false: In Graph II, the run from a to b is positive.
TRUE FALSE
Part D True or false: In Graph II, the rise from a to b is positive.
TRUE FALSE
Part E True or false: In Graph II, the run from b to c is positive.
TRUE FALSE
Part F True or false: In Graph II, the rise from b to c is positive.
TRUE FALSE
Part G For an interval [2, 6] what is the value of the run? (The answer is independent of any particular graph/function.)
4 -4
Part H Which is the run of the interval [6, 2]? (Again, the answer is independent of any particular graph/function.)
4 -4
Exercise 17.06
Open an R sandbox. You can use these function definitions to help you in your calculations. ::: {.cell layout-align=“center” fig.showtext=‘false’}
<- makeFun(2*exp(x+1) ~ x)
f <- makeFun(3*exp(-x) ~ x)
g <- makeFun(x*exp(x) ~ x) h
:::
Using R, compute the average rate of change of the function over the given interval. Choose the closest answer for each problem.
Part A
-2.99 1.54 2.72 4.68 9.85 11.32
Part B
-2.99 1.54 2.72 4.68 9.85 11.32
Part C
-3 1.54 2.72 4.68 9.85 11.32
It is much less work if we use the R function c()
to define the interval, and the R function diff()
to calculate differences. The next sandbox contains an example asking you to compute the average rate of change of diff()
is doing.
<- c(0, 4) # creates the interval
interval diff(interval) # calculate the run
<- makeFun(exp(x) ~ x) # create the function
f f(interval) # evaluate function at the endpoints of the interval
diff(f(interval)) / diff(interval) # complete answer
Part D True or false: The average rate of change of
TRUE FALSE
Part E True or false: The average rate of change of
(Hint: Change the code above so the interval goes from 2 to 3 and f becomes the function
TRUE FALSE
Part F True or false: The average rate of change of
TRUE FALSE
Exercise 17.07
Consider the sinusoid function, graphed below.
Part A What is the average rate of change over the interval
0 0.5 1
Part B What is the average rate of change over the interval
-0.5 0 0.5
Part C What is the average rate of change over the interval
-0.05 -0.5 0 0.5
Exercise 17.08
For each of the following, compute the average rate of change of the function over the given interval.
Part A The average rate of change of
-2 -1 1 2
Part B The average rate of change of
-4 -2 0 1 2 4
Part C The average rate of change of
-24 -12 0 1 2 12 24
Part D The average rate of change of
-2 1.5 2 7 10
Exercise 17.09
In this question, we ask you to estimate the slope from a graph of the function. But the function is exponential, so not a straight line.
A fundamental idea in calculus is that even a function with a curved graph, if you zoom in closely around a given point, will look like a straight line. And you know how to calculate the slope of a straight line.
When the graph is curved, the slope will be different at different points along the graph. So there is not a single slope for the function. Still, we can talk about the “slope at a point.”
One way to specify a point on a function’s graph is to give the horizontal coordinate: the input to the function. But here we will give you the output of the function. So long as the function passes the horizontal-line test, as the exponential does, specifying any particular output in the function’s range uniquely identifies a corresponding input.
Estimate the slope of the exponential function
For each of (a)-(d), use a sandbox to plot the exponential function
Part A Using your answers for the slope at the points given in (a)-(d), choose the best answer to this question: What is the pattern in the slope as
- The slope at each value
is the same as . - The slope at each value
is the same as . - The slope at each value of
is the same as . - The slope at each value of
is the same as
Exercise 17.10
For each exercise, you are given a series of intervals that get smaller and smaller. Your job is to calculate the average rate of change of the function
<- c(__start__ , __end__ )
interval <- makeFun(x^2 ~ x)
f diff(f(interval)) / diff(interval)
A. Use these three intervals to estimate the instantaneous rate of change
B. Use these three intervals to estimate the instantaneous rate of change
C. Use these three intervals to estimate the instantaneous rate of change
Exercise 17.12
There is a web of connections between the pattern-book functions and their slopes.
Part A 1. Which pattern-book function has a slope function that is simply a input-shifted version of itself? (For small enough
exponential sinusoid logarithm power-law
Part B 2. Which pattern-book function has a slope function that is identical to itself? (For small enough
exponential sinusoid logarithm power-law
Part C 3. Which pattern-book function has a slope function that is another pattern-book function? (Hint: The other function is also listed among the choices.)
exponential sinusoid logarithm power-law
Exercise 17.13
Sometimes a bit of algebra can help us see what’s going on with the instantaneous rate of change. Consider the exponential function
Rather than writing the slope function definition with a 0.1, let’s substitute in the symbol
Part A Using a sandbox, find the value of
1.271828 1.694343 1.718282 e = 2.718282
The instantaneous rate of change involves making
Part B Using a sandbox, compute
Inf
NaN
Bogus
- An error message result.
Part C Using a sandbox, compute
- 1
- It varies with
, but is always around 1.5 for small enough - There is no particular result.