2.8 Logarithmic Differentiation
When a function has variables in both the base and the exponent—such as y = x^x or y = (sin x)^(cos x)—neither the Power Rule (constant exponent) nor the Exponential Rule (constant base) applies. Logarithmic differentiation solves this by taking the natural logarithm of both sides first to bring the variable exponent down as a product.
Core Concept & Mathematical Foundation
Taking the natural logarithm converts exponentiation into multiplication (ln(u^v) = v ln u) and multi-factor products/quotients into sums and differences (ln(AB/C) = ln A + ln B - ln C). Differentiating implicitly with respect to x gives y'/y on the left and a straightforward derivative on the right; multiplying through by the original function y = f(x) isolates y'.
The Three-Step Logarithmic Differentiation Procedure
Example 1: Differentiating a Variable-Base, Variable-Exponent Function y = x^x
Use logarithmic differentiation to find the derivative of \(y=x^x\) for \(x>0\).
Show solution
Take the natural logarithm of both sides and bring the exponent \(x\) down:
Differentiate both sides with respect to \(x\) using the Product Rule on the right:
Graphical & Numerical Behavior
Comparing a table of numerical values directly alongside the plotted curve reveals how the formula behaves across key points, zeros, and turning points.
| x | y = x^x | ln x + 1 | y' = x^x (ln x + 1) | Behavior |
|---|---|---|---|---|
| 0.2 | 0.725 | -0.609 | -0.442 | Decreasing |
| 1/e ≈ 0.368 | 0.692 | 0.000 | 0.000 | Horizontal tangent (Min) |
| 1.0 | 1.000 | 1.000 | 1.000 | Increasing |
| 2.0 | 4.000 | 1.693 | 6.773 | Rapidly increasing |
Graph of y = x^x for x > 0 showing its minimum at x = 1/e ≈ 0.368
Example 2: Differentiating y = x^(sin x)
Find \(\frac{dy}{dx}\) for \(y=x^{\sin x}\) (\(x>0\)).
Show solution
Take \(\ln y=\sin x\,\ln x\) and differentiate implicitly with respect to \(x\):
Companion Function & Advanced Applications
The companion graph below illustrates the secondary curve (derivative curve y' = x^x(ln x + 1) crossing zero at x = 1/e) and highlights the points where the analytical criterion takes effect.
Derivative curve y' = x^x(ln x + 1) crossing zero at x = 1/e
Example 3: Simplifying a Multi-Factor Quotient with Logarithmic Differentiation
Use logarithmic differentiation to find \(y'\) for \(y=\frac{(x+1)^4(x-2)^3}{(x^2+1)^2}\).
Show solution
Expand \(\ln y\) into a sum and difference of logarithms before differentiating:
Common Mistakes to Avoid
- Never use the Power Rule or Exponential Rule alone on \(u(x)^{v(x)}\): Both the base and exponent are changing; logarithmic differentiation is required.
- Do not forget to multiply by \(y\) at the end: The left side differentiates to \(y'/y\), so you must multiply the right side by the original expression for \(y\).
- Expand all logarithm laws before differentiating: The entire advantage of logarithmic differentiation comes from expanding \(\ln(AB/C)\) first.
Key Takeaways
- When a function has variables in both the base and the exponent—such as y = x^x or y = (sin x)^(cos x)—neither the Power Rule (constant exponent) nor the Exponential Rule (constant base) applies. Logarithmic differentiation solves this by taking the natural logarithm of both sides first to bring the variable exponent down as a product.
- Core Formula: \(\text{1. }\ln y=\ln f(x)\quad\longrightarrow\quad\text{2. }\frac{y'}{y}=\frac{d}{dx}\big[\ln f(x)\big]\quad\longrightarrow\quad\text{3. }y'=f(x)\cdot\frac{d}{dx}\big[\ln f(x)\big]\).
- Taking the natural logarithm converts exponentiation into multiplication (ln(u^v) = v ln u) and multi-factor products/quotients into sums and differences (ln(AB/C) = ln A + ln B - ln C). Differentiating implicitly with respect to x gives y'/y on the left and a straightforward derivative on the right; multiplying through by the original function y = f(x) isolates y'.