Differentiating Exponentials and Logarithms

E to the x differentiates to itself.

eˣ is its own derivative

The gradient of any exponential bˣ is its height times a fixed number, and e is the base for which that number is 1. So the gradient of eˣ is its height at every point: the derivative of eˣ is eˣ.

Check at x = 1. The chord from 1 to 1.001 has gradient (e^1.001 − e)/0.001 = 2.7196, and e = 2.7183.

A constant multiple keeps the property: 5eˣ differentiates to 5eˣ. A constant added does not: eˣ + 3 differentiates to eˣ, which is not eˣ + 3. The functions that are their own derivatives are exactly the multiples A eˣ.

Every tangent meets the axis one unit back

At x = a the height of eˣ is eᵃ and so is the gradient. The tangent therefore falls by eᵃ over a run of 1 to the left, and meets the x-axis at x = a − 1. The tangent at x = 1 is y = ex, which passes through the origin, and the tangent at x = 0 is y = x + 1, which meets the x-axis at −1.

xy

The gold curve y = eˣ. Its tangent at (1, e), the gold line y = ex, has gradient e and meets the x-axis at 0. Its tangent at (0, 1), the dashed line y = x + 1, has gradient 1 and meets the x-axis at −1.

The derivative of ln x

ln x is defined for x > 0. If y = ln x, then eʸ = x. Differentiate both sides with respect to x. The right side gives 1. On the left, y is itself a function of x, so eʸ is a function inside a function, with inner function y and outer function eᵘ, and the chain rule gives eʸ × dy/dx.

So eʸ × dy/dx = 1, and dy/dx = 1/eʸ. Since eʸ = x, the derivative of ln x is 1/x, for x > 0.

Check at x = 2: the chord from 2 to 2.001 on y = ln x has gradient (ln 2.001 − ln 2)/0.001 = 0.49988, and 1/2 = 0.5.

What 1/x says about the graph of ln x

For x > 0, 1/x is positive, so ln x rises everywhere it is defined. Near 0 it is steep, with gradient 10 at x = 0.1, and it flattens as x grows, with gradient 0.1 at x = 10, but it is never flat.

At x = 1, ln x = 0 and the gradient is 1, so the tangent there is y = x − 1.

For x < 0, ln x is not defined, but ln(−x) is. With inner function −x, the chain rule gives (1/(−x)) × (−1) = 1/x. So 1/x is the derivative of ln x for x > 0 and of ln(−x) for x < 0; together, of ln|x| for every x ≠ 0.

xy

The gold curve y = ln x, its tangent y = x − 1 at (1, 0) as the gold line, and the dashed curve y = 1/x, the gradient of ln x. At x = 1 the dashed curve is at height 1, the tangent’s gradient; as x grows, ln x flattens and 1/x falls toward 0.

A coefficient in the exponent

For y = e^(kx), the inner function is kx and the outer function is eᵘ. The chain rule gives e^(kx) × k = k e^(kx). So e^(3x) differentiates to 3e^(3x), which is 3 at x = 0.

A negative k gives decay: e^(−2x) differentiates to −2e^(−2x), which is −2e⁻² = −0.2707 at x = 1. The rate of change is −2 times the amount.

An inside that is not linear contributes its own derivative. e^(x²) differentiates to 2x e^(x²), which is 2e = 5.4366 at x = 1.

Logarithms of an inside

For y = ln(x² + 1), the inner function is x² + 1 and the outer function is ln u, with derivative 1/u. So dy/dx = 2x/(x² + 1): the derivative of the inside over the inside. At x = 2 that is 4/5 = 0.8.

For y = ln 5x, the chain rule gives (1/(5x)) × 5 = 1/x. So does the law of logarithms: ln 5x = ln 5 + ln x, and ln 5 is a constant. Multiplying x by a constant shifts the graph of ln up and leaves every gradient as it was.

With the product rule

y = x eˣ is a product, so dy/dx = 1 × eˣ + x × eˣ = (1 + x)eˣ. That is 2e = 5.4366 at x = 1 and 0 at x = −1, where the curve is flat.

y = x ln x, for x > 0, gives dy/dx = 1 × ln x + x × (1/x) = ln x + 1. That is 1 at x = 1 and 2 at x = e.

The usual mistakes

Leaving out the k: e^(3x) differentiates to 3e^(3x), not e^(3x). Only eˣ itself is unchanged.

Bringing the exponent down like a power, as 3x e^(3x). The chain rule multiplies by the derivative of the exponent, 3, not by the exponent.

Giving ln x or x as the derivative of ln x. ln x flattens as x grows, so its gradient falls: it is 1/x.

Writing 1/(5x) for the derivative of ln 5x. The inner derivative 5 cancels the 5, leaving 1/x.

Using 1/x as the gradient of ln x at x ≤ 0, where ln x is not defined.

Practice Differentiating Exponentials and Logarithms in the app