- 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).
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
- Take log of both sides Turns powers into products and products into sums.
- Differentiate Left side becomes (1/y) dy/dx.
- 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.
| Function | Method | Derivative |
|---|---|---|
| x⁵ (variable base, fixed power) | Power rule | 5x⁴ |
| 5ˣ (fixed base, variable power) | aˣ rule | 5ˣ log 5 |
| xˣ (both vary) | Logarithmic differentiation | xˣ(1 + log x) |
| e^(x²) | Chain rule | 2x 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. What is d/dx e^(x² + 3x)?
- e^(x² + 3x)
- (x² + 3x)e^(x² + 3x − 1)
- (2x + 3)e^(x² + 3x)
- 2x e^(x² + 3x)
Show answer
Answer: C. Chain rule: the exponential stays, multiplied by the derivative of the exponent, 2x + 3.
-
2. What is d/dx log(sin x), for 0 < x < π?
- cot x
- 1/sin x
- tan x
- −cot x
Show answer
Answer: A. (1/sin x) × cos x = cot x.
-
3. What is d/dx 3ˣ?
- x 3ˣ⁻¹
- 3ˣ
- 3ˣ/log 3
- 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. If y = x^(2x), x > 0, what is dy/dx?
- 2x^(2x)(1 + log x)
- 2x · x^(2x − 1)
- x^(2x)(2 + log x)
- 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. 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.- Both A and R are true, and R is the correct explanation of A
- Both A and R are true, but R is not the correct explanation of A
- A is true but R is false
- 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.
Sign in to keep track of the lessons you finish.