### Learning Objectives

- 3.9.1. Find the derivative of exponential functions.
- 3.9.2. Find the derivative of logarithmic functions.
- 3.9.3. Use logarithmic differentiation to determine the derivative of a function.

So far, we have learned how to differentiate a variety of functions, including trigonometric, inverse, and implicit functions. In this section, we explore derivatives of exponential and logarithmic functions. As we discussed in Introduction to Functions and Graphs, exponential functions play an important role in modeling population growth and the decay of radioactive materials. Logarithmic functions can help rescale large quantities and are particularly helpful for rewriting complicated expressions.

### Derivative of the Exponential Function

Just as when we found the derivatives of other functions, we can find the derivatives of exponential and logarithmic functions using formulas. As we develop these formulas, we need to make certain basic assumptions. The proofs that these assumptions hold are beyond the scope of this course.

First of all, we begin with the assumption that the function $B\left(x\right)={b}^{x},b>0,$ is defined for every real number and is continuous. In previous courses, the values of exponential functions for all rational numbers were defined—beginning with the definition of ${b}^{n},$ where $n$ is a positive integer—as the product of $b$ multiplied by itself $n$ times. Later, we defined ${b}^{0}=1,{b}^{\text{\u2212}n}=\frac{1}{{b}^{n}},$ for a positive integer $n,$ and ${b}^{s\text{/}t}=(\sqrt[t]{b}{)}^{s}$ for positive integers $s$ and $t.$ These definitions leave open the question of the value of ${b}^{r}$ where $r$ is an arbitrary real number. By assuming the *continuity* of $B\left(x\right)={b}^{x},b>0,$ we may interpret ${b}^{r}$ as $\underset{x\to r}{\text{lim}}{b}^{x}$ where the values of $x$ as we take the limit are rational. For example, we may view ${4}^{\pi}$ as the number satisfying

As we see in the following table, ${4}^{\pi}\approx 77.88.$

$x$ | ${4}^{x}$ | $x$ | ${4}^{x}$ |
---|---|---|---|

${4}^{3}$ | 64 | ${4}^{3.141593}$ | 77.8802710486 |

${4}^{3.1}$ | 73.5166947198 | ${4}^{3.1416}$ | 77.8810268071 |

${4}^{3.14}$ | 77.7084726013 | ${4}^{3.142}$ | 77.9242251944 |

${4}^{3.141}$ | 77.8162741237 | ${4}^{3.15}$ | 78.7932424541 |

${4}^{3.1415}$ | 77.8702309526 | ${4}^{3.2}$ | 84.4485062895 |

${4}^{3.14159}$ | 77.8799471543 | ${4}^{4}$ | 256 |

We also assume that for $B\left(x\right)={b}^{x},b>0,$ the value ${B}^{\prime}\left(0\right)$ of the derivative exists. In this section, we show that by making this one additional assumption, it is possible to prove that the function $B\left(x\right)$ is differentiable everywhere.

We make one final assumption: that there is a unique value of $b>0$ for which ${B}^{\prime}\left(0\right)=1.$ We define $e$ to be this unique value, as we did in Introduction to Functions and Graphs. Figure 3.33 provides graphs of the functions $y={2}^{x},y={3}^{x},y={2.7}^{x},$ and $y={2.8}^{x}.$ A visual estimate of the slopes of the tangent lines to these functions at 0 provides evidence that the value of *e* lies somewhere between 2.7 and 2.8. The function $E\left(x\right)={e}^{x}$ is called the natural exponential function. Its inverse, $L\left(x\right)={\text{log}}_{e}x=\text{ln}\phantom{\rule{0.1em}{0ex}}x$ is called the natural logarithmic function.

For a better estimate of $e,$ we may construct a table of estimates of ${B}^{\prime}\left(0\right)$ for functions of the form $B\left(x\right)={b}^{x}.$ Before doing this, recall that

for values of $x$ very close to zero. For our estimates, we choose $x=0.00001$ and $x=\mathrm{-0.00001}$ to obtain the estimate

See the following table.

$b$ | $\frac{{b}^{\mathrm{-0.00001}}-1}{\mathrm{-0.00001}}<{B}^{\prime}\left(0\right)<\frac{{b}^{0.00001}-1}{0.00001}$ | $b$ | $\frac{{b}^{\mathrm{-0.00001}}-1}{\mathrm{-0.00001}}<{B}^{\prime}\left(0\right)<\frac{{b}^{0.00001}-1}{0.00001}$ |
---|---|---|---|

$2$ | $0.693145<{B}^{\prime}\left(0\right)<0.69315$ | $2.7183$ | $1.000002<{B}^{\prime}\left(0\right)<1.000012$ |

$2.7$ | $0.993247<{B}^{\prime}\left(0\right)<0.993257$ | $2.719$ | $1.000259<{B}^{\prime}\left(0\right)<1.000269$ |

$2.71$ | $0.996944<{B}^{\prime}\left(0\right)<0.996954$ | $2.72$ | $1.000627<{B}^{\prime}\left(0\right)<1.000637$ |

$2.718$ | $0.999891<{B}^{\prime}\left(0\right)<0.999901$ | $2.8$ | $1.029614<{B}^{\prime}\left(0\right)<1.029625$ |

$2.7182$ | $0.999965<{B}^{\prime}\left(0\right)<0.999975$ | $3$ | $1.098606<{B}^{\prime}\left(0\right)<1.098618$ |

The evidence from the table suggests that $2.7182<e<2.7183.$

The graph of $E\left(x\right)={e}^{x}$ together with the line $y=x+1$ are shown in Figure 3.34. This line is tangent to the graph of $E\left(x\right)={e}^{x}$ at $x=0.$

Now that we have laid out our basic assumptions, we begin our investigation by exploring the derivative of $B\left(x\right)={b}^{x},b>0.$ Recall that we have assumed that ${B}^{\prime}\left(0\right)$ exists. By applying the limit definition to the derivative we conclude that

Turning to ${B}^{\prime}\left(x\right),$ we obtain the following.

We see that on the basis of the assumption that $B\left(x\right)={b}^{x}$ is differentiable at $0,B\left(x\right)$ is not only differentiable everywhere, but its derivative is

For $E\left(x\right)={e}^{x},{E}^{\prime}\left(0\right)=1.$ Thus, we have ${E}^{\prime}\left(x\right)={e}^{x}.$ (The value of ${B}^{\prime}\left(0\right)$ for an arbitrary function of the form $B\left(x\right)={b}^{x},b>0,$ will be derived later.)

#### Derivative of the Natural Exponential Function

Let $E\left(x\right)={e}^{x}$ be the natural exponential function. Then

In general,

### Example 3.74

#### Derivative of an Exponential Function

Find the derivative of $f\left(x\right)={e}^{\text{tan}(2x)}.$

### Example 3.75

#### Combining Differentiation Rules

Find the derivative of $y=\frac{{e}^{{x}^{2}}}{x}.$

Find the derivative of $h\left(x\right)=x{e}^{2x}.$

### Example 3.76

#### Applying the Natural Exponential Function

A colony of mosquitoes has an initial population of 1000. After $t$ days, the population is given by $A\left(t\right)=1000{e}^{0.3t}.$ Show that the ratio of the rate of change of the population, ${A}^{\prime}\left(t\right),$ to the population, $A\left(t\right)$ is constant.

If $A\left(t\right)=1000{e}^{0.3t}$ describes the mosquito population after $t$ days, as in the preceding example, what is the rate of change of $A\left(t\right)$ after 4 days?

### Derivative of the Logarithmic Function

Now that we have the derivative of the natural exponential function, we can use implicit differentiation to find the derivative of its inverse, the natural logarithmic function.

#### The Derivative of the Natural Logarithmic Function

If $x>0$ and $y=\text{ln}\phantom{\rule{0.1em}{0ex}}x,$ then

More generally, let $g\left(x\right)$ be a differentiable function. For all values of $x$ for which ${g}^{\prime}\left(x\right)>0,$ the derivative of $h\left(x\right)=\text{ln}\phantom{\rule{0.1em}{0ex}}\left(g\left(x\right)\right)$ is given by

#### Proof

If $x>0$ and $y=\text{ln}\phantom{\rule{0.1em}{0ex}}x,$ then ${e}^{y}=x.$ Differentiating both sides of this equation results in the equation

Solving for $\frac{dy}{dx}$ yields

Finally, we substitute $x={e}^{y}$ to obtain

We may also derive this result by applying the inverse function theorem, as follows. Since $y=g(x)=\text{ln}\phantom{\rule{0.1em}{0ex}}x$ is the inverse of $f\left(x\right)={e}^{x},$ by applying the inverse function theorem we have

Using this result and applying the chain rule to $h\left(x\right)=\text{ln}\phantom{\rule{0.1em}{0ex}}\left(g\left(x\right)\right)$ yields

□

The graph of $y=\text{ln}\phantom{\rule{0.1em}{0ex}}x$ and its derivative $\frac{dy}{dx}=\frac{1}{x}$ are shown in Figure 3.35.

### Example 3.77

#### Taking a Derivative of a Natural Logarithm

Find the derivative of $f\left(x\right)=\text{ln}\phantom{\rule{0.1em}{0ex}}\left({x}^{3}+3x-4\right).$

### Example 3.78

#### Using Properties of Logarithms in a Derivative

Find the derivative of $f\left(x\right)=\text{ln}\phantom{\rule{0.1em}{0ex}}\left(\frac{{x}^{2}\text{sin}\phantom{\rule{0.1em}{0ex}}x}{2x+1}\right).$

### Checkpoint 3.52

Differentiate: $f\left(x\right)=\text{ln}{\left(3x+2\right)}^{5}.$

Now that we can differentiate the natural logarithmic function, we can use this result to find the derivatives of $y=lo{g}_{b}x$ and $y={b}^{x}$ for $b>0,b\ne 1.$

### Theorem 3.16

#### Derivatives of General Exponential and Logarithmic Functions

Let $b>0,b\ne 1,$ and let $g\left(x\right)$ be a differentiable function.

- If, $y={\text{log}}_{b}x,$ then

$$\frac{dy}{dx}=\frac{1}{x\phantom{\rule{0.1em}{0ex}}\text{ln}\phantom{\rule{0.1em}{0ex}}b}.$$3.32

More generally, if $h\left(x\right)={\text{log}}_{b}\left(g\left(x\right)\right),$ then for all values of*x*for which $g\left(x\right)>0,$

$${h}^{\prime}\left(x\right)=\frac{{g}^{\prime}\left(x\right)}{g\left(x\right)\phantom{\rule{0.1em}{0ex}}\text{ln}\phantom{\rule{0.1em}{0ex}}b}.$$3.33 - If $y={b}^{x},$ then

$$\frac{dy}{dx}={b}^{x}\text{ln}\phantom{\rule{0.1em}{0ex}}b.$$3.34

More generally, if $h\left(x\right)={b}^{g(x)},$ then

$${h}^{\prime}\left(x\right)={b}^{g(x)}g\text{\u2032}\left(x\right)\phantom{\rule{0.1em}{0ex}}\text{ln}\phantom{\rule{0.1em}{0ex}}b.$$3.35

#### Proof

If $y={\text{log}}_{b}x,$ then ${b}^{y}=x.$ It follows that $\text{ln}\phantom{\rule{0.1em}{0ex}}\left({b}^{y}\right)=\text{ln}\phantom{\rule{0.2em}{0ex}}x.$ Thus $y\phantom{\rule{0.2em}{0ex}}\text{ln}\phantom{\rule{0.2em}{0ex}}b=\text{ln}\phantom{\rule{0.2em}{0ex}}x.$ Solving for $y,$ we have $y=\frac{\text{ln}\phantom{\rule{0.1em}{0ex}}x}{\text{ln}\phantom{\rule{0.1em}{0ex}}b}.$ Differentiating and keeping in mind that $\text{ln}\phantom{\rule{0.1em}{0ex}}b$ is a constant, we see that

The derivative in Equation 3.33 now follows from the chain rule.

If $y={b}^{x},$ then $\text{ln}\phantom{\rule{0.2em}{0ex}}y=x\phantom{\rule{0.1em}{0ex}}\text{ln}\phantom{\rule{0.1em}{0ex}}b.$ Using implicit differentiation, again keeping in mind that $\text{ln}\phantom{\rule{0.1em}{0ex}}b$ is constant, it follows that $\frac{1}{y}\phantom{\rule{0.2em}{0ex}}\frac{dy}{dx}=\text{ln}\phantom{\rule{0.1em}{0ex}}b.$ Solving for $\frac{dy}{dx}$ and substituting $y={b}^{x},$ we see that

The more general derivative (Equation 3.35) follows from the chain rule.

□

### Example 3.79

#### Applying Derivative Formulas

Find the derivative of $h\left(x\right)=\frac{{3}^{x}}{{3}^{x}+2}.$

### Example 3.80

#### Finding the Slope of a Tangent Line

Find the slope of the line tangent to the graph of $y={\text{log}}_{2}\left(3x+1\right)$ at $x=1.$

### Checkpoint 3.53

Find the slope for the line tangent to $y={3}^{x}$ at $x=2.$

### Logarithmic Differentiation

At this point, we can take derivatives of functions of the form $y={\left(g\left(x\right)\right)}^{n}$ for certain values of $n,$ as well as functions of the form $y={b}^{g(x)},$ where $b>0$ and $b\ne 1.$ Unfortunately, we still do not know the derivatives of functions such as $y={x}^{x}$ or $y={x}^{\pi}.$ These functions require a technique called logarithmic differentiation, which allows us to differentiate any function of the form $h\left(x\right)=g{\left(x\right)}^{f(x)}.$ It can also be used to convert a very complex differentiation problem into a simpler one, such as finding the derivative of $y=\frac{x\sqrt{2x+1}}{{e}^{x}{\text{sin}}^{3}x}.$ We outline this technique in the following problem-solving strategy.

- To differentiate $y=h\left(x\right)$ using logarithmic differentiation, take the natural logarithm of both sides of the equation to obtain $\text{ln}\phantom{\rule{0.2em}{0ex}}y=\text{ln}\phantom{\rule{0.1em}{0ex}}\left(h\left(x\right)\right).$
- Use properties of logarithms to expand $\text{ln}\phantom{\rule{0.1em}{0ex}}\left(h\left(x\right)\right)$ as much as possible.
- Differentiate both sides of the equation. On the left we will have $\frac{1}{y}\phantom{\rule{0.2em}{0ex}}\frac{dy}{dx}.$
- Multiply both sides of the equation by $y$ to solve for $\frac{dy}{dx}.$
- Replace $y$ by $h\left(x\right).$

### Example 3.81

#### Using Logarithmic Differentiation

Find the derivative of $y={\left(2{x}^{4}+1\right)}^{\text{tan}\phantom{\rule{0.1em}{0ex}}x}.$

### Example 3.82

#### Using Logarithmic Differentiation

Find the derivative of $y=\frac{x\sqrt{2x+1}}{{e}^{x}{\text{sin}}^{3}x}.$

### Example 3.83

#### Extending the Power Rule

Find the derivative of $y={x}^{r}$ where $r$ is an arbitrary real number.

Use logarithmic differentiation to find the derivative of $y={x}^{x}.$

Find the derivative of $y={\left(\text{tan}\phantom{\rule{0.1em}{0ex}}x\right)}^{\pi}.$

### Section 3.9 Exercises

For the following exercises, find ${f}^{\prime}\left(x\right)$ for each function.

$f\left(x\right)=\frac{{e}^{\text{\u2212}x}}{x}$

$f\left(x\right)=\sqrt{{e}^{2x}+2x}$

$f\left(x\right)=\frac{{10}^{x}}{\text{ln}\phantom{\rule{0.1em}{0ex}}10}$

$f\left(x\right)={3}^{\text{sin}\phantom{\rule{0.1em}{0ex}}3\text{x}}$

$f\left(x\right)=\text{ln}\phantom{\rule{0.1em}{0ex}}\left(4{x}^{3}+x\right)$

$f\left(x\right)={x}^{2}\text{ln}\phantom{\rule{0.1em}{0ex}}9x$

$f\left(x\right)=\text{log}\phantom{\rule{0.1em}{0ex}}\left(\text{sec}\phantom{\rule{0.1em}{0ex}}x\right)$

$f\left(x\right)={\text{log}}_{7}{\left(6{x}^{4}+3\right)}^{5}$

For the following exercises, use logarithmic differentiation to find $\frac{dy}{dx}.$

$y={x}^{\sqrt{x}}$

$y={\left(\text{ln}\phantom{\rule{0.1em}{0ex}}x\right)}^{\text{ln}\phantom{\rule{0.1em}{0ex}}x}$

$y={\left({x}^{2}-1\right)}^{\text{ln}\phantom{\rule{0.1em}{0ex}}x}$

$y=\frac{x+11}{\sqrt[3]{{x}^{2}-4}}$

**[T]** Find an equation of the tangent line to the graph of $f\left(x\right)=4x{e}^{\left({x}^{2}-1\right)}$ at the point where

$x=\mathrm{-1}.$ Graph both the function and the tangent line.

**[T]** Find the equation of the line that is normal to the graph of $f\left(x\right)=x\xb7{5}^{x}$ at the point where $x=1.$ Graph both the function and the normal line.

**[T]** Find the equation of the tangent line to the graph of ${x}^{3}-x\phantom{\rule{0.1em}{0ex}}\text{ln}\phantom{\rule{0.1em}{0ex}}y+{y}^{3}=2x+5$ at the point where $x=2.$ (*Hint*: Use implicit differentiation to find $\frac{dy}{dx}.)$ Graph both the curve and the tangent line.

Consider the function $y={x}^{1\text{/}x}$ for $x>0.$

- Determine the points on the graph where the tangent line is horizontal.
- Determine the points on the graph where ${y}^{\prime}>0$ and those where ${y}^{\prime}<0.$

The formula $I\left(t\right)=\frac{\text{sin}\phantom{\rule{0.1em}{0ex}}t}{{e}^{t}}$ is the formula for a decaying alternating current.

- Complete the following table with the appropriate values.

$t$ $\frac{\text{sin}\phantom{\rule{0.1em}{0ex}}t}{{e}^{t}}$ 0 (i) $\frac{\pi}{2}$ (ii) $\pi $ (iii) $\frac{3\pi}{2}$ (iv) $2\pi $ (v) $\frac{5\pi}{2}$ (vi) $3\pi $ (vii) $\frac{7\pi}{2}$ (viii) $4\pi $ (ix) - Using only the values in the table, determine where the tangent line to the graph of $I\left(t\right)$ is horizontal.

**[T]** The population of Toledo, Ohio, in 2000 was approximately 500,000. Assume the population is increasing at a rate of 5% per year.

- Write the exponential function that relates the total population as a function of $t.$
- Use a. to determine the rate at which the population is increasing in $t$ years.
- Use b. to determine the rate at which the population is increasing in 10 years.

**[T]** An isotope of the element erbium has a half-life of approximately 12 hours. Initially there are 9 grams of the isotope present.

- Write the exponential function that relates the amount of substance remaining as a function of $t,$ measured in hours.
- Use a. to determine the rate at which the substance is decaying in $t$ hours.
- Use b. to determine the rate of decay at $t=4$ hours.

**[T]** The number of cases of influenza in New York City from the beginning of 1960 to the beginning of 1961 is modeled by the function

$N\left(t\right)=5.3{e}^{0.093{t}^{2}-0.87t},(0\le t\le 4),$
where $N\left(t\right)$ gives the number of cases (in thousands) and *t* is measured in years, with $t=0$ corresponding to the beginning of 1960.

- Show work that evaluates $N\left(0\right)$ and $N\left(4\right).$ Briefly describe what these values indicate about the disease in New York City.
- Show work that evaluates ${N}^{\prime}\left(0\right)$ and ${N}^{\prime}\left(3\right).$ Briefly describe what these values indicate about the disease in New York City.

**[T]** The *relative rate of change* of a differentiable function $y=f\left(x\right)$ is given by $\frac{100\xb7{f}^{\prime}\left(x\right)}{f\left(x\right)}\text{\%}.$ One model for population growth is a Gompertz growth function, given by $P\left(x\right)=a{e}^{\text{\u2212}b\xb7{e}^{\text{\u2212}cx}}$ where $a,b,$ and $c$ are constants.

- Find the relative rate of change formula for the generic Gompertz function.
- Use a. to find the relative rate of change of a population in $x=20$ months when $a=204,b=0.0198,$ and $c=0.15.$
- Briefly interpret what the result of b. means.

For the following exercises, use the population of New York City from 1790 to 1860, given in the following table.

Years since 1790 | Population |
---|---|

0 | 33,131 |

10 | 60,515 |

20 | 96,373 |

30 | 123,706 |

40 | 202,300 |

50 | 312,710 |

60 | 515,547 |

70 | 813,669 |

**[T]** Using a computer program or a calculator, fit a growth curve to the data of the form $p=a{b}^{t}.$

**[T]** Using the exponential best fit for the data, write a table containing the derivatives evaluated at each year.

**[T]** Using the exponential best fit for the data, write a table containing the second derivatives evaluated at each year.

**[T]** Using the tables of first and second derivatives and the best fit, answer the following questions:

- Will the model be accurate in predicting the future population of New York City? Why or why not?
- Estimate the population in 2010. Was the prediction correct from a.?