On this page
Before you start
This page is easier if you are comfortable with:
What Logarithmic differentiation (x^x) means
When the variable is in both the base and the exponent, the power rule and the exponential rule both fail. Take natural logs of both sides, differentiate implicitly, then multiply back by y .
For y = x x : ln y = x ln x , so y 1 d x d y = ln x + 1 , and d x d y = x x ( ln x + 1 ) .
The same method simplifies long products and quotients. It is used for the derivative of a to the power x , depends on implicit differentiation, and the basic step is the derivative of ln x.
This page is part of Differentiation in Calculus . Topics that work alongside it: Derivative of a^x , Implicit differentiation (rule) , Derivative of ln x , Mean value theorem , Leibniz rule for the nth derivative of a product and Intermediate value theorem .
What is it used for? Logarithmic differentiation takes logs of both sides before differentiating. It handles functions such as xˣ, where the variable is in both the base and the power, and long products and quotients.
Differentiating xˣ or (sin x)^x. Differentiating long products and quotients without repeated product rules. Finding the derivative of aˣ.
How to use logarithmic differentiation (x^x)
Take ln of both sides. Use log laws to simplify. Differentiate implicitly. Multiply by y and substitute back.
Graph y = xˣ for x > 0 minimum at x = 1/e 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 2.2 2.4 0 1 2 3 4 5 6 y = xˣ for x > 0 x y y = xˣ Graph with x from 0.05 to 2.5 and y from 0 to 6. Shows the curve y = xˣ; point minimum at x = 1/e at (0.368, 0.692). Logarithmic differentiation gives dy/dx = xˣ(ln x + 1), which is zero at x = 1/e ≈ 0.368. That is the lowest point of the curve.
Worked examples
The examples marked with a button were worked out by the solver on this page. You can try each one yourself.
Example 1: differentiate x^x Differentiate x x .
Try this in the solver: differentiate x^x
Derivative
Answer
x x ( ln ( x ) + 1 ) x^{x} \left(\ln\left(x\right)+1\right) x x ( ln ( x ) + 1 ) Differentiate with respect to x
d x d ( x x )
Rules used
power rule: d x d x n = n x n − 1
Combine the terms
d x d ( x x ) = x x ( ln ( x ) + 1 )
Example 2: differentiate 2^x Differentiate 2 x with the same idea.
Try this in the solver: differentiate 2^x
Derivative
Answer
2 x ln ( 2 ) 2^{x} \ln\left(2\right) 2 x ln ( 2 ) Differentiate with respect to x
d x d ( 2 x )
Rules used
power rule: d x d x n = n x n − 1
Combine the terms
d x d ( 2 x ) = 2 x ln ( 2 )
Example 3: x to the power x again Differentiate x^(2x).
Try this in the solver: differentiate x^(2*x)
Derivative
Answer
2 x 2 x ( ln ( x ) + 1 ) 2 x^{2 x} \left(\ln\left(x\right)+1\right) 2 x 2 x ( ln ( x ) + 1 ) Differentiate with respect to x
d x d ( x 2 x )
Rules used
power rule: d x d x n = n x n − 1 , product rule
Combine the terms
d x d ( x 2 x ) = 2 x 2 x ( ln ( x ) + 1 )
Special cases
A few situations come up again and again. Knowing them saves time and helps you spot answers that cannot be right.
y = xˣ y′ = xˣ(ln x + 1)
Take logs, differentiate implicitly.
At x = 1 y′ = 1
ln 1 = 0.
y = 2ˣ y′ = 2ˣ ln 2
Matches the aˣ rule.
y = x^(2x) y′ = x^(2x)(2 ln x + 2)
ln y = 2x ln x.
Word problems
To differentiate a power with a variable exponent, take ln of both sides, differentiate implicitly, then multiply by y.
y = xˣ Differentiate y = xˣ and find y′ at x = 2 to 4 decimal places.
Take logs ln y = x ln x Differentiate y′/y = ln x + 1 Multiply by y y′ = xˣ(ln x + 1) x = 2 4(1.6931) Check: 6.7726 ✓ 6.7726.
y = 2ˣ Differentiate y = 2ˣ and find y′ at x = 3 to 4 decimal places.
ln y x ln 2 y′/y ln 2 y′ 2ˣ ln 2 Check: 8 ln 2 = 5.5452 ✓ 5.5452.
y = x^(2x) Higher Differentiate y = x^(2x) and find y′ at x = 1.
ln y 2x ln x y′/y 2 ln x + 2 x = 1 1 × 2 Check: 2 ✓ 2.
A product Higher Differentiate y = x²(x + 1)³ by logs at x = 1.
ln y 2 ln x + 3 ln(x + 1) y′/y 2/x + 3/(x + 1) At x = 1 y = 8, y′ = 8 × 3.5 Check: 28 ✓ 28.
Common mistakes
Using the power rule d/dx xˣ = x·x^(x−1) ✗
xˣ(ln x + 1) ✓
The exponent varies.
Forgetting to multiply by y y′ = ln x + 1 ✗
y′ = y(ln x + 1) ✓
Multiply back.
Differentiating ln y as 1/y only d/dx ln y = 1/y ✗
(1/y) dy/dx ✓
Use the chain rule.
Treating xˣ like aˣ d/dx xˣ = xˣ ln x ✗
xˣ(ln x + 1) ✓
Product rule on x ln x.
Exam tips
Take ln of both sides.
Differentiate implicitly.
Multiply by y.
Product rule for x ln x.
Good for products and powers.
Practice questions
Try each one on paper, then open the answer. Use the solver above to see the full working.
1. y = xˣ: find y′ at x = 1 Foundation 1
2. y = 3ˣ: find y′ at x = 0 to 4 decimal places Foundation 1.0986
3. y = 2ˣ: find y′ at x = 1 to 4 decimal places Foundation 1.3863
4. y = xˣ: find y′ at x = 3 to 3 decimal places Higher 56.628
5. y = x^(3x): find y′ at x = 1 Higher 3
6. y = 5ˣ: find y′ at x = 2 to 3 decimal places Higher 40.236
Practice generator Unlimited fresh questions with instant marking. Choose a level, work it out on paper, then type your answer.
Foundation Higher Mixed New question
Solve: …
The practice generator needs JavaScript.
Key terms
Logarithmic differentiation Differentiating ln y. Implicit differentiation Differentiating both sides. Chain rule d/dx ln y = y′/y. Product rule Used on x ln x. Variable exponent x in the power. Natural logarithm ln.
Frequently asked questions
What is logarithmic differentiation? Taking ln first to make differentiating easier.
What is d/dx xˣ? xˣ(ln x + 1).
When do I use it? For variable exponents or long products.
Why multiply by y at the end? Because y′/y was found.
Which page covers aˣ? derivative of aˣ.
Which page covers implicit differentiation? implicit differentiation.