OpenStax Calculus 1

Chapter 3: Derivatives

3.9 Derivatives of Exponential and Logarithmic Functions

Study guide for Calculus Volume 1 (Gilbert Strang, 2016 edition)

Independent study guide. Not affiliated with OpenStax or Rice University.

Big idea

Exponential functions are the last major family to get a derivative, and they behave unlike anything before them. Run the limit definition on $b^x$ and the algebra factors out $b^x$ immediately, leaving $b^x$ multiplied by a limit that involves $b$ but not $x$. So the derivative of an exponential function is a constant multiple of the function itself, and the only question is what that constant is.

The number $e$ is defined to make the constant equal to $1$. With that base, the function is its own derivative: the height of the graph and its steepness agree at every point. Every other exponential base inherits a factor of $\ln b$, which is where the natural logarithm first shows up in a differentiation formula and why calculus prefers base $e$ to base $10$ even when the application does not.

The logarithm then comes free, because it inverts the exponential. Applying the inverse function rule to $e^x$ turns the derivative $e^x$ upside down and converts it back to the variable, giving the clean statement that the derivative of $\ln x$ is $1/x$. That formula fills the one gap the power rule left open, since $1/x$ is the only power whose antiderivative the power rule cannot produce.

The logarithm is also a computational tool, not just another function to differentiate. Taking a logarithm turns products into sums, quotients into differences, and exponents into coefficients. Differentiating after that transformation is far easier than differentiating before it, and it is the only way to handle a function with a variable in both the base and the exponent.

Decoder

The exponential function with base $e$ is its own derivative, and the natural logarithm has derivative $1/x$; for any other base the two formulas pick up a factor of $\ln b$, multiplying in one case and dividing in the other.

The phrase “its own derivative” is the defining property, not a coincidence to memorize. It says the function grows at a rate equal to its current size, which is the mathematical content of every compound interest, radioactive decay and population model you will meet.

The factor $\ln b$ lands on top for exponentials and on the bottom for logarithms, and the placement is forced by the inverse relationship: reciprocal slopes mean a factor that multiplies one derivative must divide the other. For $b = e$ the factor is $\ln e = 1$, and both formulas simplify to the ones worth remembering first.

The classic mistake is applying the power rule to an exponential. In $x^n$ the variable is the base and the exponent is fixed; in $b^x$ the base is fixed and the variable is the exponent. These are different functions with different rules, and $x^x$ is a third thing again, obeying neither. Identify which slot holds the variable before choosing a rule.

Definitions and results

The natural exponential.

$$ \frac{d}{dx}e^{x} = e^{x}, \qquad \frac{d}{dx}e^{\,u} = e^{\,u}\,\frac{du}{dx} $$

A general base. For $b > 0$ with $b \ne 1$,

$$ \frac{d}{dx}b^{x} = b^{x}\ln b $$

The natural logarithm. For $x > 0$,

$$ \frac{d}{dx}\ln x = \frac{1}{x}, \qquad \frac{d}{dx}\ln u = \frac{1}{u}\,\frac{du}{dx} $$

Absolute values. The formula $\frac{d}{dx}\ln|x| = \frac{1}{x}$ holds for every $x \ne 0$, which is what lets the logarithm serve as an antiderivative on both sides of the origin.

A general logarithm base. For $b > 0$ with $b \ne 1$ and $x > 0$,

$$ \frac{d}{dx}\log_b x = \frac{1}{x\ln b} $$

Why the logarithm rule follows from the exponential rule. Writing $y = \ln x$ means $e^{y} = x$. Differentiating both sides gives $e^{y}\frac{dy}{dx} = 1$, and since $e^{y} = x$ this is $\frac{dy}{dx} = 1/x$.

Logarithmic differentiation. To differentiate a complicated product, quotient or power: take the natural logarithm of both sides, use the log laws to break the expression apart, differentiate implicitly to get $\frac{y'}{y}$ on the left, and multiply through by $y$ at the end, substituting the original expression.

Variable base and variable exponent. For $y = f(x)^{g(x)}$ with $f(x) > 0$, no power or exponential rule applies directly; logarithmic differentiation is the method. The standard case gives

$$ \frac{d}{dx}x^{x} = x^{x}\big(\ln x + 1\big) $$

Worked examples

Exponentials with the chain and product rules

Differentiate $y = e^{3x^2}$. The outer function is the exponential, whose derivative is itself, and the inner derivative is $6x$:

$$ \frac{dy}{dx} = 6x\,e^{3x^2} $$

For a different base, $y = 5^{x}$ gives $\frac{dy}{dx} = 5^{x}\ln 5$. And for a product, $y = x^2 e^{x}$ needs the product rule:

$$ \frac{dy}{dx} = 2x e^{x} + x^{2}e^{x} = x e^{x}(x + 2) $$

Since $e^x$ is never zero, the derivative vanishes only at $x = 0$ and $x = -2$, which are the two horizontal tangents on that curve.

Logarithms, with a tangent line

Differentiate $y = \ln(x^2 + 1)$. The inner function is $x^2+1$, so

$$ \frac{dy}{dx} = \frac{2x}{x^2+1} $$

Now differentiate $y = x^2\ln x$ using the product rule, and find the tangent at $x = 1$:

$$ \frac{dy}{dx} = 2x\ln x + x^{2}\cdot\frac{1}{x} = 2x\ln x + x $$

At $x = 1$ the logarithm is zero, so the point is $(1, 0)$ and the slope is $0 + 1 = 1$. The tangent line is $y = x - 1$.

A variable in both slots

Differentiate $y = x^{x}$ for $x > 0$. Take logarithms of both sides and use the law that moves an exponent out front:

$$ \ln y = x\ln x $$

Differentiate both sides with respect to $x$, treating the left as an implicit function:

$$ \frac{1}{y}\cdot\frac{dy}{dx} = \ln x + x\cdot\frac{1}{x} = \ln x + 1 $$

Multiply by $y$ and substitute:

$$ \frac{dy}{dx} = x^{x}\big(\ln x + 1\big) $$

Check at $x = 1$: the formula predicts a slope of $1 \cdot (0 + 1) = 1$. Numerically, $1.01^{1.01} \approx 1.01010$, and the change of about $0.01010$ over a step of $0.01$ is a slope near $1.01$, closing in on the predicted value as the step shrinks.

Taming a product and a quotient

Differentiate

$$ y = \frac{x^{3}\sqrt{2x+1}}{x^{2}+4} $$

The quotient rule with a product and a root inside it would be a long calculation. Logarithms flatten it first:

$$ \ln y = 3\ln x + \tfrac{1}{2}\ln(2x+1) - \ln(x^2+4) $$

Now every term differentiates in one step:

$$ \frac{1}{y}\cdot\frac{dy}{dx} = \frac{3}{x} + \frac{1}{2x+1} - \frac{2x}{x^2+4} $$

Multiplying by $y$ gives the answer:

$$ \frac{dy}{dx} = \frac{x^{3}\sqrt{2x+1}}{x^{2}+4}\left(\frac{3}{x} + \frac{1}{2x+1} - \frac{2x}{x^2+4}\right) $$

The three terms on the right correspond exactly to the three factors of the original, with the division contributing the minus sign. Leaving the answer in this form is standard; forcing it over a common denominator gains nothing.

Practice

Start with the formulas themselves, combined with the product, quotient and chain rules. Decide first whether the variable sits in the base or the exponent.

Practice

Generated problems for this section, graded instantly.

Then the technique. Take logarithms, expand with the log laws, differentiate implicitly, and remember to multiply by the original expression at the end.

Practice

Generated problems for this section, graded instantly.

Quiz

Five items on derivatives of exponential and logarithmic functions and on logarithmic differentiation.

Quiz

5 problems with a score at the end.