§ 01Why Do We Need This?
The power rule differentiates x raised to a constant. It cannot handle a variable raised to a variable, and that is exactly where logarithmic differentiation steps in.
Consider the function y = xx. It looks similar to xn, but the exponent itself depends on x. Neither the power rule (which needs a constant exponent) nor the exponential rule (which needs a constant base) applies directly. The same problem shows up whenever you must differentiate a product or quotient of many factors, since repeatedly applying the product rule becomes long and error-prone.
2) y = f₁(x)·f₂(x)···fₙ(x) (long products)
3) y = f(x)/g(x) when several quotients or roots are nested together
None of these are new functions to learn, logarithmic differentiation is a technique for organising work you already know how to do (implicit differentiation and the chain rule), applied after taking a logarithm.
§ 02Derivation — Why Taking Logarithms Works
The method relies on one identity from logarithms and one application of implicit differentiation.
Start with any positive function y = f(x) and take the natural log of both sides:
Now differentiate both sides with respect to x. The left side needs the chain rule, since y is itself a function of x:
That last line is the entire trick in one formula: differentiate the log of the function, then multiply by the original function. The payoff comes from log rules, which turn the right-hand side into something simple before you differentiate it.
§ 03The 3-Step Method
Every logarithmic differentiation problem follows the same three moves, regardless of how complicated f(x) looks.
Logarithmic Differentiation — 3 Steps
-
Take ln of both sides and expand using log rules. ln y = ln f(x) → expand products, quotients, and powers into sums
-
Differentiate both sides with respect to x. The left side always gives y′/y (chain rule). Differentiate the expanded right side term by term.
-
Multiply both sides by y, then substitute the original f(x) back in. y′ = y · [expanded derivative] = f(x) · [expanded derivative] The final answer should be written entirely in terms of x, not y.
§ 04The Variable-Exponent Case: y = f(x)g(x)
This is the signature use of logarithmic differentiation, a case the power rule and exponential rule cannot touch on their own.
Applying the log rule ln(an) = n·ln a to y = f(x)g(x) gives:
Differentiating the right side now needs the product rule (since g(x) and ln f(x) are both functions of x), plus the chain rule on ln f(x):
§ 05Formula Lookup Tool
Pick a common variable-exponent form and see the differentiated result instantly, derived by the method above.
y = f(x)g(x) — Common Forms
§ 06Worked Examples
Eight examples spanning variable exponents, long products, and quotients with roots.
Differentiate: y = xx (x > 0)
Differentiate: y = xsin x (x > 0)
Differentiate: y = (sin x)x (0 < x < π)
Differentiate: y = x·(x+1)·(x+2) using logarithmic differentiation.
Expanding by the product rule directly would need three applications of the two-factor rule; the log method needs only one differentiation pass.
Differentiate: y = √(x²+1) / (x+3)²
Differentiate: y = (x²+1)x
For y = xx, find y′(1) and y′(e).
Notice y′(1) = 1 confirms the graph of x^x is momentarily as steep as the line y = x at that point.
Differentiate: y = [x²(x−1)³] / (x+4)
§ 07Common Mistakes
§ 08Practice Quiz — 10 Questions
Apply the 3-step method. Some questions ask for the intermediate step, others for the final derivative.
For y = x³(x+1)², what is ln y after expansion?
The derivative of ln y with respect to x (where y is a function of x) is:
Using y′ = x^x(ln x + 1), find y′(1).
ln(a/b) equals:
For y = f(x)^g(x), the correct formula for y′/y is:
- ln y = g(x)ln f(x)
- Differentiate with the product rule on the right: y′/y = g′(x)ln f(x) + g(x)·f′(x)/f(x)
If y = √(x+5), then ln y = ½ln(x+5). What is y′/y?
For y = x/(x+2), logarithmic differentiation gives ln y = ln x − ln(x+2). What is y′/y?
Using y′ = (sin x)^x[ln(sin x) + x·cot x], what happens as x → 0⁺ (does y′ stay finite, or blow up)?
- As x → 0⁺, sin x → 0⁺, so ln(sin x) → −∞.
- Although (sin x)^x → 1 in that limit, the ln(sin x) term dominates and the product diverges, a reminder to check domains and limits, not just algebra.
Which function requires logarithmic differentiation rather than the ordinary power or exponential rule?
For y = (x²+1)x, evaluate y′(0) using y′ = (x²+1)^x[ln(x²+1) + 2x²/(x²+1)].
§ 09What to Study Next
Logarithmic differentiation is the natural companion to implicit differentiation and the chain rule. Continue with:
- Implicit Differentiation, the technique that logarithmic differentiation is built on.
- Log Derivatives, the basic derivatives of ln x and log₀x used throughout this page.
- Chain Rule: needed for every ln f(x) term you differentiate.
- Exponential Derivatives, the constant-exponent counterpart to this page.