$\newcommand{\dollar}{\} \DeclareMathOperator{\erf}{erf} \DeclareMathOperator{\arctanh}{arctanh} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&}$

## Section2.2The Derivative Function

###### Motivating Questions
• How does the limit definition of the derivative of a function $f$ lead to an entirely new (but related) function $f'\text{?}$

• What is the difference between writing $f'(a)$ and $f'(x)\text{?}$

• What are some examples of functions $f$ for which $f'$ is undefined at one or more points?

In Section 1.5 we introduced the derivative of a function at a point $x=a\text{.}$

###### Derivative at a Point

Let $f$ be a function and $x = a$ a value in the function's domain. The derivative of $f$ with respect to $x$ evaluated at $x = a$, denoted $f'(a)\text{,}$ is defined by the formula

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

provided this limit exists.

This is sometimes referred to as the limit definition of the derivative at a point.

Aloud, we read the symbol $f'(a)$ as either $f$-prime of $a$ or the derivative of $f$ evaluated at $x = a\text{.}$ The next several chapters will be devoted to understanding, computing, applying, and interpreting derivatives.

###### Example2.18

Consider the function $f(x) = 4x - x^2\text{.}$

1. Use the limit definition of the derivative to compute the derivative values: $f'(0)\text{,}$ $f'(1)\text{,}$ $f'(2)\text{,}$ and $f'(3)\text{.}$

2. Observe that the work to find $f'(a)$ is the same, regardless of the value of $a\text{.}$ Based on your work in (a), what do you conjecture is the value of $f'(4)\text{?}$ How about $f'(5)\text{?}$ (Note: you should not use the limit definition of the derivative to find either value.)

3. Conjecture a formula for $f'(a)$ that depends only on the value $a\text{.}$ That is, in the same way that we have a formula for $f(x)$ (recall $f(x) = 4x - x^2$), see if you can use your work above to guess a formula for $f'(a)$ in terms of $a\text{.}$

Hint
1. $f'(a)=\lim_{h\to0}\frac{f(a+h)-f(a)}{h}$
2. Is there a pattern with the four values you found in (a)?
3. Based on (a) and (b), what type of familiar function might the derivative be? What do formulas for this type of function look like?
1. $f'(0)=4,\, f'(1)=2,\, f'(2)=0,\, f'(3)=-2\text{.}$
2. $f'(4)=-4,\, f'(5)=-6\text{.}$
3. $f'(a)=-2a+4\text{.}$
Solution
1. Since $f(0)=0$ and $f(0+h)=f(h)=4h-h^2\text{,}$ we can say that

\begin{align*} f'(0)=\mathstrut \amp \lim_{h\to0}\frac{f(0+h)-f(0)}{h}\\ =\mathstrut \amp \lim_{h\to0}\frac{(4h-h^2)-0}{h}\\ =\mathstrut \amp \lim_{h\to0}(4-h)\\ =\mathstrut \amp 4\text{.} \end{align*}

Since $f(1)=4(1)-(1)^2=3$ and

\begin{align*} f(1+h)=\mathstrut \amp 4(1+h)-(1+h)^2\\ =\mathstrut \amp 4+4h-(1+2h+h^2)\\ =\mathstrut \amp 3+2h-h^2\text{,} \end{align*}

we can say that

\begin{align*} f'(1)=\mathstrut \amp \lim_{h\to0}\frac{f(1+h)-f(1)}{h}\\ =\mathstrut \amp \lim_{h\to0}\frac{(3+2h-h^2)-(3)}{h}\\ =\mathstrut \amp \lim_{h\to0}\frac{2h-h^2}{h}\\ =\mathstrut \amp \lim_{h\to0}(2-h)\\ =\mathstrut \amp 2\text{.} \end{align*}

Similar work shows that $f'(2)=0$ and $f'(3)=-2\text{.}$

2. In part (a), each time we increased the input value by $1\text{,}$ the derivative value decreased by $2\text{.}$ This leads us to believe that $f'(4)=-4$ and $f'(5)=-6\text{,}$ assuming the linear pattern continues.
3. The derivative values seem to fit a linear pattern, with a slope of $-2$ and a $y$-intercept of $4\text{.}$ A reasonable formula for $f'(a)\text{,}$ then, is $f'(a)=-2a+4\text{.}$

### SubsectionHow the Derivative is Itself a Function

In your work in Example2.18 with $f(x) = 4x - x^2\text{,}$ you may have found several patterns. One comes from observing that $f'(0) = 4\text{,}$ $f'(1) = 2\text{,}$ $f'(2) = 0\text{,}$ and $f'(3) = -2\text{.}$ That sequence of values leads us naturally to conjecture that $f'(4) = -4$ and $f'(5) = -6\text{.}$ We also observe that the particular value of $a$ has very little effect on the process of computing the value of the derivative through the limit definition. To see this more clearly, we compute $f'(a)$ where $a$ is a variable that is, $a$ represents a number to be named later. Following the now standard process of using the limit definition of the derivative,

\begin{align*} f'(a) =\mathstrut \amp \lim_{h \to 0} \frac{f(a + h) - f(a)}{h} \\ =\mathstrut \amp \lim_{h \to 0} \frac{4(a + h) - (a + h)^2 - (4a-a^2)}{h}\\ =\mathstrut \amp \lim_{h \to 0} \frac{4a + 4h - a^2 - 2ha - h^2 - 4a+a^2}{h} \\ =\mathstrut \amp \lim_{h \to 0} \frac{4h - 2ha - h^2}{h}\\ =\mathstrut \amp \lim_{h \to 0} \frac{h(4 - 2a - h)}{h} \\ =\mathstrut \amp \lim_{h \to 0} (4 - 2a - h)\text{.} \end{align*}

Here we observe that neither $4$ nor $2a$ depend on the value of $h\text{,}$ so as $h$ tends to $0\text{,}$ the quantity $(4 - 2a - h)$ approaches $(4 - 2a)\text{.}$ Thus $f'(a) = 4 - 2a\text{.}$

This result is consistent with the specific values we found above: e.g., $f'(3) = 4 - 2(3) = -2\text{.}$ And indeed, our work confirms that the value of $a$ has almost no bearing on the process of computing the derivative. We note further that the letter being used is immaterial: whether we call it $a\text{,}$ $x\text{,}$ or anything else, the derivative at a given value is simply given by 4 minus 2 times the value. We choose to use $x$ for consistency with the original function given by $y = f(x)\text{,}$ as well as for the purpose of graphing the derivative function. For the function $f(x) = 4x - x^2\text{,}$ it follows that $f'(x) = 4 - 2x\text{.}$

When we first defined the derivative we wrote the definition in terms of a value $a$ to find $f'(a)\text{.}$ As we have seen above, the letter $a$ is merely a placeholder and it often makes more sense to use $x$ instead. For the record, here we restate the definition of the derivative.

###### Derivative Function

Let $f$ be a function and $x$ a value in the function's domain. We define a new function called $f'$ to be the derivative of $f\text{,}$ where $f'$ is given by the formula

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

provided this limit exists.

We will now consider how to compute the derivative. Given a formula for $y = f(x)\text{,}$ how does the limit definition of the derivative generate a formula for $y = f'(x)\text{?}$

###### Example2.19

Find the derivative of $f(x)=3x^2+2x$ using the limit definition.

To do so we will use

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

Use the following steps to evaluate this limit.

Step 1: find $f(x+h)$ by substituting $x+h$ in for $x$ in your function:

\begin{align*} f(x+h)=\mathstrut \amp 3(x+h)^2+2(x+h)\\ =\mathstrut \amp 3(x^2+2xh+h^2)+2x+2h\\ =\mathstrut \amp 3x^3+6xh+3h^2+2x+2h \end{align*}

Step 2: Using $f(x+h)$ found in Step 1, find $f(x+h)-f(x)$ and simplify.

\begin{align*} f(x+h)-f(x)=\mathstrut \amp (3x^3+6xh+3h^2+2x+2h)-(3x^2+2x)\\ = \mathstrut \amp 6xh+h^2+2h \end{align*}

Note: every term in the simplified version of $f(x+h)-f(x)$ should be multiplied by a factor of $h\text{.}$

Step 3: Find the difference quotient: $\frac{f(x+h)-f(x)}{h}$ and simplify. Factor out an $h$ from the numerator and cancel with the denominator.

\begin{align*} \frac{f(x+h)-f(x)}{h}=\mathstrut \amp \frac{6xh+3h^2+2h}{h}\\ = \mathstrut \amp \frac{h(6x+3h+2)}{h}\\ = \mathstrut \amp 6x+h+2 \end{align*}

Step 4: take the limit as $h$ goes to zero of your simplified difference quotient to get the derivative.

\begin{align*} f'(x)=\mathstrut \amp \lim_{h\to0}\frac{f(x+h)-f(x)}{h}\\ = \mathstrut \amp \lim_{h\to0} 6x+h+2\\ = \mathstrut \amp 6x+3(0)+2\\ = \mathstrut \amp 6x+2 \end{align*}

Thus we find that $f'(x)=6x+2\text{.}$

As your algebra improves, you can do all the steps in the previous example within the limit.

###### Example2.20

For each of the listed functions, determine a formula for the derivative function using the limit definition. Pay careful attention to the function names and independent variables. It is important to be comfortable with using letters other than $f$ and $x\text{.}$ For example, given a function $p(z)\text{,}$ we call its derivative $p'(z)\text{.}$

1. $f(x) = x$

2. $g(t) = 3t+4$

3. $p(z) =4 z^2$

4. $q(s) = s^3$

5. $F(t) = 5t^2-4t+3$

6. $G(y) =5+6y-2y^2$

1. $f'(x) = 1\text{.}$

2. $g'(t) = 3\text{.}$

3. $p'(z) = 8z\text{.}$

4. $q'(s) = 3s^2\text{.}$

5. $F'(t) = 10t-4\text{.}$

6. $G'(y) = 6-4y\text{.}$

Solution
1. \begin{align*} f'(x) =\mathstrut \amp \lim_{h \to 0} \frac{f(x+h) - f(x)}{h}\\ =\mathstrut \amp \lim_{h \to 0} \frac{(x+h)-x}{h}\\ =\mathstrut \amp \lim_{h \to 0} \frac{h}{h}\\ =\mathstrut \amp \lim_{h \to 0} (1)\\ =\mathstrut \amp 1 \end{align*}
2. \begin{align*} g'(t) =\mathstrut \amp \lim_{h \to 0} \frac{g(t+h) - g(t)}{h}\\ =\mathstrut \amp \lim_{h \to 0} \frac{(3(t+h)+4)-(3t+4)}{h}\\ =\mathstrut \amp \lim_{h \to 0} \frac{3t+3h+4-3t-4}{h}\\ =\mathstrut \amp \lim_{h \to 0} \frac{3h}{h}\\ =\mathstrut \amp \lim_{h \to 0} 3\\ =\mathstrut \amp 3 \end{align*}
3. \begin{align*} p'(z) =\mathstrut \amp \lim_{h \to 0} \frac{p(z+h) - p(z)}{h}\\ =\mathstrut \amp \lim_{h \to 0} \frac{4(z+h)^2 - 4z^2}{h}\\ =\mathstrut \amp \lim_{h \to 0} \frac{4(z^2+2zh+h^2) - 4z^2}{h}\\ =\mathstrut \amp \lim_{h \to 0} \frac{4z^2 + 8zh + 4h^2 - 4z^2}{h}\\ =\mathstrut \amp \lim_{h \to 0} \frac{8zh + 4h^2}{h}=\lim_{h\to 0} \frac{h(8z+4h)}{h}\\ =\mathstrut \amp \lim_{h \to 0} (8z + 4h)=8z+4(0)\\ =\mathstrut \amp 8z \end{align*}
4. \begin{align*} q'(s) =\mathstrut \amp \lim_{h \to 0} \frac{q(s+h) - q(s)}{h}\\ =\mathstrut \amp \lim_{h \to 0} \frac{(s+h)^3 - s^3}{h}\\ =\mathstrut \amp \lim_{h \to 0} \frac{(s^3 + 3s^2h + 3sh^2 + h^3) - s^3}{h}\\ =\mathstrut \amp \lim_{h \to 0} \frac{3s^2h + 3sh^2 + h^2}{h}=\lim_{h\to 0}\frac{h(3s^2+3sh+h^2)}{h}\\ =\mathstrut \amp \lim_{h \to 0} (3s^2 + 3sh + h)=3s^2+3s(0)+0\\ =\mathstrut \amp 3s^2 \end{align*}
5. \begin{align*} F'(t) =\mathstrut \amp \lim_{h \to 0} \frac{F(t+h) - F(t)}{h}\\ =\mathstrut \amp \lim_{h \to 0} \frac{5(t+h)^2-4(t+h)+3-(5t^2-4t+3)}{h}\\ =\mathstrut \amp \lim_{h \to 0} \frac{5t^2+10ht+5h^2-4t-4h+3-5t^2+4t-3}{h}\\ =\mathstrut \amp \lim_{h \to 0} \frac{10ht+5h^2-4h}{h}\\ =\mathstrut \amp \lim_{h \to 0} 10t+5h-4\\ =\mathstrut \amp 10t-4 \end{align*}
6. \begin{align*} G'(y) =\mathstrut \amp \lim_{h \to 0} \frac{G(y+h) - G(y)}{h}\\ =\mathstrut \amp \lim_{h \to 0} \frac{5+6(y+h)-2(y+h)^2-(5+6y-2y^2)}{h}\\ =\mathstrut \amp \lim_{h \to 0} \frac{5+6y+6h-2y^2-4yh-2h^2-5-6y+2y^2}{h}\\ =\mathstrut \amp \lim_{h \to 0} \frac{6h-4yh-2h^2}{h}\\ =\mathstrut \amp \lim_{h \to 0} 6-4y-2h\\ =\mathstrut \amp 6-4y \end{align*}

### SubsectionUnits of the Derivative Function

As we now know, the derivative of the function $f$ at a fixed value $x$ is given by

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

and this value has several different interpretations. If we set $x = a\text{,}$ one meaning of $f'(a)$ is the slope of the tangent line at the point $(a,f(a))\text{.}$

We also sometimes write $\frac{df}{dx}$ or $\frac{dy}{dx}$ instead of $f'(x)\text{,}$ and these alternate notations help us see the units (and thus the meaning) of the derivative as the instantaneous rate of change of $f$ with respect to $x$. The units on the slope of the secant line, $\frac{f(x+h)-f(x)}{h}\text{,}$ are units of $y$ per unit of $x\text{,}$ and when we take the limit as $h$ goes to zero, the derivative $f'(x)$ has the same units: units of $y$ per unit of $x\text{.}$ It is helpful to remember that the units on the derivative function are units of output per unit of input, for the variables of the original function.

###### Example2.21

Suppose that the function $y = P(t)$ measures the population of a city (in thousands) at the start of year $t$ (where $t = 0$ corresponds to 2010 AD). We are told that $P'(2) = 21.37\text{.}$ What is the meaning of this value?

Since $P$ is measured in thousands and $t$ is measured in years, we can say that the instantaneous rate of change of the city's population with respect to time at the start of 2012 is 21.37 thousand people per year. We therefore expect that in the coming year, about 21,370 people will be added to the city's population.

### SubsectionTangent Lines

Recall that a line can be written as $y=m(x-x_0)+y_0$ where $m$ is the slope of the line and $(x_0,y_0)$ is a point on the line. Using this information we are in a position to quickly find the equation for the tangent line to a curve at a point. Specifically, we have the following definition.

###### The Tangent Line

Given a differentiable function $f$ and a point $(x_0,y_0)$ the equation for the tangent line to the function $f$ at $(x_0,y_0)$ is given by

\begin{equation*} y=f'(x_0)(x-x_0)+y_0. \end{equation*}

###### Example2.22

We can find the equation of the line tangent to the curve given by graphing $y=f(x)$ where $f(x)=x^2+2$ at $(2,3)$ by first noting that

\begin{equation*} f'(x)=\lim_{h \rightarrow 0} \frac{(x+h)^2+2-x^2-2}{h}=2x\text{.} \end{equation*}

Therefore the equation of the tangent line to $f$ at $(2,3)$ is

\begin{equation*} y=f'(2)(x-2)+3=4(x-2)-3=4x-5\text{.} \end{equation*}

We will look more at tangent lines in future sections but the basic ideas appear here. Specifically, if we know data about a function at a specific point such as it's value at that point and rate of change at that point then we can estimate its value at a future point.

### SubsectionSummary

• The limit definition of the derivative, $f'(x) = \lim_{h \to 0} \frac{f(x+h)-f(x)}{h}\text{,}$ produces a value for each $x$ at which the derivative is defined, and this leads to a new function $y = f'(x)\text{.}$ It is especially important to note that taking the derivative is a process that starts with a given function $f$ and produces a new, related function $f'\text{.}$

• There is essentially no difference between writing $f'(a)$ (as we did regularly in Section2.1) and writing $f'(x)\text{.}$ In either case, the variable is just a placeholder that is used to define the rule for the derivative function.

### SubsectionExercises

Let $f$ be a function with the following properties: $f$ is differentiable at every value of $x$ (that is, $f$ has a derivative at every point), $f(-2) = 1\text{,}$ and $f'(-2) = -2\text{,}$ $f'(-1) = -1\text{,}$ $f'(0) = 0\text{,}$ $f'(1) = 1\text{,}$ and $f'(2) = 2\text{.}$

1. On the axes provided at left in Figure2.23, sketch a possible graph of $y = f(x)\text{.}$ Explain why your graph meets the stated criteria.

2. Conjecture a formula for the function $y = f(x)\text{.}$ Use the limit definition of the derivative to determine the corresponding formula for $y = f'(x)\text{.}$ Discuss both graphical and algebraic evidence for whether or not your conjecture is correct. Figure2.23Axes for plotting $y = f(x)$ in (a) and $y = f'(x)$ in (b).

Consider the function $g(x) = x^2 - x + 3\text{.}$

1. Use the limit definition of the derivative to determine a formula for $g'(x)\text{.}$

2. Use a graphing utility to plot both $y = g(x)$ and your result for $y = g'(x)\text{;}$ does your formula for $g'(x)$ generate the graph you expected?

3. Use the limit definition of the derivative to find a formula for $p'(x)$ where $p(x) = 5x^2 - 4x + 12\text{.}$

4. Compare and contrast the formulas for $g'(x)$ and $p'(x)$ you have found. How do the constants 5, 4, 12, and 3 affect the results?

Let $g$ be a continuous function (that is, one with no jumps or holes in the graph) and suppose that a graph of $y= g'(x)$ is given by the graph on the right in Figure2.24. Figure2.24Axes for plotting $y = g(x)$ and, at right, the graph of $y = g'(x)\text{.}$
1. Observe that for every value of $x$ that satisfies $0 \lt x \lt 2\text{,}$ the value of $g'(x)$ is constant. What does this tell you about the behavior of the graph of $y = g(x)$ on this interval?

2. On what intervals other than $0 \lt x \lt 2$ do you expect $y = g(x)$ to be a linear function? Why?

3. At which values of $x$ is $g'(x)$ not defined? What behavior does this lead you to expect to see in the graph of $y=g(x)\text{?}$

4. Suppose that $g(0) = 1\text{.}$ On the axes provided at left in Figure2.24, sketch an accurate graph of $y = g(x)\text{.}$

For each graph that provides an original function $y = f(x)$ in Figure2.25, your task is to sketch an approximate graph of its derivative function, $y = f'(x)\text{,}$ on the axes immediately below. View the scale of the grid for the graph of $f$ as being $1 \times 1\text{,}$ and assume the horizontal scale of the grid for the graph of $f'$ is identical to that for $f\text{.}$ If you need to adjust the vertical scale on the axes for the graph of $f'\text{,}$ you should label that accordingly. Figure2.25Graphs of $y = f(x)$ and grids for plotting the corresponding graph of $y = f'(x)\text{.}$