Average rate of change over [a, b]: Difference quotient
Given a function $f$, the
average rate of change of $f(x)$ over the interval $[a, b]$ is
Average rate of change | $\displaystyle = \frac{\Delta f}{\Delta x} = \frac{f(b) - f(a)}{b - a}$. |
| $=$ Slope of line through points $P$ and $Q$ (see the interactive graphic). |
We also call this average rate of change the
difference quotient of $f$ over the interval $[a, b]$.
Alternative Formulation: Average Rate of Change of over [a, a+h]
(Replace $b$ by $a+h$): The average rate of change of $f(x)$ over the interval $[a,a+h]$ is
Average rate of change $\displaystyle = \frac{f(a+h) - f(a)}{h}$.
Units
The units of the average rate of change are units of $f$ per unit of $x$.
Average rate of change calculators
Use the handy little utilities below to compute the average rate of change of any function you enter.
Examples: Average rate of change over [a, b]: Difference quotient
Let $f(x) = 2x^2-4x+1$. Then the average rate of change of $f$ over the interval $[2,4]$ is
$\displaystyle \frac{f(b) - f(a)}{b - a}$ | $\displaystyle = \frac{f(4) - f(2)}{4 - 2}$ |
| $\displaystyle = \frac{17 - 1}{2} = 8$. |
Interpretation: If, say, $x$ represents the year since January 2013, and $f(x)$ represents the accumulated revenue of your company (in millions of dollars) since that time, then the units of measurement of the average rate of change are
millions of dollars per year. Thus, your company earned an average annual revenue of &D&8 million per year over the period January 2015 ($t = 2$) to January 2017 ($t = 4$).
Let $f(x) = x^2-x$. Then the average rate of change of $f$ over the interval $[3, 3+h]$ is
$\displaystyle \frac{f(a+h) - f(a)}{h}$ | $\displaystyle = \frac{f(3+h) - f(3)}{h}$ |
| $\displaystyle = \frac{[(3+h)^2 - (3+h)] - [3^2 - 3]}{h}$ |
| $\displaystyle = \frac{9 + 6h + h^2 - 3 - h - 9 + 3}{h}$ |
| $\displaystyle = \frac{6h + h^2 - h}{h} = \frac{h(6 + h - 1)}{h}$ |
| $\displaystyle = 6 + h - 1$ |
|
Practice:
Practice:
Instantaneous Rate of Change at x = a: Derivative
Given a function $f$, we think of the
instantaneous rate of change of $f(x)$ at $x = a$ as the average rate of change measured over a very small interval $[a, a+h]$. More precisely, it is defined by taking the limit of the average rates of change over the intervals $[a,a+h]$ as $h$ approaches 0.
Instantaneous rate of change | $\displaystyle = \lim_{h \to 0}\frac{f(a+h) - f(a)}{h}$. |
We also call this instantaneous rate of change the
derivative of $f$ at $a$, and write it as $f'(a)$ (read "$f$ prime of $a$"). Its units of measurement are units of $f(x)$ per unit of $x$. Thus,
$\displaystyle f'(a) = \lim_{h \to 0}\frac{f(a+h) - f(a)}{h}$.
Notes
- $f'(a)$ = Instantaneous rate of change of $f$ at the point $a$. Thus,
$f'(x)$ = Instantaneous rate of change of $f$ at the point $x$.
Hence, the derivative $f'(x)$ is a function of $x$, as its value can change with $x$.
- As $f'(a)$ is a limit, it may or may not exist. That is, the quantities $\frac{f(a+h) - f(a)}{h}$ may or may not approach a fixed number as $h$ approaches zero. If everything works out fine and the limit exists, then we say that $f$ is differentiable at $a$. Otherwise, we say that $f$ is not differentiable at $a$.
- To talk about $f'(a)$, we require that $a$ be an interior point of the domain of $f$; that is, we require that $f(x)$ be defined for all $x$ in some open interval about $x=a$. Thus, for instance, we do not talk about $f'(a)$ if $a$ is an endpoint of the domain of $f$.
Example: Instantaneous Rate of Change at x = a: Derivative
Let $f(x) = 2x^2-4x+1$. You can use the (blue) average rate of change calculator above to verify that, for very small values of $h$, $\dfrac{f(2+h) - f(2)}{h} \approx 4$. Thus, the instantaneous rate of change of $f$ at $x = 2$ is
(We will see how to do calculations like this below.)
Interpretation
If, say, $f(x)$ represents the annual profit of your company (in millions of dollars) and $x$ represents the year since January 2015, then the units of measurement of the instantaneous rate of change are
millions of dollars per year. Thus, your company's annual profit was increasing at a rate of &D&4 million per year at the start of 2017 ($t = 2$).
Numerical approach
To compute an approximate value of $f'(a)$ (for a given value of $a$) numerically, one can use either:
- A table of values
- A "quick approximation"
The first approach shows better and better approximations, sometimes allowing you to guess the exact value, while the second method gives a quick estimate.
Using a table
In a table, compute a succession of values of difference quotients
$\dfrac{f(x+h) - f(x)}{h}$
for smaller and smaller values of $h$, and decide what number these values are approaching. (See the example below.)
Quick approximation: Forward difference quotient
Use a single small value for $h$ such as $h = .0001$, and compute the difference quotient:
$\dfrac{f(x+0.0001) - f(x)}{0.0001} \qquad$
The smaller $h$, the better the approximation. (See the example below.)
Quick approximation: Balanced difference quotient
The following formula often gives a better estimate of the derivative:
$\dfrac{f(x+0.0001) - f(x-0.0001)}{0.0002} \qquad$
The smaller $h$, the better the approximation. (See the example below.)
Quick approximation calculators
Enter a function, enter the point $a$, adjust $h$ if you want, and press "Compute".
Examples: Numerical approach
Continuing with the example $f(x) = 2x^2-4x+1$. let us compute an approximate value of $f'(2)$.
Using a table
The difference quotient (with $a = 2$) is
$\dfrac{\color{blue}{f(2+h)} - \color{indianred}{f(2)}}{h} = \dfrac{\color{blue}{2(2+h)^2-4(2+h)+1} - \color{indianred}{2(2)^2-4(2)+1}}{h}$
The following table shows the value of this difference quotient for several values of $h$ approaching zero.
h | 1 | 0.1 | 0.01 | 0.001 |
Difference Quotient | 6 | 4.2 | 4.02 | 4.002 |
As $h$ gets smaller, we see that the value gets closer and closer to 4, so we conclude
Using a forward difference quotient
We use the same formula as above, but with $h = 0.0001:$
$\dfrac{\color{blue}{f(2+0.0001)} - \color{indianred}{f(2)}}{0.0001} = \dfrac{\color{blue}{f(2.0001)} - \color{indianred}{f(2)}}{0.0001}$ |
$\qquad = \dfrac{\color{blue}{2(2.0001)^2-4(2.0001)+1} - \color{indianred}{2(2)^2-4(2)+1}}{h}$ |
$\qquad = 4.0002.$ |
(We could have used the little red utility above to do this calculation.)
Notice that the forward difference quotient method does not give the exact answer (4), but the balanced difference quotient will in this case:
Using a balanced difference quotient
This time we use the balanced difference quotient formula with $h = 0.0001:$
$\dfrac{\color{blue}{f(2+0.0001)} - \color{indianred}{f(2-0.0001)}}{0.0002} = \dfrac{\color{blue}{f(2.0001)} - \color{indianred}{f(1.9999)}}{0.0002}$ |
$\qquad = \dfrac{\color{blue}{2(2.0001)^2-4(2.0001)+1} - \color{indianred}{2(1.9999)^2-4(1.9999)+1}}{h}$ |
$\qquad = 4.$ |
(We could have used the little blue utility above to do this calculation.)
Practice:
Practice:
Velocity
For an object moving in a straight line with position $s(t)$ at time $t$, the
average velocity from time $t$ to time $t+h$ is the average rate of change of the position $s(t)$ over $[t, t+h]$ and is therefore given by the difference quotient
$\displaystyle v_{\text{average}} = \frac{s(t+h) - s(t)}{h}$.
The
instantaneous velocity at time $t$ is given by the instantaneous rate of change of the position $s(t)$ at time $t$ and is therefore given by the derivative $s'(t)$:
$\displaystyle v(t) = s'(t) = \lim_{h \to 0}\frac{s(t+h) - s(t)}{h}$.
Example: Velocity
Practice:
Graphical approach
We saw above that the average rate of change of the function $f$ over the interval $[a, a+h]$ is the slope of the secant line $PQ$ shown in the following graph:
As the derivative $f'(a)$ is obtained by taking the limit as $h \to 0$, you can visualize what happens on the graph by pressing the "Make |h| smaller" button: The point $Q$ moves closer and closer to the point $P$, with the result that the secant line begins to resemble the
tangent line at the point $P$. Thus, geometrically,
the derivative $f'(a)$ is the slope of the tangent to the graph of $f$ at the point where $x = a$.Slope of secant line $\displaystyle = m_{\text{sec}} = \frac{f(a+h) - f(a)}{h}$
Slope of tangent line | $\displaystyle = m_{\text{tan}} = \lim_{h \to 0}\frac{f(a+h) - f(a)}{h} = f'(a)$
Examples: Graphical approach
Let $f(x) = 2x^2-4x+1$.
Slope of secant line through points where $x = 2$ and $x = 3$ |
| = Average rate of change of $f$ over $[2, 3]$
= $6$ (Check on the (blue) average rate of change calculator above.) |
Slope of tangent line through the point where $x = 2$ |
| = Instantaneous rate of change of $f$ at $x = 2$
= $4$ (Check on the (blue) average rate of change calculator above.) |
Here is the graph with these two lines shown:
Zooming in:
Algebraic approach
To calculate the derivative of a function algebraically, proceed as follows:
- Write down the definition of the derivative,
$\displaystyle f'(x) = \lim_{h \to 0}\frac{f(x+h) - f(x)}{h}$.
- Substitute for $f(x+h)$ and $f(x)$
You can use an actual value for $x$ if you are asked, say, to compute $f'(3)$, or just leave it as $x$ if you are asked for the derivative function $f'(x)$.
- Simplify the numerator in order to factor out an $h$. Then cancel the $h$s and take the limit to obtain the answer.
Sometimes, you need to do more than just simplify the numerator...
Examples: Algebraic approach
Going back to our first example, $f(x) = 2x^2-4x+1$, Let us now calculate $f'(x)$ algebraically by following the steps above.
$\displaystyle f'(x)$ | $\displaystyle {}= \lim_{h \to 0}\frac{\color{red}{f(x+h)} - \color{blue}{f(x)}}{h}$ |
| $\displaystyle {}= \lim_{h \to 0}\frac{\color{red}{2(x+h)^2-4(x+h)+1} - \color{blue}{(2x^2-4x+1)}}{h}$ |
| $\displaystyle {}= \lim_{h \to 0}\frac{2x^2+4xh+2h^2-4x-4h+1-2x^2+4x-1}{h}$ |
| $\displaystyle {}= \lim_{h \to 0}\frac{4xh+2h^2-4h}{h}$ |
| $\displaystyle {}= \lim_{h \to 0}\frac{h(4x+2h-4)}{h}$ |
| $\displaystyle {}= \lim_{h \to 0}(4x+2h-4)$ |
| $\displaystyle {}= 4x-4$ |
Thus, $f'(x) = 4x-4$.
Practice:
|