Skip to main content

Section 2.1 Instantaneous Rates of Change: The Derivative

Subsection 2.1.1 Introduction

Figure 2.1.1. Video introduction to Section 2.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\text{.}\)

Using this formula, it is easy to verify that, without intervention, the riders will hit the ground when \(f(t)=0\) so 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 \(f(2)=\) 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

\begin{equation*} \frac{\text{change in distance}}{\text{change in time}} = \frac{\text{“rise”}}{\text{“run”}} = \text{average velocity.} \end{equation*}

We can approximate the instantaneous velocity at \(t=2\) by considering the average velocity over some time period containing \(t=2\text{.}\) 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

\begin{equation*} \frac{f(3)-f(2)}{3-2} = \frac{6-86}{1} =-80\,\text{ft/s}\text{,} \end{equation*}

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

\begin{equation*} \frac{f(2.5)-f(2)}{2.5-2} = \frac{50-86}{0.5} =-72\,\text{ft/s}\text{.} \end{equation*}

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

\begin{equation*} \frac{f(2.1)-f(2)}{2.1-2} = \frac{79.44-86}{0.1} =-65.6\,\text{ft/s}\text{.} \end{equation*}

Over a time span of one hundredth of a second, on \([2,2.01]\text{,}\) the average velocity is

\begin{equation*} \frac{f(2.01)-f(2)}{2.01-2} = \frac{85.3584-86}{0.01} =-64.16\,\text{ft/s}\text{.} \end{equation*}

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

\begin{equation*} \frac{f(2+h) - f(2)}{h} \end{equation*}

where \(h\) is small.

We really want to use \(h=0\text{,}\) 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 Table 2.1.2. It looks as though the velocity is approaching -64 fts.

Table 2.1.2. Approximating the instantaneous velocity with average velocities over a small time period \(h\)
\(h\) Average Velocity ( fts)
\(1\) \(\phantom{Average}{-80}\)
\(0.5\) \(\phantom{Average}{-72}\)
\(0.1\) \(\phantom{Average}{-65.6}\)
\(0.01\) \(\phantom{Average}{-64.16}\)
\(0.001\) \(\phantom{Average}{-64.016}\)

Computing the limit directly gives

\begin{align*} \lim_{h\to 0} \frac{f(2+h)-f(2)}{h} \amp = \lim_{h\to 0}\frac{-16(2+h)^2+150 - (-16(2)^2+150)}{h}\\ \amp = \lim_{h\to 0}\frac{-16(4+4h+h^2)+150 - 86}{h}\\ \amp = \lim_{h\to 0}\frac{-64-64h-16h^2+64}{h}\\ \amp = \lim_{h\to 0}\frac{-64h-16h^2}{h}\\ \amp = \lim_{h\to 0}(-64 -16h)\\ \amp =-64\text{.} \end{align*}

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))\text{.}\) In Figures 2.1.3–2.1.5, the secant line corresponding to \(h=1\) is shown in three contexts. Figure 2.1.3 shows a “zoomed out” version of \(f\) with its secant line. In Figure 2.1.4, 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.

Figure 2.1.3. The function \(f(x)\) and its secant line corresponding to \(t=2\) and \(t=3\text{.}\)
Figure 2.1.4. The function \(f(x)\) and a secant line corresponding to \(t=2\) and \(t=3\text{,}\) zoomed in near \(t=2\text{.}\)
Figure 2.1.5. The function \(f(x)\) with the same secant line, zoomed in further.
Figure 2.1.6. The function \(f(x)\) with its tangent line at \(t=2\text{.}\)

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

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 2.1.7. Derivative at a Point.

Let \(f\) be a continuous function on an open interval \(I\) and let \(c\) be in \(I\text{.}\) The derivative of \(f\) at \(c\text{,}\) denoted \(\fp(c)\text{,}\) is

\begin{equation*} \lim_{h\to 0}\frac{f(c+h)-f(c)}{h}\text{,} \end{equation*}

provided the limit exists. If the limit exists, we say that \(f\) is differentiable at \(c\text{;}\) if the limit does not exist, then \(f\) is not differentiable at \(c\text{.}\) If \(f\) is differentiable at every point in \(I\text{,}\) then \(f\) is differentiable on \(I\text{.}\)

Figure 2.1.8. Video presentation of Definition 2.1.7
Definition 2.1.9. Tangent Line.

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

Some examples will help us understand these definitions.

Example 2.1.10. Finding derivatives and tangent lines.

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

  1. \(\displaystyle \fp(1)\)

  2. The equation of the tangent line to the graph of \(f\) at \(x=1\text{.}\)

  3. \(\displaystyle \fp(3)\)

  4. The equation of the tangent line to the graph \(f\) at \(x=3\text{.}\)

Solution
(a) Using \(x\to c\)
(b) Using \(h\to 0\)
Figure 2.1.11. Video presentation of Example 2.1.10
  1. We compute this directly using Definition 2.1.7.

    \begin{align*} \fp(1)\amp = \lim_{h\to 0} \frac{f(1+h)-f(1)}{h}\\ \amp = \lim_{h\to 0} \frac{3(1+h)^2+5(1+h)-7 - (3(1)^2+5(1)-7)}{h}\\ \amp = \lim_{h\to 0} \frac{3(1+2h+h^2)+5+5h-7 - 1}{h}\\ \amp = \lim_{h\to 0} \frac{3+6h+3h^2+5+5h-8}{h}\\ \amp = \lim_{h\to 0} \frac{3h^2+11h}{h}\\ \amp = \lim_{h\to 0} (3h+11)\\ \amp = 11\text{.} \end{align*}
  2. The tangent line at \(x=1\) has slope \(\fp(1)\) and goes through the point \((1,f(1)) = (1,1)\text{.}\) Thus the tangent line has equation, in point-slope form, \(y = 11(x-1) + 1\text{.}\) In slope-intercept form we have \(y = 11x-10\text{.}\)

  3. Again, using the definition,

    \begin{align*} \fp(3)\amp = \lim_{h\to 0} \frac{f(3+h)-f(3)}{h}\\ \amp = \lim_{h\to 0} \frac{3(3+h)^2+5(3+h)-7 - (3(3)^2+5(3)-7)}{h}\\ \amp = \lim_{h\to 0} \frac{3(9+6h+h^2)+15+3h-7 - 35}{h}\\ \amp = \lim_{h\to 0} \frac{27+18h+3h^2+15+3h-42}{h}\\ \amp = \lim_{h\to 0} \frac{3h^2+23h}{h}\\ \amp = \lim_{h\to 0} 3h+23\\ \amp = 23\text{.} \end{align*}
  4. The tangent line at \(x=3\) has slope \(23\) and goes through the point \((3,f(3)) = (3,35)\text{.}\) Thus the tangent line has equation \(y=23(x-3)+35 = 23x-34\text{.}\)

A graph of \(f\) is given in Figure 2.1.12 along with the tangent lines at \(x=1\) and \(x=3\text{.}\)

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

An important consequence of Definition 2.1.7 is that a function has to be continuous at any point where it is differentiable. Or, in other words, a function cannot be differentiable at a point of discontinuity. This is explained in the following video.

Figure 2.1.13. Showing that every differentiable function is continuous

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 negative-reciprocal of the tangent line's slope.

Definition 2.1.14. Normal Line.

Let \(f\) be continuous on an open interval \(I\) and differentiable at \(c\text{,}\) for some \(c\) in \(I\text{.}\) The normal line to the graph of \(f\) at \(c\) is the line with equation

\begin{equation*} n(x) =\frac{-1}{\fp(c)}(x-c)+f(c)\text{,} \end{equation*}

when \(\fp(c)\neq 0\text{.}\) (When \(\fp(c)=0\text{,}\) the normal line is the vertical line through \(\left(c,f(c)\right)\text{;}\) that is, \(x=c\text{.}\))

Example 2.1.15. Finding equations of normal lines.

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

Solution

In Example 2.1.10, we found that \(\fp(1)=11\text{.}\) Hence at \(x=1\text{,}\) the normal line will have slope \(-1/11\text{.}\) An equation for the normal line is

\begin{equation*} n(x) = \frac{-1}{11}(x-1)+1\text{.} \end{equation*}

The normal line is plotted with \(y=f(x)\) in Figure 2.1.16. Note how the line looks perpendicular to \(f\text{.}\) (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 negative-reciprocal of the slope of the tangent line. However, normal lines may not always look perpendicular.

Figure 2.1.16. A graph of \(f(x)=3x^2+5x-7\text{,}\) along with its normal line at \(x=1\text{.}\)

The aspect ratio of the picture of the graph plays a big role in this. When using graphing software, there is usually an option called Zoom Square that keeps the aspect ratio \(1:1\)

We also found that \(\fp(3) = 23\text{,}\) so the normal line to the graph of \(f\) at \(x=3\) will have slope \(-1/23\text{.}\) An equation for the normal line is

\begin{equation*} n(x) = \frac{-1}{23}(x-3)+35\text{.} \end{equation*}

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\text{,}\) 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 2.1.17. Finding the derivative of a linear function.

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

Solution

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

\begin{align*} \fp(1) \amp = \lim_{h\to 0}\frac{f(1+h)-f(1)}{h}\\ \amp = \lim_{h\to 0} \frac{3(1+h)+5 - (3+5)}{h}\\ \amp = \lim_{h\to 0} \frac{3h}{h}\\ \amp = \lim_{h\to 0} 3\\ \amp = 3\text{.} \end{align*}

We just found that \(\fp(1) = 3\text{.}\) That is, we found the instantaneous rate of change of \(f(x) = 3x+5\) is \(3\text{.}\) 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\text{,}\) the derivative at any point \(x\) will be \(a\text{;}\) that is, \(\fp(x) = a\text{.}\)

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

We often desire to find the tangent line to the graph of a function without knowing the actual derivative of the function. While we will eventually be able to find derivatives of many common functions, the algebra and limit calculations on some functions are complex. Until we develop futher techniques, the best we may be able to do is approximate the tangent line. We demonstrate this in the next example.

Example 2.1.18. Numerical approximation of the tangent line.

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

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)\text{.}\) To compute the slope, we need the derivative. This is where we will make an approximation. Recall that

\begin{equation*} \fp(0) \approx \frac{\sin(0+h)- \sin(0) }{h} \end{equation*}

for a small value of \(h\text{.}\) We choose (somewhat arbitrarily) to let \(h=0.1\text{.}\) Thus

\begin{equation*} \fp(0) \approx \frac{\sin(0.1)-\sin(0) }{0.1} \approx 0.9983\text{.} \end{equation*}

Thus our approximation of the equation of the tangent line is \(y = 0.9983(x-0) +0 = 0.9983x\text{;}\) it is graphed in Figure 2.1.19. The graph seems to imply the approximation is rather good.

Figure 2.1.19. \(f(x) = \sin(x)\) graphed with an approximation to its tangent line at \(x=0\text{.}\)

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

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

\begin{equation*} \begin{array}{c}\text{input specific}\\\text{number }c\end{array}\longrightarrow \begin{array}{|c|}\hline\text{do something}\\\text{to }f\text{ and }c\\\hline\end{array} \longrightarrow\begin{array}{c}\text{return}\\\text{number }f'(c)\end{array} \end{equation*}

This process describes a function; given one input (the value of \(c\)), we return exactly one output (the value of \(\fp(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\text{,}\) let us apply it just once to the variable \(x\text{.}\) We then take a limit just once. The process now looks like:

\begin{equation*} \begin{array}{c}\text{input}\\\text{variable }x\end{array}\longrightarrow \begin{array}{|c|}\hline\text{do something}\\\text{to }f\text{ and }x\\\hline\end{array} \longrightarrow\begin{array}{c}\text{return}\\\text{function }f'(x)\end{array} \end{equation*}

The output is the derivative function, \(\fp(x)\text{.}\) The \(\fp(x)\) function will take a number \(c\) as input and return the derivative of \(f\) at \(c\text{.}\) This calls for a definition.

Definition 2.1.20. Derivative Function.

Let \(f\) be a differentiable function on an open interval \(I\text{.}\) The function

\begin{equation*} \fp(x) = \lim_{h\to 0} \frac{f(x+h)-f(x)}{h} \end{equation*}

is the derivative of \(f\text{.}\)

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

\begin{equation*} \fp(x)\ =\ y'\ =\ \frac{dy}{dx}\ =\ \frac{df}{dx}\ =\ \frac{d}{dx}(f)\ =\ \frac{d}{dx}(y)\text{.} \end{equation*}
Figure 2.1.21. Video presentation of Definition 2.1.20

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).

Figure 2.1.22. Explaining derivative notation

Examples will help us understand this definition.

Example 2.1.23. Finding the derivative of a function.

Let \(f(x) = 3x^2+5x-7\) as in Example 2.1.10. Find \(\fp(x)\text{.}\)

Solution

We apply Definition 2.1.20.

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

So \(\fp(x) = 6x+5\text{.}\) Recall earlier we found that \(\fp(1) = 11\) and \(\fp(3) = 23\text{.}\) Note our new computation of \(\fp(x)\) affirms these facts.

Example 2.1.24. Finding the derivative of a function.

Let \(f(x) = \frac{1}{x+1}\text{.}\) Find \(\fp(x)\text{.}\)

Solution
Figure 2.1.25. Video presentation of Example 2.1.24

We apply Definition 2.1.20.

\begin{align*} \fp(x) \amp = \lim_{h\to 0} \frac{f(x+h)-f(x)}{h}\\ \amp = \lim_{h\to 0} \frac{\frac{1}{x+h+1}-\frac{1}{x+1}}{h}\\ \end{align*}

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

\begin{align*} \amp = \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)\\ \end{align*}

Now simplify algebraically.

\begin{align*} \amp = \lim_{h\to 0} \frac 1h\cdot\left(\frac{x+1-(x+h+1)}{(x+1)(x+h+1)}\right) \\ \amp = \lim_{h\to 0} \frac1h\cdot\left(\frac{-h}{(x+1)(x+h+1)}\right)\\ \end{align*}

Finally, apply the limit.

\begin{align*} \amp = \lim_{h\to 0} \frac{-1}{(x+1)(x+h+1)}\\ \amp = \frac{-1}{(x+1)(x+1)}\\ \amp = \frac{-1}{(x+1)^2}\text{.} \end{align*}

So \(\fp(x) = \frac{-1}{(x+1)^2}\text{.}\) To practice using our notation, we could also state

\begin{equation*} \frac{d}{dx}\left(\frac{1}{x+1}\right) = \frac{-1}{(x+1)^2}\text{.} \end{equation*}
Example 2.1.26. Finding the derivative of a function.

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

Solution
Figure 2.1.27. Video presentation of Example 2.1.26

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

\begin{align*} \fp(x) \amp = \lim_{h\to 0} \frac{\sin(x+h)-\sin(x)}{h} \amp \amp \text{Derivative definition}\\ \amp = \lim_{h\to 0} \frac{\sin(x)\cos(h)+\cos(x)\sin(h)-\sin(x)}{h} \amp \amp \text{Angle addition identity}\\ \amp = \lim_{h\to 0} \frac{\sin(x)(\cos(h)-1) + \cos(x)\sin(h)}{h} \amp \amp \text{Regrouped and factored}\\ \amp = \lim_{h\to 0} \left(\frac{\sin(x)(\cos(h)-1)}{h} + \frac{\cos(x)\sin(h)}{h} \right) \amp \amp \text{Split into two fractions}\\ \amp = \lim_{h\to 0} \sin(x) \cdot \lim_{h\to 0}\frac{\cos(h)-1}{h}\\ \amp\quad{}+\lim_{h\to 0}\cos(x)\cdot \lim_{h\to 0}\frac{\sin(h)}{h} \amp \amp \text{Product/sum limit rules}\\ \amp = \sin(x)\cdot 0 + \cos(x) \cdot 1 \amp \amp \text{Applied } \knowl{./knowl/thm_special_limits.html}{\text{Theorem 1.3.17}}\\ \amp = \cos(x)\ \text{!} \end{align*}

We have found that when \(f(x) = \sin(x)\text{,}\) \(\fp(x) = \cos(x)\text{.}\) This should be somewhat surprising; the result of a tedious limit process on 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 2.1.18, 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\text{;}\) we now know the slope is exactly \(\cos(0) =1\text{.}\)

Using similar techniques, we can show that the derivative of \(\cos(x)\) is \(-\sin(x)\text{.}\) See if you can show this yourself; if you get stuck, you can check out the next video.

Figure 2.1.28. Finding the derivative of \(\cos(x)\)
Example 2.1.29. Finding the derivative of a piecewise defined function.

Find the derivative of the absolute value function,

\begin{equation*} f(x) = \abs{x} = \begin{cases} -x \amp x\lt 0 \\ x \amp x\geq 0\end{cases}\text{.} \end{equation*}

See Figure 2.1.30.

Figure 2.1.30. The absolute value function, \(f(x) = \abs{x}\text{.}\) Notice how the slope of the lines (and hence the tangent lines) abruptly changes at \(x=0\text{.}\)
Solution

We need to evaluate \(\lim\limits_{h\to0}\frac{f(x+h)-f(x)}{h}\text{.}\) As \(f\) is piecewise-defined, we need to consider separately the limits when \(x\lt 0\) and when \(x \gt 0\text{.}\)

When \(x\lt 0\text{:}\)

\begin{align*} \frac{d}{dx}(-x) \amp = \lim_{h\to 0}\frac{-(x+h) - (-x)}{h}\\ \amp = \lim_{h\to 0}\frac{-h}{h}\\ \amp = \lim_{h\to 0}-1\\ \amp = -1\text{.} \end{align*}

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

We need to also find the derivative at \(x=0\text{.}\) By the definition of the derivative at a point, we have

\begin{equation*} \fp(0) = \lim_{h\to0}\frac{f(0+h)-f(0)}{h}\text{.} \end{equation*}

Since \(x=0\) is the point where our function's definition switches from one piece to the 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.

\begin{align*} \amp\lim_{h\to0^-}\frac{f(0+h)-f(0)}{h}\\ \amp= \lim_{h\to0^-}\frac{-h-0}{h}\\ \amp=\lim_{h\to0^-}-1\\ \amp =-1 \end{align*}
\begin{align*} \amp \lim_{h\to0^+}\frac{f(0+h)-f(0)}{h}\\ \amp =\lim_{h\to0^+}\frac{h-0}{h}\\ \amp =\lim_{h\to0^+}1\\ \amp =1 \end{align*}

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\text{,}\) and \(f\) is not differentiable at \(0\text{.}\) So we have

\begin{equation*} \fp(x) = \begin{cases} -1 \amp x\lt 0 \\ 1 \amp x \gt 0\end{cases}\text{.} \end{equation*}

At \(x=0\text{,}\) \(\fp(x)\) does not exist; there is a jump discontinuity at \(0\text{;}\) see Figure 2.1.31. So \(f(x) = \abs{x}\) is differentiable everywhere except at \(0\text{.}\)

Figure 2.1.31. A graph of the derivative of \(f(x) = \abs{x}\text{.}\)

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 2.1.32. Finding the derivative of a piecewise defined function.

Find the derivative of \(f(x)\text{,}\) where

\begin{equation*} f(x) = \begin{cases}\sin(x) \amp x\leq \pi/2 \\ 1 \amp x \gt \pi/2\end{cases}\text{.} \end{equation*}

See Figure 2.1.33.

Figure 2.1.33. A graph of \(f(x)\) as defined in Example 2.1.32.
Solution

Using Example 2.1.26, we know that when \(x\lt \pi/2\text{,}\) \(\fp(x) = \cos(x)\text{.}\) It is easy to verify that when \(x \gt \pi/2\text{,}\) \(\fp(x) = 0\text{;}\) consider:

\begin{equation*} \lim_{h\to0}\frac{f(x+h) - f(x)}{h} = \lim_{h\to0}\frac{1-1}{h} = \lim_{h\to0}0 =0\text{.} \end{equation*}

So far we have

\begin{equation*} \fp(x) = \begin{cases}\cos(x) \amp x\lt \pi/2\\ 0 \amp x\gt\pi/2\end{cases}\text{.} \end{equation*}

We still need to find \(\fp(\pi/2)\text{.}\) Notice at \(x=\pi/2\) that both pieces of \(\fp\) are \(0\text{,}\) meaning we can state that \(\fp(\pi/2)=0\text{.}\)

Being more rigorous, we can again evaluate the difference quotient limit at \(x=\pi/2\text{,}\) utilizing again left- and right-hand limits. We will begin with the left-hand limit:

\begin{align*} \amp \lim_{h\to0^-}\frac{f(\pi/2+h)-f(\pi/2)}{h}\\ \amp =\lim_{h\to0^-}\frac{\sin(\pi/2+h)-\sin(\pi/2)}{h}\\ \amp =\lim_{h\to0^-}{ \frac{\sin(\frac{\pi}{2})\cos(h)+\sin(h)\cos(\frac{\pi}{2})-\sin(\frac{\pi}{2})}{h}}\\ \amp =\lim_{h\to0^-}\frac{1\cdot\cos(h)+\sin(h)\cdot 0-1}{h}\\ \amp =\lim_{h\to0^-}\frac{\cos(h)-1}{h} \cdot \lim_{h\to0^-}\frac{\sin(h)}{h}\\ \amp=1\cdot 0\\ \amp =0\text{.} \end{align*}

Notice we used Special Limits to finally evaluate the limit.

Now we will find the right-hand limit:

\begin{align*} \amp \lim_{h\to0^+}\frac{f(\pi/2+h)-f(\pi/2)}{h}\\ \amp =\lim_{h\to0^+}\frac{1-1}{h}\\ \amp =\lim_{h\to0^+}\frac{0}{h}\\ \amp =0\text{.} \end{align*}

Since both the left and right hand limits are \(0\) at \(x=\pi/2\text{,}\) the limit exists and \(\fp(\pi/2)\) exists (and is \(0\)). Therefore we can fully write \(\fp\) as

\begin{equation*} \fp(x) = \begin{cases}\cos(x) \amp x\leq\pi/2\\ 0 \amp x \gt \pi/2\end{cases}\text{.} \end{equation*}

See Figure 2.1.34 for a graph of this derivative function.

Figure 2.1.34. A graph of \(\fp(x)\) in Example 2.1.32.

For one more example involving piecewise-defined functions, we turn to the following video.

Figure 2.1.35. Determining when a piecewise-defined function is differentiable

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” or a vertical tangent line. One such sharp corner is shown in Figure 2.1.30. Even though the function \(f\) in Example 2.1.32 is piecewise-defined, the transition is “smooth” hence it is differentiable. Note how in the graph of \(f\) in Figure 2.1.33 it is difficult to tell when \(f\) switches from one piece to the other; there is no “corner.”

Subsection 2.1.2 Differentiablity on Closed Intervals

When we defined the derivative at a point in Definition 2.1.7, we specified that the interval \(I\) over which a function \(f\) was defined needed to be an open interval. Open intervals are required so that we can take a limit at any point \(c\) in \(I\text{,}\) meaning we want to approach \(c\) from both the left and right.

Recall we also required open intervals in Definition 1.5.1 when we defined what it meant for a function to be continuous. Later, we used one-sided limits to extend continuity to closed intervals. We now extend differentiability to closed intervals by again considering one-sided limits.

Our motivation is three-fold. First, we consider “common sense.” In Example 2.1.23 we found that when \(f(x) = 3x^2+5x-7\text{,}\) \(\fp(x) = 6x+5\text{,}\) and this derivative is defined for all real numbers, hence \(f\) is differentiable everywhere. It seems appropriate to also conclude that \(f\) is differentiable on closed intervals, like \([0,1]\text{,}\) as well. After all, \(\fp(x)\) is defined at both \(x=0\) and \(x=1\text{.}\)

Secondly, consider \(f(x) = \sqrt{x}\text{.}\) The domain of \(f\) is \([0,\infty)\text{.}\) Is \(f\) differentiable on its domain — specifically, is \(f\) differentiable at \(0\text{?}\) (We'll consider this in the next example.)

Finally, in later sections, having the derivative defined on closed intervals will prove useful. One such place is Section 7.4 where the derivative plays a role in measuring the length of a curve.

After a formal definition of differentiability on a closed interval, we explore the concept in an example.

Definition 2.1.36. Differentiability on a Closed Interval.

Let \(f\) be continuous on \([a,b]\) and differentiable on \((a,b)\text{.}\) If the one-sided limits

\begin{align*} \lim_{h\to0^+}\frac{f(a+h)-f(a)}{h} \amp \amp \amp \lim_{h\to0^-}\frac{f(b+h)-f(b)}{h} \end{align*}

exist, then we say \(f\) is differentiable on \([a,b]\text{.}\)

For all the functions \(f\) in this text, we can determine differentiability on \([a,b]\) by considering the limits \(\lim\limits_{x\to a^+}\fp(x)\) and \(\lim\limits_{x\to b^-}\fp(x)\text{.}\) This is often easier to evaluate than the limit of the difference quotient.

Example 2.1.37. Differentiability at an endpoint.

Consider \(f(x) = \sqrt{x}=x^{1/2}\) and \(g(x) = \sqrt{x^3}=x^{3/2}\text{.}\) The domain of each function is \([0,\infty)\text{.}\) It can be shown that each is differentiable on \((0,\infty)\text{;}\) determine the differentiability of each at \(x=0\text{.}\)

Solution

We start by considering \(f\) and take the right-hand limit of the difference quotient:

\begin{align*} \lim_{h\to0^+}\frac{f(a+h)-f(a)}{h} \amp = \lim_{h\to0^+}\frac{\sqrt{0+h}-\sqrt{0}}h\\ \amp = \lim_{h\to0^+}\frac{\sqrt{h}}h\\ \amp = \lim_{h\to0^+}\frac{1}{h^{1/2}}\ =\ \infty\text{.} \end{align*}

The one-sided limit of the difference quotient does not exist at \(x=0\) for \(f\text{;}\) therefore \(f\) is differentiable on \((0,\infty)\) and not differentiable on \([0,\infty)\text{.}\)

We state (without proof) that \(\fp(x) = 1/\big(2\sqrt{x}\big)\text{.}\) Note that \(\lim_{x\to 0^+}\fp(x) = \infty\text{;}\) this limit was easier to evaluate than the limit of the difference quotient, though it required us to already know the derivative of \(f\text{.}\)

Now consider \(g\text{:}\)

\begin{align*} \lim_{h\to0^+}\frac{g(a+h)-g(a)}{h} \amp = \lim_{h\to0^+}\frac{\sqrt{(0+h)^3}-\sqrt{0}}h\\ \amp = \lim_{h\to0^+}\frac{h^{3/2}}h\\ \amp = \lim_{h\to0^+}h^{1/2}\ =\ 0\text{.} \end{align*}

As the one-sided limit exists at \(x=0\text{,}\) we conclude \(g\) is differentiable on its domain of \([0,\infty)\text{.}\)

Figure 2.1.38. A graph of \(y=x^{1/2}\) and \(y=x^{3/2}\) in Example 2.1.37.

We state (without proof) that \(\gp(x) = 3\sqrt{x}/2\text{.}\) Note that \(\lim_{x\to0^+}\gp(x) = 0\text{;}\) again, this limit is easier to evaluate than the limit of the difference quotient.

The two functions are graphed in Figure 2.1.38. Note how \(f(x) = \sqrt{x}\) seems to “go vertical” as \(x\) approaches 0, implying the slopes of its tangent lines are growing toward infinity. Also note how the slopes of the tangent lines to \(g(x)= \sqrt{x^3}\) approach 0 as \(x\) approaches 0.

Most calculus textbooks omit this topic and simply avoid specific cases where it could be applied. We choose in this text to not make use of the topic unless it is “needed.” Many theorems in later sections require a function \(f\) to be differentiable on an open interval \(I\text{;}\) we could remove the word “open” and just use “\(\ldots\) on an interval \(I\text{,}\)” but choose to not do so in keeping with the current mathematical tradition. Our first use of differentiability on closed intervals comes in Chapter 7, where we measure the lengths of curves.

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?”

Exercises 2.1.3 Exercises

Terms and Concepts

1.

True or False? Let \(f\) be a position function. The average rate of change on \([a,b]\) is the slope of the line through the points \((a, f(a))\) and \((b,f(b))\text{.}\)

  • True

  • False

Answer

\(\text{True}\)

2.

True or False? The definition of the derivative of a function at a point involves taking a limit.

  • True

  • False

Answer

\(\text{True}\)

3.

In your own words, explain the difference between the average rate of change and instantaneous rate of change.

4.

In your own words, explain the difference between Definitions 2.1.7 and Definition 2.1.20.

5.

Let \(y=f(x)\text{.}\) Give three different notations equivalent to “\(\fp(x)\text{.}\)”

6.

If two lines are perpendicular, what is true of their slopes?

Solution

The two lines have negative-reciprocal slopes.

In the following exercises, use the definition of the derivative to compute the derivative of the given function.

7.

Use the definition of the derivative to compute the derivative of \(f\) where

\begin{equation*} f(x) = 6 \text{.} \end{equation*}
8.

Use the definition of the derivative to compute the derivative of \(f\) where

\begin{equation*} f(x) = 2x \text{.} \end{equation*}
9.

Use the definition of the derivative to compute the derivative of \(f\) where

\begin{equation*} f(t) = 4-3t \text{.} \end{equation*}
10.

Use the definition of the derivative to compute the derivative of \(g\) where

\begin{equation*} g(x) = x^2 \text{.} \end{equation*}
11.

Use the definition of the derivative to compute the derivative of \(h\text{,}\) where

\begin{equation*} h(x) = x^3 \text{.} \end{equation*}
12.

Use the definition of the derivative to compute the derivative of \(f\) where

\begin{equation*} f(x) = 3x^2-x+4 \text{.} \end{equation*}
13.

Use the definition of the derivative to compute the derivative of \(r\) where

\begin{equation*} r(x) = \frac{1}{x} \text{.} \end{equation*}
14.

Use the definition of the derivative to compute the derivative of \(r\) where

\begin{equation*} r(s) = \frac{1}{s-2} \text{.} \end{equation*}

In the following exercises, a function and an \(x\)-value \(c\) are given. (Note: these functions are the same as those given in Exercises 2.1.3.7 through Exercise 2.1.3.14.) Give the equation of the tangent line at \(c\text{,}\) and give the equation of the normal line at \(c\text{.}\)

15.

Let \(f(x)=6\text{.}\)

At \(x=-2\text{,}\) the equation of the tangent line to the graph of \(f\) is .

At \(x=-2\text{,}\) the equation of the normal line to the graph of \(f\) is .

Answer 1

\(y = 6\)

Answer 2

\(x = -2\)

16.

Let \(f(x)=2x\text{.}\)

At \(x=3\text{,}\) the equation of the tangent line to the graph of \(f\) is .

At \(x=3\text{,}\) the equation of the normal line to the graph of \(f\) is .

Answer 1

\(y-2x = 0\)

Answer 2

\(0.5x+y = 7.5\)

17.

Let \(f(x)=4-3x\text{.}\)

At \(x=7\text{,}\) the equation of the tangent line to the graph of \(f\) is .

At \(x=7\text{,}\) the equation of the normal line to the graph of \(f\) is .

Answer 1

\(3x+y = 4\)

Answer 2

\(y-0.333333x = -19.3333\)

18.

Let \(g(x)=x^2\text{.}\)

At \(x=2\text{,}\) the equation of the tangent line to the graph of \(g\) is .

At \(x=2\text{,}\) the equation of the normal line to the graph of \(g\) is .

Answer 1

\(y-4x = -4\)

Answer 2

\(0.25x+y = 4.5\)

19.

\(h(x) = x^3\text{,}\) at \(x=4\text{.}\)

Answer
  1. \(\displaystyle y = 48(x-4)+64\)

  2. \(\displaystyle y = -\frac{1}{48}(x-4)+64\)

20.

Let \(f(x)=3x^2-x+4\text{.}\)

At \(x=-1\text{,}\) the equation of the tangent line to the graph of \(f\) is .

At \(x=-1\text{,}\) the equation of the normal line to the graph of \(f\) is .

Answer 1

\(7x+y = 1\)

Answer 2

\(y-0.142857x = 8.14286\)

21.

Let \(r(x)=\frac{1}{x}\text{.}\)

At \(x=-2\text{,}\) the equation of the tangent line to the graph of \(r\) is .

At \(x=-2\text{,}\) the equation of the normal line to the graph of \(r\) is .

Answer 1

\(0.25x+y = -1\)

Answer 2

\(y-4x = 7.5\)

22.

Let \(r(x)=\frac{1}{x-2}\text{.}\)

At \(x=3\text{,}\) the equation of the tangent line to the graph of \(r\) is .

At \(x=3\text{,}\) the equation of the normal line to the graph of \(r\) is .

Answer 1

\(x+y = 4\)

Answer 2

\(y-x = -2\)

In the following exercises, a function \(f\) and an \(x\)-value \(a\) are given. Approximate the equation of the tangent line to the graph of \(f\) at \(x=a\) by numerically approximating \(\fp(a)\text{,}\) using \(h=0.1\text{.}\)

23.

Let \(f(x) = x^2+2x+1\text{.}\) Approximate the equation of the tangent line to the graph of \(f\) at \(a=3\) by numerically approximating \(\fp(a)\text{,}\) using \(h=0.1\text{.}\)

Answer

\(y-8.1x = -8.3\)

24.

Let \(f(x) = \frac{10}{x+1}\text{.}\) Approximate the equation of the tangent line to the graph of \(f\) at \(a=9\) by numerically approximating \(\fp(a)\text{,}\) using \(h=0.1\text{.}\)

Answer

\(0.09901x+y = 1.89109\)

25.

Let \(f(x) = e^x\text{.}\) Approximate the equation of the tangent line to the graph of \(f\) at \(a=2\) by numerically approximating \(\fp(a)\text{,}\) using \(h=0.1\text{.}\)

Answer

\(y-7.771x = -8.15294\)

26.

Let \(f(x) = \cos(x)\text{.}\) Approximate the equation of the tangent line to the graph of \(f\) at \(a=0\) by numerically approximating \(\fp(a)\text{,}\) using \(h=0.1\text{.}\)

Answer

\(0.04996x+y = 1\)

27.

The graph of \(f(x)=x^2-1\) is shown.

  1. Use the graph to approximate the slope of the tangent line to \(f\) at the following points:

    At \((-1,0)\text{,}\) the slope is approximately .

    At \((0,-1)\text{,}\) the slope is approximately .

    At \((2,3)\text{,}\) the slope is approximately .

  2. Using the definition, \(\fp(x)=\).

  3. Find the slope of the tangent line at the points \((-1,0)\text{,}\) \((0,-1)\) and \((2,3)\text{.}\)

    At \((-1,0)\text{,}\) the slope is .

    At \((0,-1)\text{,}\) the slope is .

    At \((2,3)\text{,}\) the slope is .

Answer 1

\(-2\)

Answer 2

\(0\)

Answer 3

\(4\)

Answer 4

\(2x\)

Answer 5

\(-2\)

Answer 6

\(0\)

Answer 7

\(4\)

28.

The graph of \(f(x)=\frac{1}{x+1}\) is shown.

  1. Use the graph to approximate the slope of the tangent line to \(f\) at the following points:

    At \((0,1)\text{,}\) the slope is approximately .

    At \((1,0.5)\text{,}\) the slope is approximately .

  2. Using the definition, \(\fp(x)=\).

  3. Find the slope of the tangent line at the points \((0,1)\) and \((1,0.5)\text{.}\)

    At \((0,1)\text{,}\) the slope is .

    At \((1,0.5)\text{,}\) the slope is .

Answer 1

\(-1\)

Answer 2

\(\frac{-1}{4}\)

Answer 3

\(\frac{-1}{\left(x+1\right)^{2}}\)

Answer 4

\(-1\)

Answer 5

\(\frac{-1}{4}\)

In the following exercises, a graph of a function \(f(x)\) is given. Using the graph, sketch \(\fp(x)\text{.}\)

29.

Use the graph of the function \(f(x)\) shown below to sketch the graph of \(\fp(x)\text{.}\)

30.

Use the graph of the function \(f(x)\) shown below to sketch the graph of \(\fp(x)\text{.}\)

31.

Use the graph of the function \(f(x)\) shown below to sketch the graph of \(\fp(x)\text{.}\)

32.

Use the graph of the function \(f(x)\) shown below to sketch the graph of \(\fp(x)\text{.}\)

33.

Using the graph of \(g(x)\) below, answer the following questions.

  1. Where is \(g(x) \gt 0\text{?}\)

  2. Where is \(g(x) \lt 0\text{?}\)

  3. Where is \(g(x) = 0\text{?}\)

  4. Where is \(g'(x) \lt 0\text{?}\)

  5. Where is \(g'(x) \gt 0\text{?}\)

  6. Where is \(g'(x) = 0\text{?}\)

Answer 1

\(\left(-1.5,1.5\right)\)

Answer 2

\(\left(-\infty ,-1.5\right)\cup \left(1.5,\infty \right)\)

Answer 3

\(\left\{-1.5,1.5\right\}\)

Answer 4

\(\left(-1,0\right)\cup \left(1,\infty \right)\)

Answer 5

\(\left(-\infty ,-1\right)\cup \left(0,1\right)\)

Answer 6

\(\left\{-1,0,1\right\}\)

In the following exercises, a function \(f(x)\) is given, along with its domain and derivative. Determine if \(f(x)\) is differentiable on its domain.

34.

\(\ds f(x) = \sqrt{x^5(1-x)}\text{,}\) domain = \([0,1]\text{,}\) \(\ds\fp(x) = \frac{(5-6x)x^{3/2}}{2\sqrt{1-x}}\)

Answer

\(\lim_{h\to0^+}\frac{f(0+h)-f(0)}h =0\text{;}\) note also that \(\lim_{x\to0^+}\fp(x) = 0\text{.}\) So \(f\) is differentiable at \(x=0\text{.}\)

\(\lim_{h\to0^-}\frac{f(1+h)-f(1)}h =-\infty\text{;}\) note also that \(\lim_{x\to1^-}\fp(x) = -\infty\text{.}\) So \(f\) is not differentiable at \(x=1\text{.}\)

\(f\) is differentiable on \([0,1)\text{,}\) not its entire domain.

35.

\(\ds f(x) = \cos\big(\sqrt{x}\big)\text{,}\) domain = \([0,\infty)\text{,}\) \(\ds\fp(x) = -\frac{\sin\big(\sqrt{x}\big)}{2\sqrt{x}}\)

Answer

The limit of the difference quotient is difficult to evaluate. Using Theorem 1.3.17, we can determine \(\lim_{x\to0^+}\fp(x) = -1/2\text{.}\)

Since \(\fp\) is defined on \((0,\infty)\text{,}\) we conclude \(f\) is differentiable on \([0,\infty)\text{.}\)

Review

36.

Approximate \(\displaystyle\lim_{x\to 5}\frac{x^2+2 x-35}{x^2-10.5 x+27.5}\text{.}\)

Answer

\(-24\)

37.

Use the Bisection Method to approximate, accurate to two decimal places, the root of \(g(x) = x^3+x^2+x-1\) on \([0.5,0.6]\text{.}\)

Answer

\(0.54\)

38.

Give interval or union of intervals on which each of the following functions are continuous.

  1. \(\dfrac{1}{e^x+1}\)

  2. \(\dfrac{1}{x^2-1}\)

  3. \(\sqrt{5-x}\)

  4. \(\sqrt{5-x^2}\)

Answer 1

\(\left(-\infty ,\infty \right)\)

Answer 2

\(\left(-\infty ,-1\right)\cup \left(-1,1\right)\cup \left(1,\infty \right)\)

Answer 3

\(\left(-\infty ,5\right]\)

Answer 4

\(\left[-\left(\sqrt{5}\right),\sqrt{5}\right]\)

39.

Use the graph of \(f(x)\) provided to answer the following.

  1. \(\lim\limits_{x\to-3^-} f(x) =\)

  2. \(\lim\limits_{x\to-3^+} f(x) =\)

  3. \(\lim\limits_{x\to-3} f(x) =\)

  4. Where is \(f\) continuous?

Answer 1

\(1\)

Answer 2

\(3\)

Answer 3

\(\text{DNE}\)

Answer 4

\(\left(-\infty ,-3\right)\cup \left(-3,\infty \right)\)