• Foundation
  • About 20 min
  • 5 practice questions

Exponential and logarithmic functions and logarithmic differentiation

Differentiate eˣ, log x, aˣ and their composites, and use logarithmic differentiation for functions such as xˣ and long products and quotients.

If something looks wrong, please tell us.

By the end of this lesson you can

  • Use d/dx eˣ = eˣ and d/dx log x = 1/x (x > 0), with the chain rule.
  • Differentiate aˣ and functions of the form u(x)^v(x) by taking logarithms.
  • Use logarithms to differentiate long products and quotients quickly.

Exponential functions describe growth and decay, and logarithms undo them. Their derivatives are among the simplest in calculus, and logarithms also give a powerful trick: turning powers into products and products into sums before differentiating.

The functions

For a base b > 1, y = bˣ is the exponential function: defined for all real x, always positive, increasing, and passing through (0, 1). Its inverse is the logarithm to base b: log_b a = x means bˣ = a, defined only for a > 0. The most important base is e ≈ 2.718; log x in calculus means the natural logarithm logₑ x. Useful laws (for positive quantities): log(pq) = log p + log q, log(p/q) = log p − log q, log(pⁿ) = n log p, and e^(log x) = x for x > 0 only.

d/dx eˣ = eˣ. d/dx log x = 1/x (x > 0). d/dx aˣ = aˣ log a (a > 0).

— Derivatives to remember

Worked examples with the chain rule

  • d/dx e^(3x) = 3e^(3x).
  • d/dx e^(sin x) = cos x × e^(sin x).
  • d/dx log(cos x) = (1/cos x) × (−sin x) = −tan x, where cos x > 0.
  • d/dx log(x² + 1) = 2x/(x² + 1).
  • d/dx (x² eˣ) = 2x eˣ + x² eˣ = x eˣ(x + 2) (product rule).

Worked example 1: d/dx aˣ. Let y = aˣ with a > 0. Taking logs: log y = x log a. Differentiating: (1/y) dy/dx = log a, so dy/dx = aˣ log a. For example d/dx 2ˣ = 2ˣ log 2. (Equivalently, aˣ = e^(x log a).)

Logarithmic differentiation

For y = [u(x)]^(v(x)) with u(x) > 0, neither the power rule (fixed exponent) nor the exponential rule (fixed base) applies. Take logarithms: log y = v(x) log u(x). Differentiate both sides, using the chain rule on the left: (1/y) dy/dx = v′(x) log u(x) + v(x) u′(x)/u(x). Then multiply by y.

Logarithmic differentiation

  1. Take log of both sides Turns powers into products and products into sums.
  2. Differentiate Left side becomes (1/y) dy/dx.
  3. Multiply by y Then substitute the original expression for y.

Worked example 2. y = xˣ, x > 0. Working: log y = x log x. Differentiating: (1/y) dy/dx = 1 × log x + x × (1/x) = log x + 1. So dy/dx = xˣ(1 + log x).

Worked example 3. y = (1 + x)ˣ, x > 0. Working: log y = x log(1 + x). (1/y) dy/dx = log(1 + x) + x/(1 + x). So dy/dx = (1 + x)ˣ [log(1 + x) + x/(1 + x)].

Worked example 4 (a long quotient). y = (x + 1)²(x + 2)³/(x + 3)⁴, x > 0. Working: log y = 2 log(x + 1) + 3 log(x + 2) − 4 log(x + 3). Differentiating: (1/y) dy/dx = 2/(x + 1) + 3/(x + 2) − 4/(x + 3). So dy/dx = y[2/(x + 1) + 3/(x + 2) − 4/(x + 3)]. Using the quotient rule directly would be far longer.

Worked example 5 (a sum of such terms). y = xˣ + 2ˣ. Logs do not split a sum, so differentiate each term separately: dy/dx = xˣ(1 + log x) + 2ˣ log 2. A common mistake is to take the log of the whole sum and write log y = log xˣ + log 2ˣ, which is wrong.

Choosing the right rule
FunctionMethodDerivative
x⁵ (variable base, fixed power)Power rule5x⁴
5ˣ (fixed base, variable power)aˣ rule5ˣ log 5
xˣ (both vary)Logarithmic differentiationxˣ(1 + log x)
e^(x²)Chain rule2x e^(x²)

Key takeaways: eˣ is its own derivative and log x has derivative 1/x. Use the chain rule for composites. When both base and exponent vary, or for a long product or quotient, take logarithms first, and remember that the functions involved must be positive. Differentiate a sum term by term.

Check your understanding

  1. 1. What is d/dx e^(x² + 3x)?

    1. e^(x² + 3x)
    2. (x² + 3x)e^(x² + 3x − 1)
    3. (2x + 3)e^(x² + 3x)
    4. 2x e^(x² + 3x)
    Show answer

    Answer: C. Chain rule: the exponential stays, multiplied by the derivative of the exponent, 2x + 3.

  2. 2. What is d/dx log(sin x), for 0 < x < π?

    1. cot x
    2. 1/sin x
    3. tan x
    4. −cot x
    Show answer

    Answer: A. (1/sin x) × cos x = cot x.

  3. 3. What is d/dx 3ˣ?

    1. x 3ˣ⁻¹
    2. 3ˣ
    3. 3ˣ/log 3
    4. 3ˣ log 3
    Show answer

    Answer: D. d/dx aˣ = aˣ log a with a = 3. (x 3ˣ⁻¹ wrongly uses the power rule, which needs a fixed exponent.)

  4. 4. If y = x^(2x), x > 0, what is dy/dx?

    1. 2x^(2x)(1 + log x)
    2. 2x · x^(2x − 1)
    3. x^(2x)(2 + log x)
    4. 2x^(2x) log x
    Show answer

    Answer: A. log y = 2x log x. (1/y) dy/dx = 2 log x + 2x × (1/x) = 2 log x + 2. So dy/dx = 2x^(2x)(1 + log x).

  5. 5. Assertion (A): For y = xˣ + 2ˣ, logarithmic differentiation of the whole expression starts with log y = x log x + x log 2.
    Reason (R): The logarithm of a sum is not the sum of the logarithms.

    1. Both A and R are true, and R is the correct explanation of A
    2. Both A and R are true, but R is not the correct explanation of A
    3. A is true but R is false
    4. A is false but R is true
    Show answer

    Answer: D. A is false: log(xˣ + 2ˣ) is not log(xˣ) + log(2ˣ). R is true and is exactly why A fails; each term must be differentiated separately.

Privacy · Terms · Refunds · Delivery