Back to the on-screen lesson ·

Exponential and logarithmic derivatives

Why e is the base that makes the constant vanish, the logarithm's derivative, and logarithmic differentiation.

Paper packet. Every task here also exists on screen, where it is checked automatically; answers written on paper are not assessed by Nydus. When you are back at a device, enter your answers there.

1. What you will learn

By the end of this lesson you will be able to differentiate exponentials in any base and logarithms in any base, always with the chain rule's inner factor attached, say what property defines $e$ and why every other base carries a $\ln a$, use logarithmic differentiation on a variable base with a variable exponent and on a long product where the ordinary rules would take a page, and read the equation $P' = kP$ as the statement that a rate of change proportional to the amount is exactly what an exponential is.

2. The function that is its own derivative

For any base $a > 0$, $$\frac{d}{dx}a^x = a^x \ln a.$$ Differentiating an exponential returns the same exponential times a constant — the shape is preserved and only a scale factor appears. That is unique to exponentials, and it is what makes them the functions of growth.

The constant is $1$ exactly when $\ln a = 1$, that is when $a = e$. So $$\frac{d}{dx}e^x = e^x,$$ and that property is what defines $e$. It is not a number chosen for convenience and then found to have a nice derivative; it is the base at which the nuisance factor disappears.

The logarithm follows by implicit differentiation. With $y = \ln x$, so $e^y = x$: $$e^y \frac{dy}{dx} = 1 \quad\Longrightarrow\quad \frac{dy}{dx} = \frac{1}{e^y} = \frac{1}{x}.$$

$f$$f'$
$e^x$$e^x$
$a^x$$a^x \ln a$
$\ln x$$\dfrac1x$, for $x > 0$
$\log_a x$$\dfrac{1}{x \ln a}$
$e^{u}$$e^{u}u'$
$\ln u$$\dfrac{u'}{u}$

The last two are the ones actually used: almost every exponential or logarithm in practice has something other than $x$ inside it, and the chain rule's factor is not optional.

Another way: picture

The graph of $e^x$ with tangents drawn at several points. At height $1$ the tangent has slope $1$; at height $5$, slope $5$; at height $20$, slope $20$. The slope equals the height everywhere — that is the whole of what $\frac{d}{dx}e^x = e^x$ says, and no other function except its constant multiples does it.

Another way: steps

  1. Reduce to base $e$ if the base is anything else: $a^x = e^{x \ln a}$.
  2. Identify the inner function — the exponent, or the thing inside the logarithm.
  3. Apply the rule, and attach the inner derivative.
  4. For a variable base and a variable exponent, or for a long product, take logarithms first and differentiate implicitly.

3. Logarithmic differentiation

Some functions no rule covers. $y = x^x$ is not a power ($n$ must be constant) and not an exponential ($a$ must be constant), and there is no seventh rule to reach for.

The technique: take logarithms, differentiate implicitly, multiply back.

$$\ln y = x \ln x \;\Longrightarrow\; \frac{y'}{y} = \ln x + 1 \;\Longrightarrow\; y' = x^x(\ln x + 1).$$

The left side used the chain rule on $\ln y$; the right, the product rule. The quantity $\dfrac{y'}{y}$ that appears is the logarithmic derivative, and it is the relative rate of change — the fraction by which $y$ grows per unit of $x$, which is what a percentage growth rate measures.

It is also worth using where the ordinary rules would work but badly. For $$y = \frac{(x+1)^4(x-2)^3}{(x+5)^7},$$ logarithms turn the product and quotient into a sum: $\ln y = 4\ln(x+1) + 3\ln(x-2) - 7\ln(x+5)$, and differentiating gives $$\frac{y'}{y} = \frac{4}{x+1} + \frac{3}{x-2} - \frac{7}{x+5}$$ in one line. The product and quotient rules would take a page.

4. Where this goes wrong

$\dfrac{d}{dx}a^x = xa^{x-1}$. The power rule applied where the variable is in the exponent. The two rules look alike and apply to opposite situations: $x^n$ has the variable in the base, $a^x$ in the exponent.

Losing the inner derivative. $\bigl(e^{3x}\bigr)' = 3e^{3x}$, not $e^{3x}$; $\bigl(\ln(5x^2)\bigr)' = \dfrac{10x}{5x^2} = \dfrac{2}{x}$, not $\dfrac{1}{5x^2}$.

Forgetting the domain. $\ln x$ is defined for $x > 0$, so $\bigl(\ln x\bigr)' = 1/x$ is a statement about the positive reals. For $\ln|x|$ the derivative is $1/x$ on both halves, which is why the integral of $1/x$ is written with the absolute value.

Writing $\ln(a + b) = \ln a + \ln b$. The logarithm turns products into sums, not sums. This error is what makes logarithmic differentiation go wrong on an expression containing a sum, and the technique simply does not help there.

Forgetting to multiply back by $y$. Logarithmic differentiation produces $y'/y$, and the answer is $y$ times that.

5. $e$ is not an arbitrary constant that happens to be about $2.718$

Presented as "the base of natural logarithms, approximately $2.71828$", $e$ looks like a number somebody picked. It is determined, and this lesson is where that becomes visible: among all the functions $a^x$, exactly one has slope equal to height everywhere, and $e$ is the base of that one.

Every other appearance of $e$ follows from that. It is the base for which $\ln$ has derivative $1/x$ rather than $\dfrac{1}{x\ln a}$; the solution of $y' = y$; the limit $\lim_{n\to\infty}(1+1/n)^n$, which is compound interest compounded continuously — growth proportional to the amount, again. The number is what it is because the derivative condition pins it down, and knowing that is the difference between remembering a constant and understanding one.

6. An exponential inside a product

  1. $f(x) = x^2 e^{-3x}$. Outermost is a product: $u = x^2$, $v = e^{-3x}$.

    Frame first.

  2. $u' = 2x$; and $v' = e^{-3x} \cdot (-3) = -3e^{-3x}$ by the chain rule.

    The inner derivative is $-3$.

  3. $f'(x) = 2xe^{-3x} - 3x^2e^{-3x} = xe^{-3x}(2 - 3x)$. Factoring is worth doing: the zeros of $f'$ are now visible at $x = 0$ and $x = \tfrac23$, which is what the next unit will want.

7. Logarithmic differentiation on a long product

  1. $y = \dfrac{(x+1)^4(x-2)^3}{(x+5)^7}$. Take logarithms: $\ln y = 4\ln(x+1) + 3\ln(x-2) - 7\ln(x+5)$.

    Products become sums; exponents become coefficients.

  2. Differentiate: $\dfrac{y'}{y} = \dfrac{4}{x+1} + \dfrac{3}{x-2} - \dfrac{7}{x+5}$.

    Three easy terms instead of one hard one.

  3. Multiply back: $y' = \dfrac{(x+1)^4(x-2)^3}{(x+5)^7}\left(\dfrac{4}{x+1} + \dfrac{3}{x-2} - \dfrac{7}{x+5}\right)$.

    Do not forget the last step.

8. Your turn: differentiate $f(x) = \ln(x^2 + 1)$

  1. $\dfrac{d}{dx}\ln u = \dfrac{u'}{u}$ with $u = x^2 + 1$.

    Name the inside.

  2. $u' = 2x$.

  3. Your turn: work this step out. Its working is at the end of the packet.

    $f'(x) = \dfrac{2x}{x^2+1}$ — and note the domain is all of $\mathbb{R}$ here, because $x^2 + 1$ is never zero or negative.

9. Guided practice

Match each expression to its derivative or domain requirement.

Derivative $2xe^{x^2}$Derivative $3^x\ln3$Derivative $2/(2x-1)$$x>1/2$
$e^{x^2}$
$3^x$
$\ln(2x-1)$
Real domain of $\ln(2x-1)$

10. Guided practice

Match each expression to the derivative feature that must appear.

Derivative has factor $5e^{5x}$Derivative has factor $3^x\ln3$Derivative is $2x/(x^2+1)$Start by writing $\ln y=x\ln x$
$e^{5x}$
$3^x$
$\ln(x^2+1)$
$y=x^x$

11. Practice

$f(x) = 8e^{5x}$. What is $f'(0)$?

Answer:

12. Practice

Why is $e$ called the natural base, rather than $8$ or $10$?

13. Practice

Differentiate $f(x) = \ln(6x + 3)$.

Answer:

14. Somewhere new

A quantity halves every $20$ units of time, so $P(t) = P_0e^{kt}$. What is $k$, to four decimal places?

Answer:

15. Lesson test

Lesson test: one question per skill, one attempt each, no hints. Your answers are checked when you submit.

16. Test question

$f(x) = 3^x$. Its derivative at $x = 0$ is $\ln 3$ times what number?

Answer:

17. What you can do now

You can differentiate exponentials and logarithms with composites inside them, and use logarithmic differentiation. Say in your own words what property picks $e$ out from every other base. Next: related rates, the first place the derivative is used rather than computed.

Working for the steps left to you

8. Your turn: differentiate $f(x) = \ln(x^2 + 1)$, step 3