AP Calculus AB and BC
Logarithmic Differentiation: Steps and Worked Examples
Logarithmic differentiation means taking the natural log of both sides of y = f(x), simplifying with log properties, differentiating implicitly, and multiplying by y. Use it when the variable appears in both the base and the exponent, as in x^x, or when a function is a long product, quotient, and power.
When you need it
Two derivative rules deal with exponents, and each one requires part of the expression to be constant. The power rule needs a constant exponent. The exponential rule needs a constant base. A function such as has a variable in both places, so neither rule applies.
| Function | Base | Exponent | Method | Derivative |
|---|---|---|---|---|
| variable | constant | Power rule | ||
| constant | variable | Exponential rule | ||
| variable | variable | Logarithmic differentiation |
Logarithmic differentiation handles the third row. It combines three tools you already have: the derivative of , the chain rule (Topic 3.1, The Chain Rule), and implicit differentiation (Topic 3.2, Implicit Differentiation). The same technique is also a convenient option for a function built from several factors multiplied, divided, and raised to powers, where the product and quotient rules would be long.
The four steps
- Take the natural log of both sides of .
- Expand the right side with logarithm properties until no products, quotients, or powers remain inside a logarithm.
- Differentiate both sides with respect to . The left side, , becomes by the chain rule.
- Multiply both sides by , then replace with the original function.
Step 2 is where the method pays off. Three properties turn multiplication into addition and exponents into coefficients:
The third property is the one that brings a variable exponent down to where the product rule can reach it.
The general pattern for a variable base and exponent
Suppose , where and are both functions of and . Taking logs gives . The right side is a product, so differentiating it takes the product rule:
Multiplying by gives the derivative:
There is no need to memorize this. Running the four steps on each problem is more reliable than recalling the formula. For , and , and the bracket becomes .
The same result by rewriting with e
An equivalent route skips the implicit step. Since for , any power can be rewritten with base :
Now the base is constant and the chain rule applies. The derivative of the exponent is , so
Both methods give the same answer every time. Use whichever you find easier to carry out. The page on the derivative of x to the x works this function in full.
Where students lose points
- Using the power rule on and writing . The power rule requires a constant exponent.
- Using the exponential rule on and writing . The exponential rule requires a constant base.
- Stopping at . The answer is , so multiply by .
- Leaving in the final answer. Replace it with the original expression in .
- Splitting the log of a sum. does not simplify. The properties cover products, quotients, and powers only.
- Forgetting the product rule on when both factors contain .
Domain
The natural log needs a positive input, so the method as written assumes . For a product or quotient that can be negative, take instead. The derivative of is still , so the steps do not change, and the result holds wherever .
For how this technique relates to ordinary implicit differentiation, see logarithmic vs implicit differentiation.
Worked examples
Worked example
A variable base and a variable exponent
Find for , where .
- Take the natural log of both sides: .
- Bring the exponent down: .
- Differentiate both sides. The left side is . The right side is a product: .
- Multiply by : .
- Replace with and factor out the .
Worked example
A trig function raised to a variable power
Find for , where .
- On , is positive, so the logarithm is defined. Take logs: .
- Differentiate the left side: .
- Differentiate the right side with the product rule. The derivative of is by the chain rule, so the right side becomes .
- Multiply by and substitute .
Worked example
A long product and quotient
Let for . Find , then find the slope at .
- Take logs and expand completely: .
- Differentiate both sides term by term: .
- Multiply by and substitute the original function: .
- Evaluate at . The function value is . The bracket is .
- Multiply: .
, and the slope at is .
Frequently asked questions
Why can't I use the power rule on ?
The power rule is derived for a constant exponent . In the exponent changes with , so the rule does not apply. Logarithmic differentiation, or rewriting as , gives the correct derivative .
Do I have to use logarithmic differentiation on products and quotients?
No. For products and quotients it is a convenience, since the product, quotient, and chain rules give the same answer with more algebra. It is required, or replaced by the rewrite, only when a variable appears in both the base and the exponent.
Why does differentiate to ?
Because is a function of , is a composition. The chain rule differentiates the outer function to get , then multiplies by the derivative of the inside, . This is the same step used throughout implicit differentiation.