
Average Rate of Change of f(x) over [a, b]: Difference Quotient
The average rate of change of f(x) over the interval [a, b] is
| Average rate of change | = |
f

x | = |
f(b) - f(a)
 b - a | . |
We also call this average rate of change the difference quotient of f(x) over the interval [a, b]. Its units of measurement are units of f(x) per unit of x.
Alternative Formulation: Average Rate of Change of f(x) over [a, a+h]
(Replace b above by a+h.)
The average rate of change of f(x) over the interval [a, a+h] is
| Average rate of change | = | f(a+h) - f(a)
 h | . |
Units
The units of the average rate of change are units of f per unit of x.
|
Example
Let f(x) = 2x2 - 4x + 1. Then the average change of f(x) over the interval [2, 4] is
| Average rate of change | = | f(4) - f(2)
 4 - 2 |
|
| = | 17 - 1
 2 | = | 8. |
|
Interpretation
If, say f(x) represents the annual profit of your company (in millions of dollars) and x represents the year since January 1990, then the units of measurement of the average rate of change are millions of dollars per year. Thus, your company made an average annual profit of $8 million per year over the period January 1992 to January 1994.
Use this handy little Javascript utility to compute the average change of the above function f(x) over other intervals. Enter the x-coordinates (a and b in the formula), leave everything else blank, and press "Compute." (You can also change the function to anything you like, using standard technology formatting.)
You can also use the function evaluator to compute average rates of change.
Top of Page
|
|
Instantaneous Rate of Change of f(x) at x = a: Derivative
The instantaneous rate of change e of f(x) at x = a is given by taking the limit of the average rates of change (computed by the difference quotient) as h approaches 0.
| Instantaneous rate of change | = | lim h 0 | f(a+h) - f(a)
 h | . |
We also call this instantaneous rate of change the derivative of f(x) evaluated at x = 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,
| f'(a) | = | lim h 0 | f(a+h) - f(a)
 h | . |
Note:
- f'(a) = Instantaneous rate of change of f at the point a.
- f'(x) = Instantaneous rate of change of f at the point x.
Hence, the derivative f'(x) is a function of x.
Since f'(x) is a limit, it may or may not exist. That is, the quantities [f(x+h) - f(x)]/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 x. Otherwise, we say that f is not differentiable at x.
On this page, we summarize three ways of obtaining the derivative of a function at a point: numerical, graphical, and algebraic.
|
Example
Let f(x) = 2x2 - 4x + 1, as above. Then the instantaneous change of f(x) at x = 2 is
(We shall see where this answer came from below.)
Interpretation
If, say f(x) represents the annual profit of your company (in millions of dollars) and x represents the year since January 1990, 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 $4 million per year at the start of 1992.
Top of Page
|
|
Derivative as Rate of Change: 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
f(a+h) - f(a)
 h |
for smaller and smaller values of h, and decide what number these values are approaching. (See the example opposite.)
A Quick Approximation
Use a single small value of h and compute the difference quotient:
| f'(a) |  | f(a+0.0001) - f(a)
 0.0001 | . |
Here, we chose h = 0.0001. The smaller h, the better the approximation. (See the example opposite.)
Another Quick Approximation: Balanced Difference Quotient
The following formula often gives a better estimate of the derivative
| f'(a) |  | f(a+0.0001) - f(a-0.0001)
 0.0002 | . |
Derivative Calculator (Balanced Difference Quotient Approximation)
Enter a function, enter the point a, adjust h is you want, and press "Compute".
|
Example
Continuing with the example f(x) = 2x2 - 4x + 1, let us compute an approximate value of f'(2).
Using a Table
The difference quotient (with a = 2) is
| f(2+h) - f(2)
 h |
|
| = | 2(2+h)2-4(2+h)+1 - (2(2)2-4(2)+1)
 h |
The following table shows the value of this difference quotient for several values of h.
| 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
f'(2) 4.
A Quick Approximation
We use the formula (with a=2)
| f'(2) |  | f(2+0.0001) - f(2)
 0.0001 |
| = | f(2.0001) - f(2)
 0.0001 |
| = | 1.00040002 - 1
 0.0001 | = | 4.0002. |
(You could have used the little Javascript utility at the top of the page to do this calculation.)
Notice that the "quick approximation" method does not give the exact answer, but the balaced difference quotient will in this case (see opposite).
Top of Page
|
|
Derivative as Slope: Geometric Approach
Secant and Tangent Lines
The slope of the secant line through the points on the graph of f where x = a and x = a+h is given by the average rate of change, or difference quotient
| Slope of Secant | = | Average rate of change |
| = | f(a+h) - f(a)
 h | . |
The slope of the tangent line through the point on the graph of f where x = a is given by the instantaneous rate of change, or derivative f'(a).
| Slope of Tangent | = | f'(a) |
| = | lim h 0 | f(a+h) - f(a)
 h | . |
We can approximate the slope of the tangent through the point where x = a by using the balanced difference quotient,
| mtan |  | f(a+0.0001) - f(a 0.0001)
 0.0002 | . |
Zooming In
We can also interpret the derivative, or slope of the tangent, at a given point on the graph as the slope of the (almost) straight line obtained by "zooming-in" to that point on the curve.(See opposite.)
Extra Topic: Graph of the Derivative
Press here for on-line on how to obtain the graph of f' from the graph of f.
|
Example
Continuing with the example f(x) = 2x2 - 4x + 1,
| Slope of secant line through points where x = 2 and x = 3 |
= |
Average rate of change of f(x) over [2, 3] |
|
= |
6 (see calculation above) |
| Slope of tangent line through point where x = 2 |
= |
Instantaneous rate of change of f(x) at x = 2 |
|
= |
f'(2) = 4 (see calculation above) |
Here is the graph with these two lines shown.
Zooming In
Press here for a zoomed-in version of a different curve:
y = 0.84375x-1 - 0.2109375x-2
at the point where x = 0.75.
Top of Page
|
Interpreting the Balanced Difference Quotient Graphically
(Requires a graphing utility)
Here is a step-by-step approach to visualize the balanced difference quotient approximation of f'(x) at the point x = a
- Graph the curve y = f(x) so that the point where x = a is centered in the x-range.
- Zoom in so that the point x = a remains centered in the x-range.
Do this by choosing a small value of h, say h = 0.0001, and then setting
Xmin = a-h, Xmax = a+h.
To specify the y-coordinates of the window, either use "zoomfit" or choose the smallest and largest of the three values f(a-h), f(a), and f(a+h)
- Repeat steps 1 and 2 using smaller and smaller values of h until the graph appears to be a straight line. The balanced difference quotient for that value of h is the slope of the (secant) line passing through the end-points.
You can measure its slope by using the points on the graph where x = a-h (left-hand edge of the window) and x = a+h (right-hand edge of the window).
|
Example
Let us use a fresh example, f(x) = x3- 2x2 + x, and let us now estimate f'(3) graphically by following the steps in the adjacent window.
Step 1: To center the point where x = 3, let us use
Xmin = 3-1 = 1, Xmax = 3+1 = 3.
We can estimate Ymin and Ymax by choosing the least and greatgest of the three values f(2), f(3), f(4).
Step 2: To zoom in, let us now use
Xmin = 3-0.0001 = 2.9999, Xmax = 3+0.0001 = 3.0001.
We can estimate Ymin and Ymax by choosing the least and greatgest of the three values f(2.9999), f(3), f(3.0001).
Since the graph now appears straight, we can measure its slope using the two end-points (2.9999, 11.99840007) and (3.0001, 12.00160007) (you can use trace or the table feature to compute the y-coordinates). This slope is the difference quotient for h = 0.0001.
The slope is therefore
| m | = | f(3.0001)-f(2.9999)
 3.0001-2.9999 |
|
| = | 12.00160007-11.99840007
 3.0001-2.9999 |
|
| = | 16 |
Thus, f'(3) 16. (In fact, it is exactlyt 16.)
To go through another example, try the tutorial.
Top of Page
|
|
Computing the Derivative Algebraically
To compute the derivative of a function algebraically, proceed as follows.
-
Write down the definition of the derivative,
| f'(x) | = | lim h 0 | 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...
|
Example
Going back to our first example, f(x) = 2x2 - 4x + 1, let us now calculate f'(x) algebraically by following the steps in the adjacent window.
| f'(x) | = |
lim h 0 | f(x+h) - f(x)
 h |
|
| = |
lim h 0 | (2(x+h)2-4(x+h)+1) - (2x2-4x+1)
 h |
|
| = |
lim h 0 | 2x2+4xh+2h2-4x-4h+1-2x2+4x-1
 h |
|
| = |
lim h 0 | 4xh+2h2-4h
 h |
|
| = |
lim h 0 | h(4x+2h-4)
 h |
|
| = |
lim h 0 | (4x+2h-4) |
|
| = | 4x-4 |
Thus, f'(x) = 4x-4.
Go to the tutorial on average rates of change for practice in computing average rates of change algebraically (whatg we did above up to the last step), or to tutorial on computing the derivative algebraically and scroll down to the box called "Computing the Derivative Algebraically." The "Help" button brings up the complete solution.
Top of Page
|
|
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 given by the difference quotient
| vaverage | = | s(t+h) - s(t)
 h | . |
The instantaneous velocity at time t is given by
| v(t) | = | s'(t) | = | lim h 0 | s(t+h) - s(t)
 h | . |
|
Example
Suppose the position of a moving object is given by
s(t) = t2 -2t+4 miles
at time t hours. Then its velocity at time t is given by
s'(t) = 2t-2 miles per hour.
Thus, for example, its velocity at time t = 3 hours is
s'(3) = 4 miles per hour.
Top of Page
|
|
Derivatives of Powers, Sums, and Constant Multiples
Power Rule
If f(x) = xn, then f'(x) = nxn-1. This is true for any real n. In differential notation, this reads
Sum and Constant Multiple Rules
If f'(x) and g'(x) exist, and c is a constant, then
- (A) [f(x) ± g(x)]' = f'(x) ± g'(x)
- (B) [cf(x)]' = cf'(x).
In differential notation, these rules are
| (A) | | d
 dx | [f(x) ± g(x)] = | | d
 dx | [f(x)] ± | d
 dx | [g(x)] |
| (B) | | d
 dx | [cf(x)] = c | d
 dx | [f(x)] |
In words:
(A) The derivative of a sum is the sum of the derivatives, and the derivative of a difference is the difference of the derivatives.
(B) The derivative of c times a function is c times the derivative of the function.
|
Examples
d
 dx |
| |
| = | | | = |
- x - 2 | | = | | - | 1
 x2 |
|
| |
Top of Page
|
|
Marginal Analysis
If Q(x) represents any quantity such as cost, revenue, profit or loss on the sale of x items, then Q'(x) is called the marginal quantity. Thus, for instance, the marginal cost measures the increase in total cost per item. This is effectively the cost of each additional item.
The marginal cost is distinct from the average cost, which measures the average of the total cost of the first x items. Average cost is given by
 C(x) | = | C(x)
 x |
|
| = | Total Cost
 Number of Items |
| Example
Suppose the cost of (the first) x items is given by
C(x) = 4x0.2 - 0.1x pounds Sterling.
Then the marginal cost is
C'(x) = 0.8x-0.8 - 0.1 pounds Sterling per unit.
In particular, C'(3) 0.23 (pounds Sterling per unit) is the approximate cost of the third unit (or the fourth unit).
The average cost of the first three units is
 C(3) | = | C(3)
 3 |
|
|  | 4.6829
 3 |
|
|  | 1.56 pound Sterling/item |
Top of Page
|
|
Limits
We write
lim x a | f(x) | = | L |
or
f(x) L as x a
to mean that f(x) approaches the number L as x approaches (but is not equal to) a from both sides.
A more precise way of phrasing the definition is that we can make f(x) be as close to L as we like by making x be sufficiently close to a. We write
lim x a+ | f(x) | = | L |
and
lim x a- | f(x) | = | L |
to mean that f(x) L as x approaches a from the right or left, respectively. For limx a f(x) to exist, the left and right limits must both exist and must be equal.
We write
lim x + | f(x) | = | L |
and
lim x - | f(x) | = | L |
to mean that f(x) L as x gets arbitrarily large or becomes a negative number with arbitrarily large magnitude, respectively.
|
Example
As x 3, the quantity 3x2-4x+2 approaches 17, and hence
lim x 3 | (3x2-4x+2) | = | 27 |
There are many more examples in the on-line tutorial on limits.
Top of Page
|
|
Calculating Limits
To analyze a limit of the form
(a) Numerical Approach
Make a table of values for f(x) using values of x that approach a closely from either side. If the limit exists, then the values of f(x) will approach the limit as x approaches a from both sides. The more accurately you wish to evaluate this limit, the closer to a you will need to choose the values of x.
For a limit as x + , use positive values of x getting larger and larger.
For a limit as x - , use negative values of x getting larger and larger in magnitude.
(b) Graphical Approach
- Draw the graph of f(x) either by hand or using a graphing calculator.
- Position your pencil point (or the graphing calculator "trace" cursor) on a point of the graph to the left of x = a.
- Move the point along the graph toward x = a from the left and read the y-coordinate as you go. The value approached by the y-coordinate (if any) is then limx
a- f(x).
- Repeat steps (2) and (3), but this time start from a point on the graph to the right of x = a, and approach x = a along the graph from the right. The value approached by the y-coordinate (if any) is then limx
a+ f(x).
- If the left-and right limits both exist and have the same value L, then limx
a f(x) = L.
- For a limit as x
± , move your point along the graph toward either + or - as the case may be, reading the y-coordinate as you go.
(c) Algebraic Approach
Check to see whether f(x) is a closed form function. These are functions specified by a single formula involving constants, powers of x, radicals, exponentials and logarithms, combined using arithmetic operations and composition of functions.
- If a is in the domain of f, then limx
a f(x) = f(a).
- If a is not in the domain of f, but f(x) can be reduced by simplification to a function with a in its domain, then (1) applies to the reduced form of the function.
- If a is not in the domain of f, and you cannot simplify the function as in (2), then simplify as much as possible, and evaluate the limit by the numerical approach, or, if you know its graph, by the graphical approach.
(d) Algebraic Approach to Limits at ±
If x is approaching ± , then check to see whether f(x) is a ratio of polynomials. If it is, then you can ignore all but the highest powers of x in the numerator and denominator. This simpler function will have the same limit as f.
Press here for the on-line tutorial on limits.
Top of Page
|
|
Continuous Functions
A function f is continuous at a if limx a f(x) exists, and is equal to f(a).
The function f is said to be continuous on its domain if it is continuous at each point in its domain. The algebraic approach in (c) above is based on the fact that any closed form function is continuous on its domain.
|
Examples
The function f(x) = 3x2-4x+2 is a closed form function, and hence continuous at every point in its domain (all real numbers).
The function
| g(x) | = | 4x2+1
 x - 3 |
|
is also a closed form function, and hence continuous on its domain (all real numbers excluding 3).
Top of Page
|