The natural exponential as the function that is its own derivative and why that singles out e, the natural logarithm's derivative by implicit differentiation, general bases and their stray logarithm factor, logarithmic differentiation for awkward products and powers, and the completed proof of the power rule for every real exponent.
Subject: Calculus I · 69 slides · symbolic lesson
Open the interactive version of this deck
Title
Calculus I · Section 3.9
Why e, why one over x, and how logarithms tame the hardest derivatives
Objectives
The power rule handles a variable raised to a fixed power. This lesson handles the reverse, a fixed number raised to a variable power, and then its inverse, the logarithm.
OpenStax Calculus Volume 1, §3.9 Derivatives of Exponential and Logarithmic Functions §3.9, pp. 275-286 — learning objectives 3.9.1 to 3.9.3
Every rule you have so far treats the variable as a base: x squared, x cubed, x to the one half. The functions in this section turn that around. In 2 to the x, the base is fixed and the variable sits in the exponent, and none of your current rules can touch it.
The lesson has one surprising centre. Among all exponential functions there is exactly one whose derivative is itself, and its base is the number e. Once you have that, everything else follows from tools you already own: implicit differentiation gives the logarithm, rewriting in base e gives every other base, and the chain rule does the rest.
The final payoff is a technique, logarithmic differentiation, that differentiates functions such as x to the x, which nothing else can, and that finally proves the power rule for every real exponent.
Warm-up
Discussion prompt
Two tools from precalculus carry this whole lesson. First, use the laws of logarithms to expand ln( x² sin x / (2x + 1) ) into a sum and difference of simpler logarithms. Second, write the number 2 as a power of e.
Write both answers before revealing. These are precalculus facts, but this lesson leans on them so heavily that a shaky law of logarithms will cost you more marks here than any new calculus.
The three laws all say the same thing: a logarithm lowers each operation by one level. A product inside becomes a sum outside, a quotient becomes a difference, and a power becomes a multiple. There is no law for a logarithm of a sum, and you will meet that trap later in the lesson.
The second fact, that 2 is e raised to the natural log of 2, looks like a curiosity. It is actually the key that unlocks every exponential with a base other than e, so keep it in view.
Section
Part 1
Concept
A rational power is built from whole-number powers and roots. An irrational power such as 4 to the pi has no such recipe, so the book assumes the exponential is continuous and defines it as a limit over rational exponents.
\[ 4^{3} < 4^{\pi} < 4^{4}, \quad 4^{3.1} < 4^{\pi} < 4^{3.2}, \quad 4^{3.14} < 4^{\pi} < 4^{3.15} \]
Figure (svg): The curve y equals 4 to the x for x from 3 to 3.24, with dots at x equal to 3, 3.1 and 3.14 below and 3.142, 3.15 and 3.2 above, closing in on a dashed vertical line at pi and a dashed horizontal line at 77.88.
| x below π | 4ˣ | x above π | 4ˣ |
|---|---|---|---|
| 3.14 | 77.7084726013 | 3.142 | 77.9242251944 |
| 3.1415 | 77.8702309526 | 3.1416 | 77.8810268071 |
| 3.14159 | 77.8799471543 | 3.141593 | 77.8802710486 |
OpenStax Calculus Volume 1, §3.9 Derivatives of Exponential and Logarithmic Functions §3.9, p. 276 — Table 3.6
You know what 4 cubed means: three fours multiplied. You know what 4 to the one half means: a square root. And 4 to the 3.14 is a hundredth root of 4 raised to the 314th power, clumsy but meaningful. What you have never been told is what 4 to the pi means, because pi is not a fraction.
The book's answer is continuity. Squeeze pi between rational numbers from below and above, compute 4 to each of them, and the results squeeze together too. Look at the figure: the orange dots approach from below, the pink ones from above, and both close in on one height, about 77.88. That height is what 4 to the pi means.
This is an assumption the course makes without proof, along with two more on the next slides. Accepting them lets you get to the calculus quickly; the proofs belong to a course in analysis.
Concept
Assume only that the exponential with base b has a slope at zero, called B′(0). Then the limit definition gives its slope everywhere.
\[ B'(x) = \lim_{h\to 0}\frac{b^{x+h} - b^{x}}{h} \]
\[ = \lim_{h\to 0}\frac{b^{x}b^{h} - b^{x}}{h} \]
\[ = \lim_{h\to 0}\frac{b^{x}\left(b^{h} - 1\right)}{h} \]
\[ = b^{x}\lim_{h\to 0}\frac{b^{h} - 1}{h} = b^{x}\,B'(0) \]
The factor b to the x does not depend on h, so it walks out of the limit. What remains is the slope at zero, a single number.
OpenStax Calculus Volume 1, §3.9 Derivatives of Exponential and Logarithmic Functions §3.9, p. 278 — equations 3.28 and 3.29
This derivation is short and worth being able to reproduce. Start from the limit definition, use the exponent law that splits b to the x plus h into two factors, and factor out b to the x. Because that factor does not involve h, it can leave the limit.
What stays inside the limit is the slope of the exponential at zero. So the slope at any point x is the height at x multiplied by one fixed number, the slope at zero. That is a remarkable statement: to know how steep the curve is anywhere, you only need to measure it once.
Notice the single assumption used: that the slope at zero exists. The book assumes it rather than proving it. Everything that follows about exponentials rests on this one line of algebra.
Notation
Annotate
On: \( B'(x) = b^{x}\cdot B'(0), \qquad B'(0) = \lim_{h\to 0}\frac{b^{h}-1}{h} \)
Step through the annotations and connect each to the graph of an exponential. The height factor explains why exponential curves get steeper as they rise: when the height doubles, so does the slope. That is the whole character of exponential growth in one factor.
The constant factor is the part still unknown. It depends only on the base, so each exponential has its own. For base 2 it is some number, for base 3 another, and the next few slides measure a few of them.
Keep the question in mind: is there a base that makes the constant exactly one? If so, that exponential would be its own derivative, and its derivative formula would need no constant at all.
Picture it
Figure (svg): The curves 2 to the x, 2.7 to the x and 3 to the x, all passing through the point (0, 1), with a dashed line y equals 1 plus x through the same point. Near zero 2 to the x is flatter than the line, 3 to the x steeper, and 2.7 to the x almost on it.
All of them pass through (0, 1) because any base to the zero is one. What differs is the slope there, and by equation 3.29 that one slope fixes the slope everywhere else.
OpenStax Calculus Volume 1, §3.9 Derivatives of Exponential and Logarithmic Functions §3.9, p. 277 — Figure 3.33
Every exponential passes through the point (0, 1), because any positive number to the zero power is one. The curves differ only in how steeply they cross that point, and by the previous slide that single slope controls the whole curve.
Compare each curve with the dashed line, which has slope exactly one. The base-2 curve crosses the point more gently than the line, with slope about 0.69. The base-3 curve crosses more steeply, about 1.10. The base 2.7 curve is almost on the line, with slope about 0.99.
So the base that gives slope exactly one lies between 2.7 and 3, and very close to 2.7. The next slides pin it down.
Estimation
\[ B(x) = 2^{x}, \qquad B'(0) \approx \frac{2^{0.00001} - 1}{0.00001} \]
Predict first
Estimate before computing: what is the slope of y = 2ˣ at x = 0?
Correct: About 0.69
Why: The quotient (2^0.00001 − 1)/0.00001 is 0.693150, and with h = −0.00001 it is 0.693145, so the slope is about 0.6931. It is less than 1: the curve 2ˣ crosses the line y = 1 + x from below at zero. The number is ln 2, as Part 3 will show.
Pick an answer before revealing. A difference quotient with a tiny step is a good estimate of a slope, and here it gives about 0.6931.
The main thing to notice is that it is less than one. The base-2 curve is flatter at zero than the line y equals x plus 1. So the derivative of 2 to the x is not 2 to the x itself; it is 2 to the x multiplied by about 0.693.
If 0.6931 looks familiar, it should: it is the natural logarithm of 2. That is not a coincidence, and Part 3 will prove it.
Worked example
Find the base whose slope at zero is exactly one, to four decimal places.
Approximate the slope by a difference quotient
Why: For tiny h the quotient is close to its limit.
\[ B'(0) = \lim_{h\to 0}\frac{b^{h} - 1}{h} \approx \frac{b^{h}-1}{h} \]
Bracket it with h on each side of zero
Why: The quotient increases with h, so the value at zero lies between the two.
\[ \frac{b^{-0.00001}-1}{-0.00001} < B'(0) < \frac{b^{0.00001}-1}{0.00001} \]
Try b equal to 2.7182
Why: Both ends of the bracket are below one.
\[ b = 2.7182: \quad 0.999965 < B'(0) < 0.999975 \]
Try b equal to 2.7183
Why: Both ends are above one.
\[ b = 2.7183: \quad 1.000002 < B'(0) < 1.000012 \]
Conclude
Why: The slope grows with the base, so the base with slope one lies between the two.
\[ 2.7182 < e < 2.7183 \]
Figure (svg): Three curves showing the difference quotient b to the h minus 1, over h, for h from minus 1 to 1 and bases 2, e and 3. Each curve has a hole at h equal to 0, marked by a hollow dot at heights 0.69, 1 and 1.10; a dashed line marks height 1.
Check against the known value and a third base
Why: The true value of e lies in the bracket; and for base 2 the table's bracket contains 0.693147, the natural log of 2, which Part 3 predicts.
\[ e = 2.718281828\ldots, \qquad 0.693145 < \ln 2 = 0.693147 < 0.693150 \]
OpenStax Calculus Volume 1, §3.9 Derivatives of Exponential and Logarithmic Functions §3.9, p. 277 — Table 3.7
The difference quotient on the right uses a positive step, the one on the left a negative step. For an exponential the quotient increases as the step increases, which is why the true slope at zero sits between them. The book's table gives these brackets for ten bases.
Look at the two rows that matter. For 2.7182 both ends of the bracket are below one, so its slope at zero is below one. For 2.7183 both ends are above one. Since a larger base gives a steeper curve, the base with slope exactly one must lie between them. That base is e.
The figure shows the same idea as curves. Each curve is the difference quotient for one base as a function of the step h. It has a hole at zero, where the formula breaks down, but the curve is clearly heading for a definite height there. For base e that height is exactly one.
Tweak it
Parameter explorer
The graph shows the gap between bˣ and the line 1 + x. Slide b. For which base does the gap touch zero at x = 0 without crossing it?
\[ y = ({b})^{x} - (1 + x) \]
Start with the base at 2 and move it slowly upward. The graph is the gap between the exponential and the line 1 plus x. Where the gap is positive the curve is above the line; where it is negative the curve is below.
For small bases the gap dips below zero just to the right of the origin, because the curve is too flat there and the line overtakes it. For large bases it dips below just to the left. Near 2.72 the dip disappears and the gap only touches zero at the origin, flat. That means the line is tangent to the exponential at zero, with slope exactly one.
You have just located e by eye to about two decimal places. The book's table did the same thing numerically to four.
Concept
the number e — The unique base for which the exponential's slope at zero is exactly 1. Its natural exponential is E(x) = eˣ; its inverse is the natural logarithm, ln x.
\[ E'(0) = 1 \;\Longrightarrow\; E'(x) = e^{x}\cdot 1 = e^{x} \]
Figure (svg): The curve y equals e to the x with tangent lines at x equal to minus 1, 0 and 1. At each point the tangent's slope equals the point's height: 0.37, 1 and 2.72.
\[ \frac{d}{dx}\left(e^{g(x)}\right) = e^{g(x)}\,g'(x) \]
OpenStax Calculus Volume 1, §3.9 Derivatives of Exponential and Logarithmic Functions §3.9, p. 278 — Theorem 3.14 and Figure 3.34
The definition of e is the property you just found: the base whose slope at zero is one. Put that into equation 3.29 and the constant disappears. The derivative of e to the x is e to the x times one, which is e to the x.
The figure shows what that means geometrically. Pick any point on the curve. Its height and the slope of the tangent there are the same number: 0.37 at x equal to minus 1, exactly 1 at zero, and 2.72 at x equal to 1. No other curve through (0, 1) has that property.
The second formula is the one you will use most. When the exponent is itself a function of x, the chain rule multiplies by the exponent's derivative. The exponential factor is copied unchanged, which makes these derivatives unusually quick.
Counterexample
Discussion prompt
Someone claims that e to the x is the only function whose derivative equals itself. Break the claim with two different functions, and check each one.
Try to find your own examples before revealing. The claim in the question sounds right because e to the x is the famous one, but it is too strong.
Multiply e to the x by any constant and the constant simply rides along through the derivative, so five times e to the x is also its own derivative. The zero function is its own derivative too, which is the case where the constant is zero.
The accurate statement is that the constant multiples of e to the x are the only functions equal to their own derivatives. That is why exponentials appear in every model where a quantity grows or shrinks at a rate proportional to itself: populations, radioactive decay, and continuously compounded interest.
Notation
Annotate
On: \( \frac{d}{dx}\left(e^{g(x)}\right) = e^{g(x)}\cdot g'(x) \)
Work through the annotations. The first two make the same point from different angles: the exponential copies itself. When you differentiate e to the anything, the first thing you write is e to exactly the same thing, with nothing lowered and nothing subtracted from the exponent.
The only new ingredient is the inner derivative, the rate at which the exponent changes. If the exponent is a constant times x, the inner derivative is that constant, and you get the growth law: the rate of change is a fixed multiple of the amount.
A good habit is to write the copied exponential first, then ask what the exponent's derivative is, and multiply. The next three examples all follow that order.
Worked example
\[ f(x) = e^{\tan(2x)} \]
Apply Theorem 3.14 with the chain rule
Why: The exponent is the inner function, g of x equal to tan 2x.
\[ f'(x) = e^{\tan(2x)}\cdot\frac{d}{dx}\left(\tan(2x)\right) \]
Differentiate the tangent
Why: Another chain: the derivative of tan u is sec squared u, times the derivative of 2x.
\[ \frac{d}{dx}\left(\tan(2x)\right) = \sec^{2}(2x)\cdot 2 \]
Assemble
Why: Put the constant first.
\[ f'(x) = 2\sec^{2}(2x)\,e^{\tan(2x)} \]
Check at x equal to 0
Why: The formula gives 2 times 1 times 1; a difference quotient with step 0.001 gives the same value to eight places.
\[ f'(0) = 2\cdot 1\cdot e^{0} = 2, \qquad \frac{f(0.001) - f(-0.001)}{0.002} \approx 2.0000 \]
OpenStax Calculus Volume 1, §3.9 Derivatives of Exponential and Logarithmic Functions §3.9, pp. 278-279 — Example 3.74
Follow the order from the notation slide. Copy the exponential exactly, with tan 2x still in the exponent, and then multiply by the derivative of that exponent.
The exponent's derivative needs its own chain rule. The derivative of tan u is sec squared u, and the inner function 2x contributes a factor of 2. So this example uses the chain rule twice, once for the exponential and once for the tangent.
The check at zero is quick because tan 0 is 0 and sec 0 is 1, so the formula gives 2. A symmetric difference quotient on the original function gives 2 as well. Whenever you can, check at a point where the trigonometry is easy.
Worked example
\[ y = \frac{e^{x^{2}}}{x} \]
Differentiate the numerator
Why: Theorem 3.14 with the inner function x squared.
\[ \frac{d}{dx}\left(e^{x^{2}}\right) = e^{x^{2}}\cdot 2x \]
Apply the quotient rule
Why: Bottom times derivative of top, minus top times derivative of bottom, over bottom squared.
\[ y' = \frac{\left(2xe^{x^{2}}\right)x - e^{x^{2}}\cdot 1}{x^{2}} \]
Factor out the exponential
Why: Both terms of the numerator share it.
\[ y' = \frac{e^{x^{2}}\left(2x^{2} - 1\right)}{x^{2}} \]
Figure (svg): The curve y equals e to the x squared, over x, for x from 0.25 to 1.8. It falls to a low point at x equal to one over root 2, height 2.33, where a short dashed tangent is horizontal, then rises; the tangent at x equal to 1 has slope e.
Check at two points
Why: At x equal to 1 the formula gives e, matching a numerical slope of 2.71828; and it is zero where 2x squared equals 1, at the low point of the graph.
\[ y'(1) = \frac{e(2-1)}{1} = e \approx 2.71828, \qquad y'\left(\tfrac{1}{\sqrt2}\right) = 0 \]
OpenStax Calculus Volume 1, §3.9 Derivatives of Exponential and Logarithmic Functions §3.9, p. 279 — Example 3.75
This combines three rules: the quotient rule for the division, Theorem 3.14 for the exponential, and the chain rule for the x squared in its exponent. Do the exponential's derivative first, on its own, so that the quotient rule line is not cluttered.
After the quotient rule, both terms of the numerator contain e to the x squared. Factoring it out leaves 2x squared minus 1, which tells you at once where the derivative is zero: where x squared is one half, at x equal to one over root 2.
Look at the figure. The curve has its lowest point exactly there, with a horizontal tangent, and at x equal to 1 its tangent has slope e. A formula that predicts both features correctly is very unlikely to be wrong.
Worked example
\[ h(x) = xe^{2x} \]
Apply the product rule
Why: The second factor needs the chain rule, giving a factor of 2.
\[ h'(x) = 1\cdot e^{2x} + x\cdot e^{2x}\cdot 2 \]
Factor out the exponential
Why: It is common to both terms.
\[ h'(x) = e^{2x}(1 + 2x) \]
Check at x equal to 1
Why: The formula gives 3 e squared; a difference quotient agrees to eight places.
\[ h'(1) = 3e^{2} \approx 22.1672 \quad\text{(numerical: 22.1672)} \]
OpenStax Calculus Volume 1, §3.9 Derivatives of Exponential and Logarithmic Functions §3.9, p. 279 — Checkpoint 3.50
The product rule gives two terms, and the second needs the chain rule, which produces the factor of 2. Forgetting that factor is the most common slip here.
Factoring out the exponential makes the answer much more useful. The exponential is never zero, so the derivative is zero only where 1 plus 2x is zero, at x equal to minus one half. That is where the function has its minimum.
The numerical check at x equal to 1 compares the formula, 3 e squared, with a difference quotient. They agree to many decimal places, which is strong evidence that nothing went wrong along the way.
Worked example
A colony starts with 1000 mosquitoes. Show that the rate of change divided by the population is constant.
\[ A(t) = 1000e^{0.3t} \]
Differentiate with the chain rule
Why: The inner function is 0.3t, with derivative 0.3.
\[ A'(t) = 1000e^{0.3t}\cdot 0.3 \]
Simplify
Why: Multiply the constants.
\[ A'(t) = 300e^{0.3t} \]
Form the ratio
Why: Divide the rate by the population.
\[ \frac{A'(t)}{A(t)} = \frac{300e^{0.3t}}{1000e^{0.3t}} \]
Cancel the exponentials
Why: They are equal and never zero.
\[ \frac{A'(t)}{A(t)} = 0.3 \]
Figure (svg): The population curve A of t equals 1000 e to the 0.3 t for t from 0 to 8 days, rising from 1000 to about 11000, with a tangent line at t equal to 4 where the population is 3320 and the slope is 996 mosquitoes per day.
Check on day 4
Why: Compute both numbers separately and divide.
\[ A(4) = 1000e^{1.2} \approx 3320.12, \quad A'(4) = 300e^{1.2} \approx 996.04, \quad \frac{996.04}{3320.12} = 0.300 \]
OpenStax Calculus Volume 1, §3.9 Derivatives of Exponential and Logarithmic Functions §3.9, p. 279 — Example 3.76
The derivative is a one-step chain rule: copy the exponential and multiply by 0.3. The interesting part is what happens when you divide the rate by the population.
The exponentials cancel, leaving 0.3 at every moment. That constant is called the relative growth rate. In words: every day, the colony is growing at a rate equal to thirty percent of its current size. That is the defining property of exponential growth, and it is the same fact as the derivative of e to the x being itself.
The figure makes it concrete on day 4. The population is about 3320, the tangent's slope is about 996 per day, and 996 is thirty percent of 3320. Try another day and the ratio will be the same.
Estimation
\[ A(t) = 1000e^{0.3t}, \qquad A'(4) = ? \]
Predict first
Without a calculator, roughly how fast is the population growing on day 4?
Correct: About 1,000 per day
Why: A′(4) = 300e^1.2, and e^1.2 is a bit over 3.3, so the rate is about 996 mosquitoes per day. 300 is the rate at t = 0; 3,300 is the population itself, not its rate; the rate is always 0.3 times the population.
\[ A'(4) = 300e^{1.2} \approx 996.04 \text{ mosquitoes per day} \]
OpenStax Calculus Volume 1, §3.9 Derivatives of Exponential and Logarithmic Functions §3.9, p. 279 — Checkpoint 3.51
Commit to an estimate first. You do not need a calculator to rule out three of the options, only the relationship from the last slide: the rate is always 0.3 times the population.
On day 4 the population is about 3320, so the rate is about 0.3 times that, roughly 1000 per day. The exact value is 300 times e to the 1.2, about 996 mosquitoes per day.
If you picked about 3300, you gave the population, not its rate of change. If you picked 300, you gave the rate at time zero; the rate grows as the colony grows.
Section
Part 2
Concept
Undo the logarithm, then differentiate the equation that remains, exactly as in Section 3.8.
\[ y = \ln x \quad\iff\quad e^{y} = x \qquad (x > 0) \]
\[ e^{y}\frac{dy}{dx} = 1 \]
\[ \frac{dy}{dx} = \frac{1}{e^{y}} \]
\[ \frac{dy}{dx} = \frac{1}{x} \]
The last line substitutes the original equation: e to the y is x. The answer contains no logarithm at all.
OpenStax Calculus Volume 1, §3.9 Derivatives of Exponential and Logarithmic Functions §3.9, pp. 279-280 — Theorem 3.15 and its proof
This is Section 3.8's method applied to the equation that defines the logarithm. You cannot differentiate ln x from its definition yet, but you can rewrite y equals ln x as e to the y equals x, and you know how to differentiate e to the y with respect to x: it is e to the y times dy by dx.
Solve for dy by dx and you get one over e to the y. The final move is the one that makes this derivation beautiful. By the equation you started with, e to the y is x, so the derivative is one over x.
A function built from e, with a transcendental definition, has the simplest possible algebraic derivative. That is one reason the natural logarithm keeps appearing in calculus: it is the antiderivative of one over x, which you will need constantly in Chapter 5.
Picture it
Figure (svg): The curves y equals e to the x and y equals ln x, reflections of each other across the dashed line y equals x. The point (1, e) on the exponential has a tangent of slope e; its mirror point (e, 1) on the logarithm has a tangent of slope one over e.
The logarithm is the exponential reflected in the line y equals x. Reflection swaps rise with run, so where the exponential has slope e, at the point (1, e), the logarithm has slope one over e, at the mirror point (e, 1).
The logarithm is the inverse of the exponential, so its graph is the exponential's graph reflected in the dashed line y equals x. Reflection swaps the horizontal and vertical directions, which means it swaps rise and run.
Look at the two highlighted points. On the exponential, the point (1, e) has a tangent of slope e. Its mirror image on the logarithm is the point (e, 1), and the reflected tangent has slope one over e. A steep slope becomes a shallow one.
In general, if the exponential has slope m at a point, the logarithm has slope one over m at the mirror point. Since the exponential's slope equals its height, and that height is the logarithm's x-coordinate, the logarithm's slope is one over x.
Concept
Section 3.7's theorem says the derivative of an inverse is one over the derivative of the original, evaluated at the inverse.
\[ \frac{dy}{dx} = \frac{1}{f'\left(g(x)\right)} = \frac{1}{e^{\ln x}} = \frac{1}{x} \]
Then the chain rule extends it to a logarithm of any positive inner function g.
\[ h(x) = \ln\left(g(x)\right) \;\Longrightarrow\; h'(x) = \frac{1}{g(x)}\,g'(x) \]
OpenStax Calculus Volume 1, §3.9 Derivatives of Exponential and Logarithmic Functions §3.9, p. 280 — equation 3.31
This is the picture on the previous slide written as a formula. The inverse function theorem from Section 3.7 says the derivative of an inverse is the reciprocal of the original function's derivative, evaluated at the matching point.
The original function is e to the x, whose derivative is e to the x. Evaluated at ln x it gives e to the ln x, which is x. So the derivative of ln x is one over x, the same answer by a second route.
The chain rule then handles a logarithm of any inner function: one over the inside, times the derivative of the inside. That is equation 3.31, and it is the logarithm formula you will actually use most often.
Concept
Figure (svg): The curve y equals ln x, rising through (1, 0) ever more slowly, and its derivative y equals one over x, positive everywhere and falling toward zero. At x equal to 1 the logarithm's slope and the derivative's height are both 1.
\[ \frac{d}{dx}\ln x = \frac{1}{x} > 0 \quad\text{for all } x > 0 \]
A positive derivative on the whole domain means the logarithm always increases. A derivative that shrinks toward zero means it increases ever more slowly, yet it never levels off: it passes every height eventually.
OpenStax Calculus Volume 1, §3.9 Derivatives of Exponential and Logarithmic Functions §3.9, p. 280 — Figure 3.35
This is the book's Figure 3.35. The orange curve is the logarithm; the blue curve is its derivative, one over x. Read the blue curve as a report on the steepness of the orange one.
Near zero the blue curve is very high, and the logarithm is very steep, plunging down toward minus infinity. As x grows the blue curve falls toward zero, and the logarithm flattens. At x equal to 1 the logarithm crosses the axis with slope exactly 1, which the blue curve confirms with height 1.
One point surprises many students. A slope that tends to zero does not mean the function levels off. The logarithm passes every height eventually; it just takes longer and longer to climb each additional unit.
Concept
The logarithm needs a positive input, but one over x exists for negative x too. The logarithm of the absolute value fills that gap.
\[ x < 0: \quad \ln|x| = \ln(-x) \]
\[ \frac{d}{dx}\ln(-x) = \frac{1}{-x}\cdot(-1) = \frac{1}{x} \]
Figure (svg): The two branches of y equals ln of the absolute value of x, mirror images across the vertical axis. The tangent at x equal to 2 has slope one half; the tangent at x equal to minus 2 has slope minus one half. Both equal one over x.
\[ \frac{d}{dx}\ln|x| = \frac{1}{x} \quad\text{for every } x \ne 0 \]
The function one over x is perfectly defined for negative x, but ln x is not, so as it stands one over x has no logarithm partner on the negative side. The logarithm of the absolute value fixes this.
For negative x, the absolute value of x is minus x, so you are differentiating ln of minus x. The chain rule gives one over minus x, times the derivative of minus x, which is minus one. The two minus signs cancel and leave one over x.
The figure shows both branches. On the right the curve rises, with slope one half at x equal to 2. On the left it falls as x increases, with slope minus one half at x equal to minus 2, which is exactly one over minus 2. This extension matters in Chapter 5, where one over x must be integrated on both sides of zero.
Notation
Annotate
On: \( \frac{d}{dx}\ln\left(g(x)\right) = \frac{g'(x)}{g(x)}, \qquad g(x) > 0 \)
Read the formula as derivative over function. The top is the inner derivative; the bottom is the inner function itself. Together they measure how fast the inside changes compared with its own size, a relative rate of change.
That reading connects to the mosquitoes. There, A prime over A was the relative growth rate. Here you see that it is exactly the derivative of ln A. Logarithms turn relative rates into ordinary derivatives, which is why they appear in growth models and why logarithmic differentiation works.
The domain condition is easy to forget. The logarithm only exists where the inside is positive, so the formula is only valid there, even if the fraction on the right makes sense elsewhere.
Worked example
\[ f(x) = \ln\left(x^{3} + 3x - 4\right) \]
Name the inner function and its derivative
Why: The cubic is g of x.
\[ g(x) = x^{3} + 3x - 4, \qquad g'(x) = 3x^{2} + 3 \]
Apply equation 3.31
Why: Inner derivative over inner function.
\[ f'(x) = \frac{1}{x^{3}+3x-4}\cdot\left(3x^{2}+3\right) \]
Rewrite as one fraction
Why: Nothing cancels.
\[ f'(x) = \frac{3x^{2}+3}{x^{3}+3x-4} \]
Check at x equal to 2
Why: The cubic is 10 there and positive, so x equal to 2 is in the domain; a difference quotient agrees.
\[ f'(2) = \frac{12+3}{8+6-4} = \frac{15}{10} = 1.5 \quad\text{(numerical: 1.5000)} \]
OpenStax Calculus Volume 1, §3.9 Derivatives of Exponential and Logarithmic Functions §3.9, p. 280 — Example 3.77
This is equation 3.31 used directly. Name the inner function, differentiate it, and write inner derivative over inner function. There is no simplification to do, because the top and bottom share no factor.
It is worth thinking about the domain. The cubic is zero at x equal to 1 and increases everywhere, so it is positive only for x greater than 1. The function and its derivative only exist there.
The check at x equal to 2 is comfortably inside the domain. The formula gives 15 over 10, which is 1.5, and a difference quotient on the original logarithm gives the same.
Step zero
\[ f(x) = \ln\left(\frac{x^{2}\sin x}{2x+1}\right) \]
Discussion prompt
Example 3.78 asks for this derivative. Equation 3.31 applied directly would need the quotient rule and the product rule inside it. What should you do first, and why does it help?
Write your answer before revealing. The instinct is to apply equation 3.31 straight away, which would put a quotient rule, with a product rule nested inside it, into the numerator. That is a lot of algebra with plenty of room for error.
The better first move is to use the laws of logarithms. The product x squared times sin x becomes a sum, the power 2 comes down in front of ln x, and the division by 2x plus 1 becomes a subtraction.
After expanding, each piece is a simple logarithm that differentiates in one line. This idea, expand first and differentiate second, is the seed of logarithmic differentiation in Part 4.
Worked example
\[ f(x) = \ln\left(\frac{x^{2}\sin x}{2x+1}\right) \]
Apply the laws of logarithms
Why: Product becomes sum, quotient becomes difference, power becomes multiple.
\[ f(x) = 2\ln x + \ln(\sin x) - \ln(2x+1) \]
Differentiate the first term
Why: A constant times ln x.
\[ \frac{d}{dx}\left(2\ln x\right) = \frac{2}{x} \]
Differentiate the second term
Why: Equation 3.31 with g of x equal to sin x.
\[ \frac{d}{dx}\ln(\sin x) = \frac{\cos x}{\sin x} = \cot x \]
Differentiate the third term
Why: Equation 3.31 with g of x equal to 2x plus 1.
\[ \frac{d}{dx}\ln(2x+1) = \frac{2}{2x+1} \]
Combine
Why: Keep the minus sign from the quotient.
\[ f'(x) = \frac{2}{x} + \cot x - \frac{2}{2x+1} \]
Check at x equal to 1
Why: The formula gives 2 plus cot 1 minus two thirds; a difference quotient on the original, unexpanded function agrees.
\[ f'(1) = 2 + 0.642093 - 0.666667 = 1.975426 \quad\text{(numerical: 1.975426)} \]
OpenStax Calculus Volume 1, §3.9 Derivatives of Exponential and Logarithmic Functions §3.9, p. 281 — Example 3.78
Once the logarithm is expanded, the derivative is three separate one-line calculations. Two ln x gives two over x. The logarithm of sin x gives cos x over sin x, which is cot x. The logarithm of 2x plus 1 gives 2 over 2x plus 1, and it keeps the minus sign it had.
Compare the length of this with what the quotient rule would have needed. Expanding first is not a trick for this one example; it is the right reflex whenever a logarithm has a product, quotient or power inside it.
The check deliberately uses the original, unexpanded function for the difference quotient. That tests the expansion step and the differentiation together, and they agree at x equal to 1.
Fill the middle
\[ f(x) = \ln(3x+2)^{5} \]
Fill in the blanks
f(x) = 5\ln(3x+2) \;\Longrightarrow\; f'(x) = \frac15} }___
Why: Bring the power down first: f(x) = 5 ln(3x + 2). Then equation 3.31 gives 5 times 3/(3x + 2), which is 15/(3x + 2). At x = 1 that is 3, and a numerical slope agrees.
OpenStax Calculus Volume 1, §3.9 Derivatives of Exponential and Logarithmic Functions §3.9, p. 281 — Checkpoint 3.52
Fill in the blank before checking. The power law brings the 5 down first, so the function is 5 times the logarithm of 3x plus 2.
Then equation 3.31 gives 3 over 3x plus 2, and the 5 multiplies it to make 15. You could also apply equation 3.31 to the whole power directly, using the chain rule on the fifth power in the numerator, and the fifth powers would cancel to leave the same 15.
Bringing the power down first is shorter and leaves fewer places to slip. It is the same lesson as the previous example.
Trap
A quick answer that forgets the chain rule:
\[ \frac{d}{dx}\ln(x^{2}+3) = \frac{1}{x^{2}+3} \]
Wrong. The inside is not a bare x.
One over the inside is only the outer derivative. Multiply by the inside's derivative, 2x.
\[ \frac{d}{dx}\ln(x^{2}+3) = \frac{2x}{x^{2}+3} \]
Test at x equal to 0: the function is smallest there, so its slope must be 0. The wrong line gives one third.
This is the most frequent error with logarithms. The outer derivative, one over the inside, is written correctly, and then the chain rule is forgotten because the answer already looks finished.
The quick test is a point where you know the slope. The function ln of x squared plus 3 is smallest at x equal to 0, because the inside is smallest there, so its tangent must be horizontal. The wrong formula gives one third, which cannot be right. The corrected formula gives zero.
Error analysis
Annotate
On: \( \frac{d}{dx}\ln(x^{2} + \sin x) = \frac{d}{dx}\left(2\ln x + \ln\sin x\right) = \frac{2}{x} + \cot x \)
Read the argument and look for the step that is false before revealing the notes. The differentiation itself is done correctly; the mistake happens before any calculus.
The logarithm law splits a product, never a sum. The logarithm of x squared plus sin x cannot be expanded at all. The test value makes this undeniable: the two expressions differ at x equal to 1, one positive and one negative, so they are not the same function and cannot have the same derivative.
The fix is simply to use equation 3.31 on the whole inside: its derivative, 2x plus cos x, over itself. Expanding is only allowed when the inside is built by multiplication, division or powers.
Section
Part 3
Concept
Rewrite the base as e to its own logarithm, and the general exponential becomes a natural exponential with a constant in the exponent.
\[ b = e^{\ln b} \;\Longrightarrow\; b^{x} = e^{x\ln b} \]
\[ \frac{d}{dx}\left(e^{x\ln b}\right) = e^{x\ln b}\cdot\ln b \]
\[ \frac{d}{dx}\left(b^{x}\right) = b^{x}\ln b \]
So the mysterious constant of equation 3.29 is the natural log of the base. For base 2 it is 0.693147, the value Table 3.7 measured.
\[ B'(0) = \ln b, \qquad \ln 2 = 0.693147, \quad \ln 3 = 1.098612 \]
This slide answers the question left open in Part 1: what is the constant in the derivative of b to the x? Rewrite b as e to the ln b, and b to the x becomes e to the x ln b, a natural exponential with a constant multiple of x in its exponent.
The chain rule then multiplies by the derivative of x ln b, which is the constant ln b. Rewriting e to the x ln b back as b to the x gives the formula: the derivative of b to the x is b to the x times ln b.
So the slope of b to the x at zero is ln b. Compare with Table 3.7: for base 2 the table bracketed the slope around 0.69315, and ln 2 is 0.693147. For base 3 the table gave about 1.0986, and ln 3 is 1.098612. The measurement and the theory agree.
Concept
The book's proof reaches the same result by taking the natural log of both sides and differentiating implicitly. It is the first appearance of the technique of Part 4.
\[ y = b^{x} \;\Longrightarrow\; \ln y = x\ln b \]
\[ \frac{1}{y}\frac{dy}{dx} = \ln b \]
\[ \frac{dy}{dx} = y\ln b = b^{x}\ln b \]
OpenStax Calculus Volume 1, §3.9 Derivatives of Exponential and Logarithmic Functions §3.9, p. 281 — proof of Theorem 3.16
The book proves the same formula in a different way, and it is worth seeing because the method is the one Part 4 is built on. Take the natural logarithm of both sides, so the exponent x comes down as a multiplier.
Differentiate implicitly. The left side, ln y, has derivative one over y times dy by dx, by the chain rule. The right side is x times a constant, so its derivative is that constant, ln b.
Multiply both sides by y and substitute b to the x for y. You get b to the x times ln b, the same answer as before. Keep this pattern in mind: take logs, differentiate, multiply back by y.
Concept
A logarithm to base b is a constant multiple of the natural logarithm, so its derivative is too.
\[ y = \log_b x \;\Longrightarrow\; b^{y} = x \;\Longrightarrow\; y\ln b = \ln x \]
\[ y = \frac{\ln x}{\ln b} \]
\[ \frac{dy}{dx} = \frac{1}{\ln b}\cdot\frac{1}{x} = \frac{1}{x\ln b} \]
Here ln b is a constant, so it simply rides along. With the chain rule, the logarithm of an inner function g has derivative g prime over g times ln b.
OpenStax Calculus Volume 1, §3.9 Derivatives of Exponential and Logarithmic Functions §3.9, p. 281 — Theorem 3.16, equations 3.32 and 3.33
The derivation is short. Undo the logarithm to get b to the y equals x, take natural logs to bring y down, and solve: y is ln x divided by ln b. That is the change-of-base formula, and it says the base-b logarithm is just the natural logarithm multiplied by the constant one over ln b.
A constant multiple survives differentiation unchanged, so the derivative is one over x, times one over ln b. Note where ln b ends up: in the denominator here, but as a multiplier for the exponential. That difference is easy to mix up, and the best defence is to remember the change-of-base formula rather than the final result.
For base e, ln b is one and both formulas reduce to the natural ones. As always, a base other than e brings its own constant.
Notation
Annotate
On: \( \frac{d}{dx}\left(b^{g(x)}\right) = b^{g(x)}\cdot g'(x)\cdot\ln b \)
OpenStax Calculus Volume 1, §3.9 Derivatives of Exponential and Logarithmic Functions §3.9, p. 281 — equations 3.34 and 3.35
Read the general formula as three factors, each with a source. The copied function comes from the exponential's slope being proportional to its height. The inner derivative is the chain rule. And ln b is the constant of proportionality for base b.
The last annotation pairs the exponential with the logarithm. Both carry ln b, but the exponential multiplies by it and the logarithm divides by it. If you can reproduce the one-line derivations from the previous two slides, you never need to memorise which is which.
The numbers in the third annotation are worth noticing. For base 10, the constant is about 2.3, so 10 to the x rises more than twice as steeply as its own height; for base 2 it rises at about seven tenths of its height.
Picture it
Figure (svg): The curve y equals ln b for b from 0.8 to 4.2, with dots at b equal to 2, 2.7 and 3 at heights 0.69, 0.99 and 1.10, and a highlighted dot where the curve crosses the dashed height 1, at b equal to e.
Plot the slope-at-zero against the base. The measured values from Table 3.7 fall on the curve of the natural logarithm, and the curve reaches height one at exactly one base. That is why e is called natural: it is the base with no constant to carry.
This picture ties the lesson together. The horizontal axis is the base, and the curve is ln b, the constant in the derivative of b to the x. The orange dots are the slopes measured in Table 3.7 for bases 2, 2.7 and 3, and they sit exactly on the curve.
The dashed line marks height one, where the constant disappears. The curve crosses it at one base only, at b equal to e. That is the precise sense in which e is the natural base: it is the only base whose exponential needs no correcting constant.
Notice also that the constant is negative for bases below one. A base such as one half gives a decreasing exponential, and ln of one half is negative, so the derivative comes out negative, as it should.
Comparison
Comparison matrix
| base b | ln b | derivative of bˣ | derivative of log_b x |
|---|---|---|---|
| e | 1 | eˣ | 1/x |
| 2 | 0.693 | 2^x ln 2 | 1/(x ln 2) |
| 10 | 2.303 | 10ˣ ln 10 | 1/(x ln 10) |
| 3 | 1.099 | 3^x ln 3 | 1/(x ln 3) |
Fill in every blank before checking. Each row asks the same two questions for a different base: what is ln b, and where does it go in each derivative?
For base e the natural log is one, so both derivatives lose their constant. For the other rows, the exponential's derivative multiplies by ln b and the logarithm's derivative divides by it. The numerical values, 0.693 for 2, 1.099 for 3 and 2.303 for 10, are worth recognising on sight.
If you mixed up which derivative multiplies and which divides, go back one slide. The logarithm is the natural log divided by ln b, so ln b stays below.
Worked example
\[ h(x) = \frac{3^{x}}{3^{x}+2} \]
Differentiate the base-3 exponential
Why: Equation 3.34 with b equal to 3.
\[ \frac{d}{dx}\left(3^{x}\right) = 3^{x}\ln 3 \]
Apply the quotient rule
Why: The denominator's derivative is the same, since the 2 is constant.
\[ h'(x) = \frac{3^{x}\ln 3\,(3^{x}+2) - 3^{x}\cdot 3^{x}\ln 3}{(3^{x}+2)^{2}} \]
Expand the numerator
Why: Distribute the first product.
\[ 3^{2x}\ln 3 + 2\cdot 3^{x}\ln 3 - 3^{2x}\ln 3 \]
Cancel the matching terms
Why: The two terms in 3 to the 2x cancel.
\[ h'(x) = \frac{2\cdot 3^{x}\ln 3}{(3^{x}+2)^{2}} \]
Check at x equal to 0
Why: The formula gives 2 ln 3 over 9; a difference quotient agrees.
\[ h'(0) = \frac{2\ln 3}{9} \approx 0.244136 \quad\text{(numerical: 0.244136)} \]
OpenStax Calculus Volume 1, §3.9 Derivatives of Exponential and Logarithmic Functions §3.9, p. 282 — Example 3.79
Differentiate the base-3 exponential once and use the result twice, in the numerator's derivative and in the denominator's derivative, which are the same because the 2 in the denominator is constant.
The quotient rule gives a numerator with two products. Expanding it shows that the terms in 3 to the 2x cancel exactly, leaving only 2 times 3 to the x times ln 3. That cancellation is why the final answer is so compact.
The check at zero uses the fact that 3 to the zero is one, so the formula gives 2 ln 3 over 9, about 0.2441. A difference quotient agrees. The derivative is always positive, so this function always increases, rising from zero toward one.
Worked example
Find the slope of the tangent line at x equal to 1.
\[ y = \log_{2}(3x+1) \]
Apply equation 3.33
Why: Inner derivative 3, over the inner function times ln 2.
\[ \frac{dy}{dx} = \frac{3}{(3x+1)\ln 2} \]
Evaluate at x equal to 1
Why: The inner function is 4 there.
\[ \left.\frac{dy}{dx}\right|_{x=1} = \frac{3}{4\ln 2} \]
Rewrite the denominator
Why: Move the 4 inside the logarithm as a power: 2 to the 4 is 16.
\[ 4\ln 2 = \ln 2^{4} = \ln 16 \;\Longrightarrow\; \frac{3}{\ln 16} \]
Figure (svg): The curve y equals log base 2 of 3x plus 1 for x from minus 0.3 to 3.2, passing through (0, 0) and (1, 2), with the tangent line at (1, 2) of slope 3 over ln 16, about 1.08.
Check numerically
Why: Both forms give the same decimal, and a difference quotient on the original function agrees.
\[ \frac{3}{4\ln 2} = \frac{3}{\ln 16} \approx 1.08202 \quad\text{(numerical: 1.08202)} \]
OpenStax Calculus Volume 1, §3.9 Derivatives of Exponential and Logarithmic Functions §3.9, p. 282 — Example 3.80
Equation 3.33 does all the work: the inner derivative, 3, divided by the inner function times ln 2. At x equal to 1 the inner function is 4, giving 3 over 4 ln 2.
The book rewrites 4 ln 2 as ln 16 using the power law of logarithms. Both forms are correct; the second is simply more compact. Seeing that they are equal is good practice with the log laws.
Look at the figure. The curve passes through (1, 2), and the tangent there rises about 1.08 for each unit to the right. The curve bends downward, as every logarithm does, so the tangent is flatter than the line from the origin to (1, 2), whose slope is 2. The numbers are consistent.
Prediction
\[ y = 3^{x}, \qquad y'(2) = ? \]
Predict first
Which is the slope of the tangent line to y = 3ˣ at x = 2?
Correct: 9 ln 3 ≈ 9.89
Why: y′ = 3ˣ ln 3, so y′(2) = 9 ln 3 ≈ 9.8875. The answer 6 comes from the power rule, 2·3, which treats 3ˣ as if x were the base. 9 forgets ln 3; since ln 3 is a little above 1, the true slope is a little above the height 9.
OpenStax Calculus Volume 1, §3.9 Derivatives of Exponential and Logarithmic Functions §3.9, p. 282 — Checkpoint 3.53
Commit to one answer before revealing. The wrong options are all common errors, so it is worth knowing where each comes from.
The derivative of 3 to the x is 3 to the x times ln 3. At x equal to 2 that is 9 ln 3, about 9.89. The answer 6 treats 3 to the x as if it were x cubed and applies the power rule. The answer 9 forgets ln 3, which would be right only for base e.
Because ln 3 is just above one, the slope is just above the height. That matches the picture from Part 1, where the base-3 curve crossed the point (0, 1) slightly more steeply than the slope-one line.
Worked example
Erbium has a half-life of about 12 hours, and 9 grams are present at the start. Find the rate of decay at 4 hours.
Write the amount remaining
Why: The amount halves every 12 hours.
\[ A(t) = 9\left(\tfrac12\right)^{t/12} \]
Differentiate with equation 3.35
Why: Base one half, inner function t over 12 with derivative one twelfth.
\[ A'(t) = 9\left(\tfrac12\right)^{t/12}\cdot\frac{1}{12}\cdot\ln\tfrac12 \]
Simplify the constants
Why: The log of one half is minus ln 2, and 9 over 12 is three quarters.
\[ A'(t) = -\frac{3\ln 2}{4}\left(\tfrac12\right)^{t/12} \]
Evaluate at t equal to 4
Why: One half to the one third is the reciprocal of the cube root of 2.
\[ A'(4) = -\frac{3\ln 2}{4}\cdot 2^{-1/3} \approx -0.4126 \text{ g/h} \]
Figure (svg): The amount of erbium A of t equals 9 times one half to the t over 12, falling from 9 grams at t equal to 0 to 4.5 grams at 12 hours and toward zero, with the tangent line at t equal to 4 hours, height 7.14 grams, slope minus 0.41 grams per hour.
Check with a difference quotient and the ratio
Why: A numerical slope agrees; and the rate over the amount is the constant minus ln 2 over 12 at every time, as for the mosquitoes.
\[ \frac{A(4.001)-A(3.999)}{0.002} \approx -0.4126, \qquad \frac{A'(4)}{A(4)} = \frac{-0.4126}{7.1433} = -0.0578 = -\frac{\ln 2}{12} \]
OpenStax Calculus Volume 1, §3.9 Derivatives of Exponential and Logarithmic Functions §3.9, p. 285 — Exercise 360
The model comes straight from the meaning of half-life. Every 12 hours the amount is multiplied by one half, so after t hours it has been halved t over 12 times.
Equation 3.35 differentiates it with base one half. The natural log of one half is negative, minus ln 2, and that negative sign is what makes the rate a rate of decay. Evaluated at 4 hours, the amount is about 7.14 grams and it is falling at about 0.41 grams per hour.
The check does two things. A difference quotient confirms the value. And dividing the rate by the amount gives minus ln 2 over 12 at every time, a constant relative rate, just as with the mosquitoes. Growth and decay are the same mathematics with opposite signs.
Real world
Discussion prompt
A sample decays as A(t) = A₀e^(−kt). Show that A′(t)/A(t) is the same at every time, and then find the half-life. Why does the answer not depend on how much you started with?
Try the two calculations before revealing. They are short, and they explain a fact that often seems surprising: a large sample and a small sample of the same isotope take the same time to halve.
The first line shows that the rate divided by the amount is a constant, minus k. Every gram decays at the same relative rate regardless of how many other grams are present. The second line solves for the time to reach half the starting amount, and the starting amount cancels from both sides before you even take a logarithm.
So the half-life is ln 2 divided by k and nothing else. For erbium, with a half-life of 12 hours, k is ln 2 over 12, the same constant you found on the previous slide.
Matching
Match the pairs
Why: e^(3x) brings down the inner derivative 3. 3^x brings down ln 3. ln(3x) = ln 3 + ln x, and the constant ln 3 has derivative zero, so the 3 vanishes entirely: 3/(3x) = 1/x. log₃ x carries ln 3 in the denominator.
Make each match before checking, and for each one say which rule you used. Three of the four are straightforward: the chain rule brings a 3 out of e to the 3x, the base 3 brings ln 3, and the base-3 logarithm puts ln 3 in the denominator.
The logarithm of 3x is the one to think about. Its derivative is one over x, with no 3 anywhere. Two explanations agree: by equation 3.31 it is 3 over 3x, and the 3s cancel; or by the log laws it is ln 3 plus ln x, and the constant ln 3 has derivative zero.
Stretching the input of a logarithm by a constant factor only shifts its graph up, so it does not change any slopes.
Trap
Treating the exponent as if it were a fixed power:
\[ \frac{d}{dx}2^{x} = x\cdot 2^{x-1} \]
Wrong. The variable is in the exponent, not the base.
The power rule needs a variable base and a constant exponent. Here it is the other way round.
\[ \frac{d}{dx}2^{x} = 2^{x}\ln 2 \]
Test at x equal to 0: the wrong line gives slope 0, yet the graph of 2 to the x is clearly rising there, with slope 0.693.
The power rule is so familiar that it gets applied to anything with an exponent. But it was proved for a variable base and a fixed exponent, and 2 to the x is the opposite: a fixed base and a variable exponent.
The test at zero exposes the error immediately. The wrong formula gives slope zero there, which would mean a horizontal tangent, but the graph of 2 to the x is visibly rising through (0, 1). The correct slope is ln 2, about 0.693, the value you estimated in Part 1.
Section
Part 4
Sorting
Sort into buckets
Sort each function by the rule that differentiates it directly.
Sort each function by asking one question: where is the variable? If it is only in the base, the power rule applies. If it is only in the exponent, the exponential rule applies. If it is in both, neither does.
The items with e and pi are there to test whether you treat them as numbers. The number e is about 2.718 and pi about 3.142, so x to the e is a power, like x cubed, and pi to the x is an exponential, like 3 to the x.
The last bucket is the reason for this part of the lesson. Functions such as x to the x have the variable in both places, and until now you had no way to differentiate them at all.
Concept
\[ \frac{d}{dx}\left(\ln y\right) = \frac{1}{y}\frac{dy}{dx} \]
OpenStax Calculus Volume 1, §3.9 Derivatives of Exponential and Logarithmic Functions §3.9, p. 282 — Problem-Solving Strategy: Using Logarithmic Differentiation
These five steps are the book's procedure, and they are worth memorising in order. You have already seen them once, in the book's proof of the derivative of b to the x.
The key line is the formula under the list. Because y is a function of x, the derivative of ln y is one over y times dy by dx, by the chain rule. That is the same move as in implicit differentiation, and it is why the method works for any positive function y.
The strategy applies in two situations. Use it when the variable appears in both the base and the exponent, where nothing else works. And use it when a function is a long product or quotient of factors, where it is much less work than the product and quotient rules.
Intuition
The logarithm lowers every operation by one level. Multiplication becomes addition, division becomes subtraction, and an exponent comes down to the front as a multiplier.
\[ \ln(uv) = \ln u + \ln v, \qquad \ln\frac{u}{v} = \ln u - \ln v, \qquad \ln u^{v} = v\ln u \]
The last law is the key one. A variable exponent, which no rule can touch, becomes a factor in a product, which the product rule handles easily. The price is the extra factor of y on the left, paid back in step four.
The logarithm laws each lower an operation by one level. Products turn into sums, which differentiate term by term. Quotients turn into differences. And powers turn into multiples.
The third law is the important one for this section. A variable exponent is impossible to differentiate directly, but after taking logs it comes down in front as an ordinary factor, and the product rule handles it.
Nothing is free. After differentiating you have the derivative of ln y, which is one over y times y prime, not y prime itself. Step four of the strategy pays that back by multiplying through by y.
Worked example
\[ y = \left(2x^{4}+1\right)^{\tan x} \]
Take the natural log of both sides
Why: Step 1 of the strategy.
\[ \ln y = \ln\left(2x^{4}+1\right)^{\tan x} \]
Bring the exponent down
Why: Step 2: the power law.
\[ \ln y = \tan x\,\ln\left(2x^{4}+1\right) \]
Differentiate both sides
Why: Step 3: the product rule on the right, and equation 3.31 for the logarithm.
\[ \frac{1}{y}\frac{dy}{dx} = \sec^{2}x\,\ln\left(2x^{4}+1\right) + \tan x\cdot\frac{8x^{3}}{2x^{4}+1} \]
Multiply by y
Why: Step 4.
\[ \frac{dy}{dx} = y\left(\sec^{2}x\,\ln(2x^{4}+1) + \frac{8x^{3}\tan x}{2x^{4}+1}\right) \]
Substitute for y
Why: Step 5: y is the original function.
\[ \frac{dy}{dx} = \left(2x^{4}+1\right)^{\tan x}\left(\sec^{2}x\,\ln(2x^{4}+1) + \frac{8x^{3}\tan x}{2x^{4}+1}\right) \]
Check at x equal to 1
Why: Here y is 3 to the tan 1, about 5.5344, and the bracket is about 7.9164; a difference quotient on the original agrees.
\[ y'(1) \approx 5.5344 \times 7.9164 \approx 43.813 \quad\text{(numerical: 43.813)} \]
OpenStax Calculus Volume 1, §3.9 Derivatives of Exponential and Logarithmic Functions §3.9, p. 283 — Example 3.81
The variable is in the base, 2x to the fourth plus 1, and in the exponent, tan x, so neither the power rule nor the exponential rule applies. Taking logs brings tan x down in front, where it becomes one factor of a product.
The product rule on the right gives two terms: the derivative of tan x, which is sec squared x, times the logarithm, and tan x times the derivative of the logarithm, which by equation 3.31 is 8x cubed over 2x to the fourth plus 1.
Multiplying back by y and substituting the original function gives a long but completely explicit answer. The check at x equal to 1 is numerical, because the numbers are not tidy there: the formula gives about 43.81, and so does a difference quotient on the original function.
Worked example
\[ y = x^{x}, \qquad x > 0 \]
Take logarithms and bring the exponent down
Why: Steps 1 and 2 together.
\[ \ln y = x\ln x \]
Differentiate both sides
Why: The product rule on the right.
\[ \frac{1}{y}\frac{dy}{dx} = 1\cdot\ln x + x\cdot\frac{1}{x} = \ln x + 1 \]
Multiply by y and substitute
Why: Steps 4 and 5.
\[ \frac{dy}{dx} = x^{x}(\ln x + 1) \]
Figure (svg): The curve y equals x to the x for x from 0 to 2. It starts near height 1, dips to a low point at x equal to one over e, height 0.69, where the tangent is horizontal, and then climbs to 4 at x equal to 2.
Check at x equal to 2, and at the low point
Why: At 2 the formula gives 4 times one plus ln 2, matching a numerical slope; and it is zero where ln x equals minus one, at x equal to one over e, the bottom of the graph.
\[ y'(2) = 4(1 + \ln 2) \approx 6.7726 \quad\text{(numerical: 6.7726)}, \qquad y'\left(\tfrac1e\right) = 0 \]
OpenStax Calculus Volume 1, §3.9 Derivatives of Exponential and Logarithmic Functions §3.9, p. 283 — Checkpoint 3.54
This is the classic example of logarithmic differentiation. Taking logs gives x ln x, and the product rule differentiates that as ln x plus x times one over x, which is ln x plus 1.
Multiplying back by y gives x to the x times ln x plus 1. The graph shows what this means. The factor x to the x is always positive, so the sign of the slope is the sign of ln x plus 1: negative until ln x reaches minus 1, and positive after.
That places a low point at x equal to one over e, about 0.368, with height about 0.692, exactly where the figure's curve bottoms out. The check at x equal to 2 confirms the formula numerically as well.
Worked example
\[ y = \frac{x\sqrt{2x+1}}{e^{x}\sin^{3}x} \]
Take the natural log of both sides
Why: Step 1.
\[ \ln y = \ln\frac{x\sqrt{2x+1}}{e^{x}\sin^{3}x} \]
Expand completely
Why: Step 2: the root is a power one half, ln of e to the x is x, and the cube comes down.
\[ \ln y = \ln x + \tfrac12\ln(2x+1) - x - 3\ln(\sin x) \]
Differentiate each term
Why: Step 3: equation 3.31 on each logarithm.
\[ \frac{1}{y}\frac{dy}{dx} = \frac{1}{x} + \frac{1}{2x+1} - 1 - 3\cot x \]
Multiply by y
Why: Step 4.
\[ \frac{dy}{dx} = y\left(\frac1x + \frac{1}{2x+1} - 1 - 3\cot x\right) \]
Substitute for y
Why: Step 5.
\[ \frac{dy}{dx} = \frac{x\sqrt{2x+1}}{e^{x}\sin^{3}x}\left(\frac1x + \frac{1}{2x+1} - 1 - 3\cot x\right) \]
Check at x equal to 1
Why: Here y is about 1.069421 and the bracket is about minus 1.592945; a difference quotient on the original agrees.
\[ y'(1) \approx 1.069421\times(-1.592945) \approx -1.70353 \quad\text{(numerical: }-1.70353) \]
OpenStax Calculus Volume 1, §3.9 Derivatives of Exponential and Logarithmic Functions §3.9, p. 283 — Example 3.82
This function has no variable exponent, so in principle the quotient rule and product rule could handle it. In practice they would produce a monstrous expression. Taking logs first turns five factors into five simple terms.
Expand carefully. The square root becomes a power of one half, so its log carries a factor one half. The logarithm of e to the x is just x. The cube on the sine comes down as a factor of 3. Each term then differentiates in one line.
The final answer is the original function times a short bracket, which is typical of logarithmic differentiation. The numerical check at x equal to 1 matches a difference quotient on the original function, so the expansion, the differentiation and the substitution were all right.
Ranking
Put in order
Order the five steps of logarithmic differentiation.
Why: Log, expand, differentiate, multiply, substitute. Expanding before differentiating is what makes the method pay: every product has become a sum by the time you differentiate.
Order the steps before checking. The first two and the last are the easiest to place; the middle is where people waver.
Expanding must come before differentiating, because the whole point is to differentiate a sum rather than a product. And multiplying by y must come before substituting, because until you multiply, the left side is one over y times y prime, not y prime.
Worked example
Find where the tangent is horizontal, and where the function rises and falls, for x positive.
\[ y = x^{1/x} \]
Take logarithms
Why: The exponent comes down.
\[ \ln y = \frac{1}{x}\ln x = \frac{\ln x}{x} \]
Differentiate both sides
Why: The quotient rule on the right.
\[ \frac{1}{y}\frac{dy}{dx} = \frac{\frac1x\cdot x - \ln x}{x^{2}} = \frac{1 - \ln x}{x^{2}} \]
Multiply by y
Why: Now in terms of x alone.
\[ \frac{dy}{dx} = x^{1/x}\,\frac{1 - \ln x}{x^{2}} \]
Find the sign
Why: The power and x squared are positive, so the sign is that of 1 minus ln x.
\[ y' = 0 \iff x = e; \quad y' > 0 \text{ on } (0, e), \quad y' < 0 \text{ on } (e, \infty) \]
Find the peak
Why: The horizontal tangent is at the top of the graph.
\[ \left(e, e^{1/e}\right) \approx (2.718, 1.4447) \]
Figure (svg): The curve y equals x to the power one over x for x from 0.35 to 12. It rises steeply, peaks at x equal to e with height 1.445, and then declines slowly toward 1. Dots at x equal to 2 and x equal to 4 sit at the same height, root 2.
Check the signs and the heights
Why: Numerical slopes at 2 and 4 have the predicted signs, and the heights at 2 and 4 are equal, so the peak must lie between them.
\[ y'(2) \approx 0.1085 > 0, \quad y'(4) \approx -0.0341 < 0, \quad 2^{1/2} = 4^{1/4} = \sqrt2 \]
OpenStax Calculus Volume 1, §3.9 Derivatives of Exponential and Logarithmic Functions §3.9, p. 284 — Exercise 357
Taking logs turns the exponent one over x into a multiplier, giving ln x over x. The quotient rule differentiates that as 1 minus ln x, over x squared.
Multiplying back by y gives the derivative, and its sign is easy to read. Both x to the one over x and x squared are positive, so the sign of the derivative is the sign of 1 minus ln x: positive while x is less than e and negative after. The function rises to a single peak at x equal to e, where its value is e to the one over e, about 1.4447.
The check has a nice twist. The square root of 2 equals the fourth root of 4, so the function has the same height at 2 and at 4. A function that is equal at two points and rises then falls must peak between them, and e is between 2 and 4.
Trap
Two tempting lines, each borrowing one rule:
\[ (x^{x})' = x\cdot x^{x-1} = x^{x} \]
\[ (x^{x})' = x^{x}\ln x \]
Both wrong.
The variable sits in both places, so neither rule applies alone. Logarithmic differentiation gives:
\[ (x^{x})' = x^{x}(\ln x + 1) \]
\[ = x^{x}\ln x + x^{x} \]
The right answer is the SUM of the two wrong ones: each rule captures one of the two ways the function changes.
Each wrong line borrows one familiar rule. The first treats the exponent as a fixed number and uses the power rule. The second treats the base as a fixed number and uses the exponential rule. Both ignore the fact that the other part is changing too.
The correct derivative, from logarithmic differentiation, is x to the x times ln x plus 1. Multiply it out and it is x to the x ln x plus x to the x: exactly the sum of the two wrong answers. Each wrong rule captures one of the two ways the function changes, and the true rate is the sum of both. That is the product rule in disguise.
Section
Part 5
Concept
The power rule has been proved one family of exponents at a time. Logarithmic differentiation proves it for every real exponent in one stroke.
| exponent | where it was proved | method |
|---|---|---|
| positive integers | Section 3.3 | binomial expansion of (x + h)ⁿ |
| negative integers | Section 3.3 | quotient rule |
| rational numbers | Section 3.7 | the inverse function theorem |
| every real r, such as √2 or π | this section | logarithmic differentiation |
\[ \frac{d}{dx}\left(x^{r}\right) = rx^{r-1} \quad\text{for every real } r,\; x > 0 \]
The power rule has had an unusual history in this course. Section 3.3 stated it and proved it for positive whole-number exponents, then for negative ones with the quotient rule. Section 3.7 extended it to rational exponents using the inverse function theorem.
That left a gap. An exponent such as root 2 or pi is not a fraction, so none of those proofs covered it, even though you have been told the rule holds. Logarithmic differentiation closes the gap in five lines, for every real exponent at once.
The price is the condition that x is positive, since the proof takes ln x. For many exponents the rule still holds for negative x, but the proof on the next slide only covers positive x.
Worked example
\[ y = x^{r}, \quad r \text{ any real number}, \quad x > 0 \]
Take the natural log of both sides
Why: Step 1.
\[ \ln y = \ln x^{r} \]
Bring the exponent down
Why: Step 2; this works for every real r.
\[ \ln y = r\ln x \]
Differentiate both sides
Why: Step 3; r is a constant.
\[ \frac{1}{y}\frac{dy}{dx} = \frac{r}{x} \]
Multiply by y
Why: Step 4.
\[ \frac{dy}{dx} = y\cdot\frac{r}{x} \]
Substitute and simplify
Why: Step 5: x to the r divided by x is x to the r minus 1.
\[ \frac{dy}{dx} = x^{r}\cdot\frac{r}{x} = rx^{r-1} \]
Check with an irrational exponent
Why: Take r equal to root 2 at x equal to 2; a difference quotient agrees with the formula.
\[ \sqrt2\cdot 2^{\sqrt2 - 1} \approx 1.884541 \quad\text{(numerical: 1.884541)} \]
OpenStax Calculus Volume 1, §3.9 Derivatives of Exponential and Logarithmic Functions §3.9, p. 283 — Example 3.83
Follow the five steps exactly. Taking logs brings the exponent r down as a constant multiplier, which works whether r is a whole number, a fraction, or an irrational number such as root 2.
Differentiating gives r over x on the right. Multiplying by y and substituting x to the r gives x to the r times r over x, and x to the r divided by x is x to the r minus 1. That is the power rule.
The check uses an exponent none of the earlier proofs could handle, root 2, at x equal to 2. The formula and a difference quotient agree to six decimal places. The proof is complete.
Prediction
\[ y = (\tan x)^{\pi} \]
Predict first
Checkpoint 3.55 asks for this derivative. What kind of function is it?
Correct: A power with a constant exponent π, so the power rule with the chain rule applies
Why: π is a number, about 3.14159, so this is (inner function) to a constant power: the power rule with the chain rule applies, now that Example 3.83 has proved it for irrational exponents. The book asks for logarithmic differentiation, and it gives the same answer.
Choose before revealing. The question is about what kind of function this is, which decides which rules are available.
The exponent pi is a number, and the base tan x is a function of x. So this is an inner function raised to a constant power, which is exactly what the power rule with the chain rule handles, now that the previous slide has proved the rule for irrational exponents.
The book asks for logarithmic differentiation here anyway, as practice, and the next slide does it both ways. When two valid methods give the same answer, that is itself a check.
Worked example
\[ y = (\tan x)^{\pi} \]
Take logarithms
Why: The exponent pi comes down.
\[ \ln y = \pi\ln(\tan x) \]
Differentiate both sides
Why: Equation 3.31 with g of x equal to tan x.
\[ \frac{1}{y}\frac{dy}{dx} = \pi\,\frac{\sec^{2}x}{\tan x} \]
Multiply by y and simplify
Why: One factor of tan x cancels.
\[ \frac{dy}{dx} = (\tan x)^{\pi}\cdot\frac{\pi\sec^{2}x}{\tan x} = \pi(\tan x)^{\pi-1}\sec^{2}x \]
Compare with the power rule
Why: Constant exponent pi, inner function tan x: the same answer.
\[ \frac{d}{dx}(\tan x)^{\pi} = \pi(\tan x)^{\pi-1}\cdot\sec^{2}x \]
Check at x equal to a quarter of pi
Why: There tan x is 1 and sec squared x is 2, so the slope is 2 pi; a difference quotient agrees.
\[ y'\left(\tfrac{\pi}{4}\right) = \pi\cdot 1\cdot 2 = 2\pi \approx 6.28319 \quad\text{(numerical: 6.28319)} \]
OpenStax Calculus Volume 1, §3.9 Derivatives of Exponential and Logarithmic Functions §3.9, p. 284 — Checkpoint 3.55
Taking logs brings pi down, and equation 3.31 differentiates the logarithm of tan x as sec squared x over tan x. Multiplying back by y and cancelling one factor of tan x gives pi times tan x to the pi minus 1 times sec squared x.
The power rule with the chain rule gives the same result directly: lower the exponent by one, multiply by pi, and multiply by the derivative of the inside. For a constant exponent that route is shorter, and it is the one to use in practice.
The check at a quarter of pi is tidy because tan is 1 and sec squared is 2 there, so the slope is 2 pi, about 6.283. A difference quotient on the original function agrees.
Section
Part 6
Pattern
Figure (svg): A decision diagram. From the question 'where is x?' four arrows lead to: only in the base, use the power rule; only in the exponent, multiply by ln b; inside a logarithm, divide the inner derivative by the inner function (and by ln b); in both base and exponent, use logarithmic differentiation.
The diagram is the decision you should make before writing anything. Find where the variable sits, and the rule follows. Most errors in this lesson come from skipping this step and reaching for the most familiar rule, usually the power rule.
Read each branch as a reminder of its constant. A constant exponent gives the power rule, with no logarithm. A constant base gives a copy of the function times ln b, which is one for base e. A logarithm gives inner derivative over inner function, divided by ln b for a base other than e.
When the variable is in both places, or when a function is a thicket of products and quotients, take logarithms first. And in every branch, the chain rule multiplies by the inner derivative.
Check
Check your understanding
What is the derivative of 5^(x²)?
Answer: C
Why: By equation 3.35 with b = 5 and g(x) = x²: copy 5^(x²), multiply by the inner derivative 2x, and multiply by ln 5.
Identify the structure first: a constant base, 5, raised to a variable exponent, x squared. That is equation 3.35.
The answer needs three factors: the function copied, the inner derivative 2x, and ln 5. Each wrong option is missing one of them, or uses the power rule, which does not apply to a variable exponent.
Check
Check your understanding
What is the slope of y = ln(x² + 1) at x = 1?
Answer: B
Why: By equation 3.31 the derivative is 2x/(x² + 1). At x = 1 that is 2/2 = 1.
Differentiate first, then evaluate. The derivative of ln of x squared plus 1 is 2x over x squared plus 1, by equation 3.31.
At x equal to 1 that is 2 over 2, which is 1. The distractors come from dropping the inner derivative, forgetting to divide by the inner function, or giving the height of the curve instead of its slope.
Check
Check your understanding
Which function can NOT be differentiated by the power, exponential and chain rules alone, and needs logarithmic differentiation?
Answer: C
Why: In (sin x)^x the variable appears in the base and in the exponent, so neither the power rule nor the exponential rule applies. Taking logarithms gives ln y = x ln(sin x), which the product rule handles.
Apply the question from the pattern slide to each option: where is the variable? Only one option has it in both the base and the exponent.
In sin x to the power x, the base and the exponent both change with x, so neither the power rule nor the exponential rule applies. Taking logs turns it into x times ln of sin x, a product the product rule can handle. The other three each have a constant in one place and yield to a single rule with the chain rule.
Explain it to yourself
Discussion prompt
In two or three sentences: where does the factor ln b in the derivative of bˣ come from, and why does it disappear when the base is e?
Write your explanation before revealing. Being able to say this in words is a sign that you understand the lesson's central idea, not just its formulas.
The factor ln b comes from rewriting the base in terms of e, which puts ln b into the exponent as a constant multiplier. The chain rule then brings that constant out as a factor. For base e the constant is ln e, which is one, so it vanishes.
That connects back to the start. The number e was defined as the base whose exponential has slope one at zero. The fact that ln e is one is the same statement seen from the other side.
Exit ticket
\[ y = x^{\sqrt x} \]
Discussion prompt
Exercise 346. Use logarithmic differentiation to find dy/dx, then find the slope of the curve at x = 4.
OpenStax Calculus Volume 1, §3.9 Derivatives of Exponential and Logarithmic Functions §3.9, p. 284 — Exercise 346
This combines the lesson's main technique with a numerical answer. The variable is in the base and in the exponent, so take logs first: ln y is root x times ln x.
The product rule gives ln x over 2 root x, plus root x times one over x, which simplifies to one over root x. Multiplying back by y gives the derivative.
At x equal to 4, y is 4 squared, which is 16, and the bracket is ln 4 over 4, plus one half, about 0.8466. The slope is about 13.545, and a difference quotient on the original function agrees.
Recap
| function | derivative | with an inner function g |
|---|---|---|
| eˣ | eˣ | e^g · g′ |
| bˣ | bˣ ln b | b^g · g′ · ln b |
| ln x | 1/x (and ln|x| too) | g′ / g |
| log_b x | 1/(x ln b) | g′ / (g ln b) |
| x^r, any real r | r x^(r − 1) | r g^(r − 1) · g′ |
\[ \ln y = \ln h(x) \;\to\; \frac{1}{y}y' = \frac{d}{dx}\ln h(x) \;\to\; y' = h(x)\cdot\frac{d}{dx}\ln h(x) \]
This completes the derivative rules of Chapter 3. Chapter 4 puts them to work, starting with related rates in Section 4.1.
Stewart, Calculus: Early Transcendentals 8e, §3.6 Derivatives of Logarithmic Functions §3.1 and §3.6, pp. 172-182 and 218-223 — the same material in Stewart
The table collects every formula in the lesson, and each one comes from a single idea. The exponential with base e is its own derivative. The logarithm's derivative, one over x, comes from differentiating e to the y equals x implicitly. Every other base is a power of e, so it carries the constant ln b, multiplying for exponentials and dividing for logarithms.
The chain-rule column is the one you will use most, because real problems rarely have a bare x inside. The pattern is always the same: the outer derivative, times the inner derivative.
The formula below the table is logarithmic differentiation in one line: take logs, differentiate, multiply back by the original function. It handles variable exponents, tangles of factors, and it finished the proof of the power rule.
Want this taught 1-on-1? Alexander tutors Calculus I — $55/session, free consultation.