# 2.1: Instantaneous Rates of Change: The Derivative

- Page ID
- 4157

\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

A common amusement park ride lifts riders to a height then allows them to freefall a certain distance before safely stopping them. Suppose such a ride drops riders from a height of 150 feet. Students of physics may recall that the height (in feet) of the riders, \(t\) seconds after freefall (and ignoring air resistance, etc.) can be accurately modeled by \(f(t) = -16t^2+150\).

Using this formula, it is easy to verify that, without intervention, the riders will hit the ground at \(t=2.5\sqrt{1.5} \approx 3.06\) seconds. Suppose the designers of the ride decide to begin slowing the riders' fall after 2 seconds (corresponding to a height of 86 ft.). How fast will the riders be traveling at that time?

We have been given a *position* function, but what we want to compute is a velocity at a specific point in time, i.e., we want an *instantaneous velocity*. We do not currently know how to calculate this.

However, we do know from common experience how to calculate an *average velocity*. (If we travel 60 miles in 2 hours, we know we had an average velocity of 30 mph.) We looked at this concept in Section 1.1 when we introduced the difference quotient. We have

\[\frac{\text{change in distance}}{\text{change in time}} = \frac{\text{"rise''}}{\text{run}} = \text{average velocity}.\]

We can approximate the instantaneous velocity at \(t=2\) by considering the average velocity over some time period containing \(t=2\). If we make the time interval small, we will get a good approximation. (This fact is commonly used. For instance, high speed cameras are used to track fast moving objects. Distances are measured over a fixed number of frames to generate an accurate approximation of the velocity.)

Consider the interval from \(t=2\) to \(t=3\) (just before the riders hit the ground). On that interval, the average velocity is

\[\frac{f(3)-f(2)}{3-2} = \frac{f(3)-f(2)}{1} =-80\ \text{ft/s},\]

where the minus sign indicates that the riders are moving *down*. By narrowing the interval we consider, we will likely get a better approximation of the instantaneous velocity. On \([2,2.5]\) we have

\[\frac{f(2.5)-f(2)}{2.5-2} = \frac{f(2.5)-f(2)}{0.5} =-72\ \text{ft/s}.\]

We can do this for smaller and smaller intervals of time. For instance, over a time span of 1/10\(^\text{th}\) of a second, i.e., on \([2,2.1]\), we have

\[\frac{f(2.1)-f(2)}{2.1-2} = \frac{f(2.1)-f(2)}{0.1} =-65.6\ \text{ft/s}.\]

Over a time span of 1/100\(^\text{th}\) of a second, on \([2,2.01]\), the average velocity is

\[\frac{f(2.01)-f(2)}{2.01-2} = \frac{f(2.01)-f(2)}{0.01} =-64.16\ \text{ft/s}.\]

What we are really computing is the average velocity on the interval \([2,2+h]\) for small values of \(h\). That is, we are computing \[\frac{f(2+h) - f(2)}{h}\]where \(h\) is small.

What we really want is for \(h=0\), but this, of course, returns the familiar "\(0/0\)'' indeterminate form. So we employ a limit, as we did in Section 1.1.

We can approximate the value of this limit numerically with small values of \(h\) as seen in Figure 2.1. It looks as though the velocity is approaching \(-64\) ft/s. Computing the limit directly gives

\[\begin{align*}\lim_{h\to 0} \frac{f(2+h)-f(2)}{h} &= \lim_{h\to 0}\frac{-16(2+h)^2+150 - (-16(2)^2+150)}{h} \\ &= \lim_{h\to 0}\frac{-64h-16h^2}{h} \\ &= \lim_{h\to 0}-64 -16h \\ &=-64. \end{align*}\]

Figure 2.1: *Approximating the instantaneous velocity with average velocities over a small time period *\(h\).

Graphically, we can view the average velocities we computed numerically as the slopes of secant lines on the graph of \(f\) going through the points \((2,f(2))\) and \((2+h,f(2+h))\). In Figure 2.2, the secant line corresponding to \(h=1\) is shown in three contexts. Figure 2.2(a) shows a "zoomed out'' version of \(f\) with its secant line. In (b), we zoom in around the points of intersection between \(f\) and the secant line. Notice how well this secant line approximates \(f\) between those two points -- it is a common practice to approximate functions with straight lines.

As \(h\to 0\), these secant lines approach the *tangent line*, a line that goes through the point \((2,f(2))\) with the special slope of \(-64\). In parts (c) and (d) of Figure 2.2, we zoom in around the point \((2,86)\). In (c) we see the secant line, which approximates \(f\) well, but not as well the tangent line shown in (d).

Figure 2.2: *Parts (a), (b) and (c) show the secant line to *\(f(x)\text{ with }h=1\)*, zoomed in different amounts. Part (d) shows the tangent line to *\(f \text{ at }x=2.\)

We have just introduced a number of important concepts that we will flesh out more within this section. First, we formally define two of them.

Definition 7: Derivative at a Point

Let \(f\) be a continuous function on an open interval \(I\) and let \(c\) be in \(I\). The **derivative of** \(f\) **at** \(c\), denoted \(f^\prime (c)\), is \[\lim_{h\to 0}\frac{f(c+h)-f(c)}{h},\]provided the limit exists. If the limit exists, we say that \(f\) **is differentiable at** \(c\)}; if the limit does not exist, then \(f\)** is not differentiable at** \(c\)}. If \(f\) is differentiable at every point in \(I\), then \(f\) **is differentiable on** \(I\).

Definition 8: Tangent Line

Let \(f\) be continuous on an open interval \(I\) and differentiable at \(c\), for some \(c\) in \(I\). The line with equation \(\ell(x) = f^\prime(c)(x-c)+f(c)\) is the **tangent line** to the graph of \(f\) at \(c\); that is, it is the line through \((c,f(c))\) whose slope is the derivative of \(f\) at \(c\).

Some examples will help us understand these definitions.

Example 32: Finding derivatives and tangent lines

Let \(f(x) = 3x^2+5x-7\). Find:

- \(f^\prime(1)\)
- The equation of the tangent line to the graph of \(f\) at \(x=1\).
- \(f^\prime(3)\)
- The equation of the tangent line to the graph \(f\) at \(x=3\).

**Solution:**

- We compute this directly using Definition 7.\[\begin{align*} f^\prime(1) &= \lim_{h\to 0} \frac{f(1+h)-f(1)}{h} \\ &= \lim_{h\to 0} \frac{3(1+h)^2+5(1+h)-7 - (3(1)^2+5(1)-7)}{h}\\ &= \lim_{h\to 0} \frac{3h^2+11h}{h}\\ &= \lim_{h\to 0} 3h+11=11. \end{align*}\]
- The tangent line at \(x=1\) has slope \(f^\prime(1)\) and goes through the point \((1,f(1)) = (1,1)\). Thus the tangent line has equation, in point-slope form, \(y = 11(x-1) + 1\). In slope-intercept form we have \(y = 11x-10\).
- Again, using the definition,\[\begin{align*} f^\prime(3) &= \lim_{h\to 0} \frac{f(3+h)-f(3)}{h} \\ &= \lim_{h\to 0} \frac{3(3+h)^2+5(3+h)-7 - (3(3)^2+5(3)-7)}{h} \\ &= \lim_{h\to 0} \frac{3h^2+23h}{h}\\ &= \lim_{h\to 0} 3h+23 \\ &= 23. \end{align*}\]
- The tangent line at \(x=3\) has slope \(23\) and goes through the point \((3,f(3)) = (3,35)\). Thus the tangent line has equation \(y=23(x-3)+35 = 23x-34\).

A graph of \(f(x) = 3x^2+5x-7\) and its tangent lines at \(x=1\) and \(x=3\).

Figure 2.3: *A graph of *\(f(x)=3x^2+5x-7\)* and its tangent lines at *\(x=1\)* and *\(x=3\).

Another important line that can be created using information from the derivative is the **normal line**. It is perpendicular to the tangent line, hence its slope is the opposite--reciprocal of the tangent line's slope.

Definition 9: Normal Line

Let \(f\) be continuous on an open interval \(I\) and differentiable at \(c\), for some \(c\) in \(I\). The **normal line** to the graph of \(f\) at \(c\) is the line with equation\[n(x) =\frac{-1}{f^\prime(c)}(x-c)+f(c),\] where \(f^\prime(c)\neq 0\). When \(f^\prime(c)=0\), the normal line is the vertical line through \(\big(c,f(c)\big)\); that is, \(x=c\).

Example 33: Finding equations of normal lines

Let \(f(x) = 3x^2+5x-7\), as in Example 32. Find the equations of the normal lines to the graph of \(f\) at \(x=1\) and \(x=3\).

Figure 2.4: *A graph of *\(f(x)=3x^2+5x-7\)*, along with its normal line at *\(x=1\).

**Solution:**

In Example 32, we found that \(f^\prime(1)=11\). Hence at \(x=1\), the normal line will have slope \(-1/11\). An equation for the normal line is \[n(x) = \frac{-1}{11}(x-1)+1.\]The normal line is plotted with \(y=f(x)\) in Figure 2.4. Note how the line looks perpendicular to \(f\). (A key word here is "looks.'' Mathematically, we say that the normal line *is* perpendicular to \(f\) at \(x=1\) as the slope of the normal line is the opposite--reciprocal of the slope of the tangent line. However, normal lines may not always *look* perpendicular. The aspect ratio of the picture of the graph plays a big role in this.)

We also found that \(f^\prime(3) = 23\), so the normal line to the graph of \(f\) at \(x=3\) will have slope \(-1/23\). An equation for the normal line is \[n(x) = \frac{-1}{23}(x-3)+35.\]

Linear functions are easy to work with; many functions that arise in the course of solving real problems are not easy to work with. A common practice in mathematical problem solving is to approximate difficult functions with not--so--difficult functions. Lines are a common choice. It turns out that at any given point on the graph of a differentiable function \(f\), the best linear approximation to \(f\) is its tangent line. That is one reason we'll spend considerable time finding tangent lines to functions.

One type of function that does not benefit from a tangent--line approximation is a line; it is rather simple to recognize that the tangent line to a line is the line itself. We look at this in the following example.

Example 34: Finding the Derivative of a Line

Consider \(f(x) = 3x+5\). Find the equation of the tangent line to \(f\) at \(x=1\) and \(x=7\).

**Solution:**

We find the slope of the tangent line by using Definition 7.

\[\begin{align*} f^\prime(1) &= \lim_{h\to 0}\frac{f(1+h)-f(1)}{h} \\ &= \lim_{h\to 0} \frac{3(1+h)+5 - (3+5)}{h}\\ &= \lim_{h\to 0} \frac{3h}{h}\\ &= \lim_{h\to 0} 3\\ &= 3. \end{align*}\]

We just found that \(f^\prime(1) = 3\). That is, we found the *instantaneous rate of change* of \(f(x) = 3x+5\) is \(3\). This is not surprising; lines are characterized by being the *only* functions with a *constant rate of change*. That rate of change is called the *slope* of the line. Since their rates of change are constant, their *instantaneous* rates of change are always the same; they are all the slope.

So given a line \(f(x) = ax+b\), the derivative at any point \(x\) will be \(a\); that is, \(f^\prime(x) = a\).

It is now easy to see that the tangent line to the graph of \(f\) at \(x=1\) is just \(f\), with the same being true for \(x=7\).

We often desire to find the tangent line to the graph of a function without knowing the actual derivative of the function. In these cases, the best we may be able to do is approximate the tangent line. We demonstrate this in the next example.

Example 35: Numerical Approximation of the Tangent Line

Approximate the equation of the tangent line to the graph of \(f(x)=\sin x\) at \(x=0\).

\(f(x)=\sin x\)

Figure 2.5:

*graphed with an approximation to its tangent line at*\(x=0\).

**Solution:**

In order to find the equation of the tangent line, we need a slope and a point. The point is given to us: \((0,\sin 0) = (0,0)\). To compute the slope, we need the derivative. This is where we will make an approximation. Recall that \[f^\prime(0) \approx \frac{\sin(0+h)- \sin 0}{h}\]for a small value of \(h\). We choose (somewhat arbitrarily) to let \(h=0.1\). Thus \[f^\prime(0) \approx \frac{\sin(0.1)-\sin 0}{0.1} \approx 0.9983.\]Thus our approximation of the equation of the tangent line is \(y = 0.9983(x-0) +0 = 0.9983x\); it is graphed in Figure 2.5. The graph seems to imply the approximation is rather good.

Recall from Section 1.3 that \( \lim_{x\to 0}\frac{\sin x}x =1\), meaning for values of \(x\) near 0, \(\sin x \approx x\). Since the slope of the line \(y=x\) is 1 at \(x=0\), it should seem reasonable that "the slope of \(f(x)=\sin x\)'' is near 1 at \(x=0\). In fact, since we *approximated* the value of the slope to be \(0.9983\), we might guess the *actual value* is 1. We'll come back to this later.

Consider again Example 32. To find the derivative of \(f\) at \(x=1\), we needed to evaluate a limit. To find the derivative of \(f\) at \(x=3\), we needed to again evaluate a limit. We have this process:

This process describes a *function*; given one input (the value of \(c\)), we return exactly one output (the value of \(f^\prime(c)\)). The "do something'' box is where the tedious work (taking limits) of this function occurs.

Instead of applying this function repeatedly for different values of \(c\), let us apply it just once to the variable \(x\). We then take a limit just once. The process now looks like:

The output is the "derivative function,'' \(f^\prime(x)\). The \(f^\prime(x)\) function will take a number \(c\) as input and return the derivative of \(f\) at \(c\). This calls for a definition.

Definition 10: Derivative Function

Let \(f\) be a differentiable function on an open interval \(I\). The function \[f^\prime(x) = \lim_{h\to 0} \frac{f(x+h)-f(x)}{h}\]is **the derivative of** \(f\).

**Notation**:

Let \(y = f(x)\). The following notations all represent the derivative:

\[f^\prime(x)\ =\ y^\prime\ =\ \frac{dy}{dx}\ =\ \frac{df}{dx}\ =\ \frac{d}{dx}(f)\ =\ \frac{d}{dx}(y). \]

**Important**: The notation \( \frac{dy}{dx}\) is one symbol; it is **not** the fraction "\(dy/dx\)''. The notation, while somewhat confusing at first, was chosen with care. A fraction--looking symbol was chosen because the derivative has many fraction-like properties. Among other places, we see these properties at work when we talk about the units of the derivative, when we discuss the Chain Rule, and when we learn about integration (topics that appear in later sections and chapters).

Examples will help us understand this definition.

Example 36: Finding the derivative of a function

Let \(f(x) = 3x^2+5x-7\) as in Example 32. Find \(f^\prime(x)\).}

**Solution: **We apply Definition 10.

\[\begin{align*} f^\prime(x) &= \lim_{h\to 0} \frac{f(x+h)-f(x)}{h} \\ &= \lim_{h\to 0} \frac{3(x+h)^2+5(x+h)-7-(3x^2+5x-7)}{h}\\ &= \lim_{h\to 0} \frac{3h^2 +6xh+5h}{h}\\ &= \lim_{h\to 0} 3h+6x+5\\ &= 6x+5 \end{align*}\]

So \(f^\prime(x) = 6x+5\). Recall earlier we found that \(f^\prime(1) = 11\) and \(f^\prime(3) = 23\). Note our new computation of \(f^\prime(x)\) affirm these facts.

Example 37: Finding the derivative of a function

Let \( f(x) = \frac{1}{x+1}\). Find \(f^\prime(x)\).

**Solution: **We apply Definition 10.

\[f^\prime(x) = \lim_{h\to 0} \frac{f(x+h)-f(x)}{h}\\ = \lim_{h\to 0} \frac{\frac{1}{x+h+1}-\frac{1}{x+1}}{h} \]

Now find common denominator then subtract; pull \(1/h\) out front to facilitate reading.

\[\begin{align*} &= \lim_{h\to 0} \frac{1}{h}\cdot\left(\frac{x+1}{(x+1)(x+h+1)} - \frac{x+h+1}{(x+1)(x+h+1)}\right)\\ &= \lim_{h\to 0} \frac 1h\cdot\left(\frac{x+1-(x+h+1)}{(x+1)(x+h+1)}\right)\\ &= \lim_{h\to 0} \frac1h\cdot\left(\frac{-h}{(x+1)(x+h+1)}\right)\\ &= \lim_{h\to 0} \frac{-1}{(x+1)(x+h+1)} \\ &= \frac{-1}{(x+1)(x+1)}\\ &= \frac{-1}{(x+1)^2} \end{align*}\]

So \( f^\prime(x) = \frac{-1}{(x+1)^2}\). To practice using our notation, we could also state \[ \frac{d}{dx}\left(\frac{1}{x+1}\right) = \frac{-1}{(x+1)^2}.\]

Example 38: Finding the derivative of a function

Find the derivative of \(f(x) = \sin x\).}

**Solution:**

Before applying Definition 10, note that once this is found, we can find the actual tangent line to \(f(x) = \sin x\) at \(x=0\), whereas we settled for an approximation in Example 35.

We have found that when \(f(x) = \sin x\), \(f^\prime(x) = \cos x\). This should be somewhat surprising; the result of a tedious limit process and the sine function is a nice function. Then again, perhaps this is not entirely surprising. The sine function is periodic -- it repeats itself on regular intervals. Therefore its rate of change also repeats itself on the same regular intervals. We should have known the derivative would be periodic; we now know exactly which periodic function it is.

Thinking back to Example 35, we can find the slope of the tangent line to \(f(x)=\sin x\) at \(x=0\) using our derivative. We approximated the slope as \(0.9983\); we now know the slope is *exactly* \(\cos 0 =1\).

Example 39: Finding the derivative of a piecewise defined function

Find the derivative of the absolute value function, \[f(x) = |x| = \left\{\begin{array}{cc} -x & x<0 \\ x & x\geq 0\end{array}.\right.\]

See Figure 2.6.

**Solution:**

We need to evaluate \( \lim_{h\to0}\frac{f(x+h)-f(x)}{h}.\) As \(f\) is piecewise--defined, we need to consider separately the limits when \(x<0\) and when \(x>0\).

Figure 2.6: *The absolute value function, *\(f(x)=|x|\)*. Notice how the slope of the lines (and hence the tangent lines) abruptly changes at *\(x=0\).

When \(x<0\):

\[\begin{align*} \frac{d}{dx}\big(-x\big) &= \lim_{h\to 0}\frac{-(x+h) - (-x)}{h} \\ &= \lim_{h\to 0}\frac{-h}{h}\\ &= \lim_{h\to 0}-1 \\ &= -1. \end{align*}\]

When \(x>0\), a similar computation shows that \( \frac{d}{dx}(x) = 1\).

We need to also find the derivative at \(x=0\). By the definition of the derivative at a point, we have \[f^\prime(0) = \lim_{h\to0}\frac{f(0+h)-f(0)}{h}.\]Since \(x=0\) is the point where our function's definition switches from one piece to other, we need to consider left and right-hand limits. Consider the following, where we compute the left and right hand limits side by side.

The last lines of each column tell the story: the left and right hand limits are not equal. Therefore the limit does not exist at 0, and \(f\) is not differentiable at 0. So we have \[f^\prime(x) = \left\{\begin{array}{cc} -1 & x<0 \\ 1 & x>0\end{array}.\right.\]At \(x=0\), \(f^\prime(x)\) does not exist; there is a jump discontinuity at 0; see Figure 2.7. So \(f(x) = |x|\) is differentiable everywhere except at 0.

Figure 2.7: *A graph of the derivative of *\(f(x)=|x|\).

The point of non-differentiability came where the piecewise defined function switched from one piece to the other. Our next example shows that this does not always cause trouble.

Example 40: Finding the derivative of a piecewise defined function

Find the derivative of \(f(x)\), where \( f(x) = \left\{\begin{array}{cc} \sin x & x\leq \pi/2 \\ 1 & x>\pi/2 \end{array}.\right.\) See Figure 2.8.

Figure 2.8: *A graph of *\(f(x)\)* as defined in Example 40.*

**Solution:**

Using Example 38, we know that when \(x<\pi/2\), \(f^\prime(x) = \cos x\). It is easy to verify that when \(x>\pi/2\), \(f^\prime(x) = 0\); consider:

\[\lim_{h\to0}\frac{f(x+h) - f(x)}{h} = \lim_{h\to0}\frac{1-1}{h} = \lim_{h\to0}0 =0.\]

So far we have \[f^\prime(x) = \left\{\begin{array}{cc} \cos x & x<\pi/2\\ 0 & x>\pi/2\end{array}.\right.\]We still need to find \(f^\prime(\pi/2)\). Notice at \(x=\pi/2\) that both pieces of \(f^\prime\) are 0, meaning we can state that \(f^\prime(\pi/2)=0\).

Being more rigorous, we can again evaluate the difference quotient limit at \(x=\pi/2\), utilizing again left and right--hand limits:

Since both the left and right hand limits are 0 at \(x=\pi/2\), the limit exists and \(f^\prime(\pi/2)\) exists (and is 0). Therefore we can fully write \(f^\prime\) as \[f^\prime(x) = \left\{\begin{array}{cc} \cos x & x\leq\pi/2\\ 0 & x>\pi/2\end{array}.\right.\]See Figure 2.9 for a graph of this function.

Figure 2.9: *A graph of *\(f^\prime (x)\)* in Example 40.*

Recall we pseudo--defined a continuous function as one in which we could sketch its graph without lifting our pencil. We can give a pseudo--definition for differentiability as well: it is a continuous function that does not have any "sharp corners.'' One such sharp corner is shown in Figure 2.6. Even though the function \(f\) in Example 40 is piecewise--defined, the transition is "smooth'' hence it is differentiable. Note how in the graph of \(f\) in Figure 2.8 it is difficult to tell when \(f\) switches from one piece to the other; there is no "corner.''

This section defined the derivative; in some sense, it answers the question of "What *is* the derivative?'' The next section addresses the question "What does the derivative *mean*?''

### Contributors

Gregory Hartman (Virginia Military Institute). Contributions were made by Troy Siemers and Dimplekumar Chalishajar of VMI and Brian Heinold of Mount Saint Mary's University. This content is copyrighted by a Creative Commons Attribution - Noncommercial (BY-NC) License. http://www.apexcalculus.com/