Skip to main content
Mathovia

Calculus / Calculus 1 · Derivatives

Logarithmic Differentiation

Logarithmic differentiation takes the natural log of both sides before differentiating. The log rules turn products into sums and powers into multiples, which makes it the go-to method for messy products and quotients and the only practical way to differentiate functions like xˣ.

Practice Problems
Written by
MPhil in Mathematics, Founder of Mathovia
Published

Mathematics verification: Mathematical formulas, calculations, worked examples and solutions are reviewed for accuracy before publication. How we check our work

What’s the derivative of ? It looks like it should be easy, but none of the rules so far fit: it isn’t a power of with a fixed exponent, and it isn’t a fixed number raised to the . Logarithmic differentiation handles it in three lines, and the same trick turns big products and quotients, which would take a page of product and quotient rules, into a quick sum.

The idea of logarithmic differentiation: dy by dx equals y times the derivative of ln y. Applied to x to the x, the derivative is x to the x times ln x plus 1
Differentiate ln y instead of y, then multiply back by y

Why the Usual Rules Don’t Work on xˣ

Three cards. Variable in the base only, x cubed: use the power rule to get 3x squared. Variable in the exponent only, 3 to the x: use the exponential rule to get 3 to the x times ln 3. Variable in both, x to the x: neither rule works, take ln first
Where the variable sits decides the rule

You already have a rule for a variable in the base, the power rule: . And you have one for a variable in the exponent, from the derivatives of exponential functions: . But each rule depends on the other part being a constant. In both parts change, so neither rule applies.

The way out is a logarithm. Taking brings the exponent down to the ground floor, where it’s just a factor you can handle with the product rule.

How to Do Logarithmic Differentiation: 4 Steps

  1. Take of both sides of .
  2. Expand with the logarithm rules: , , and .
  3. Differentiate both sides with respect to . The left side, , becomes by the chain rule, just as in implicit differentiation.
  4. Multiply both sides by , then replace with the original function.

Step 4 is the one people forget. After step 3 you’ve found , not .

Example 1: The Derivative of x to the x

Graph of y equals x to the x for x greater than 0. It starts near 0, 1, dips to a lowest point at x equals 1 over e, about 0.37, where the tangent line is horizontal, passes through 1, 1 with slope 1, and rises steeply through 2, 4
y = xˣ dips to its lowest point at x = 1/e, exactly where ln x + 1 = 0

Find for , where .

Take logs and bring the exponent down:

Differentiate. The right side is a product, so use the product rule:

Multiply by :

The graph confirms it. At the formula gives , and the tangent line there does have slope 1. The derivative is zero when , that is at , and that’s exactly where the curve bottoms out.

Here’s a nice check on the answer. Expand it: . The first piece is what the exponential rule would have given, and the second is what the power rule would have given. Each wrong method gets half the answer, and the true derivative is the two halves added together.

Example 2: A Messy Product and Quotient

Find for .

The quotient rule would work, with the product rule inside the numerator and the chain rule inside that. Logs are faster. Expand completely before differentiating:

Each term is now a simple log, so differentiate term by term:

Multiply by :

Leaving the answer in this ” times a bracket” form is standard. Every factor of the original function shows up as one simple term in the bracket.

Example 3: A Variable Power of sin x

Find for , where .

Product rule on the right:

Example 4: A Function Raised to a Power of x

Find for .

The product rule, with the chain rule for :

Example 5: Where Is x^(1/x) Largest?

Graph of y equals x to the power 1 over x. It rises steeply, reaches a highest point at x equals e where y equals e to the 1 over e, about 1.44, with a horizontal tangent line, then slowly decreases toward 1
The xth root of x is largest when x = e

Find where has a horizontal tangent line.

This is the th root of : , , . It seems to peak somewhere around 3. Logarithmic differentiation finds exactly where:

So . Since is never zero, only when , at . The peak value is . The number turns up again.

Example 6: The Power Rule for Any Exponent

The power rule lesson said that holds for every real , even irrational ones like , but left the proof for later. Here it is, for . Let :

Three lines, and it works for any constant at all.

The Logarithmic Derivative

The quantity that appears in step 3 has a name: the logarithmic derivative of , because it equals . It measures the relative rate of change, how fast changes as a fraction of its current size. That’s why it shows up in growth rates: a population with is growing by 3 percent per unit of time.

Its most useful property is the one Example 2 relied on: the logarithmic derivative of a product is the sum of the logarithmic derivatives of the factors. For ,

Multiply through by and you get : the product rule, derived from logs.

When to Use Logarithmic Differentiation

  • The variable is in the base and the exponent: , , . Here it’s essentially required.
  • A long product or quotient, especially with powers and roots, like Example 2.
  • Not for simple functions. For , the product rule is quicker than taking logs.

Common Mistakes

  • Forgetting to multiply by at the end. Step 3 gives ; the derivative is times that.
  • Writing . It’s , because depends on .
  • Inventing log rules. does not split into . Only products, quotients and powers expand.
  • Using the power rule on . is only half of the answer.
  • Leaving in the final answer. Replace it with the original function.

Practice Problems

Try each one before opening the answer. The practice set has 12 more with instant checking.

Problem 1. Differentiate .

Show answer

, so .

Answer:

Problem 2. Differentiate .

Show answer

, so .

Answer:

Problem 3. Differentiate .

Show answer

, so .

Answer:

Problem 4. Differentiate .

Show answer

, so .

Answer:

Problem 5. Find the slope of at .

Show answer

, so at : .

Answer:

That’s the last of the differentiation techniques in this chapter. What’s left is putting them to work: higher-order derivatives, and finding tangent lines to any curve you can now differentiate.

Frequently Asked Questions

What is logarithmic differentiation?+

Logarithmic differentiation is a method for finding derivatives by taking the natural log of both sides of , simplifying with the log rules, and then differentiating implicitly. It is used for functions with a variable in both the base and the exponent, like , and for long products and quotients.

How do you do logarithmic differentiation?+

1. Take of both sides of . 2. Use the log rules to break into sums and multiples. 3. Differentiate both sides; the left side becomes . 4. Multiply both sides by , and replace with the original function.

What is the derivative of x to the x?+

The derivative of is . Take logs: . Differentiating gives , and multiplying by gives the answer.

When should you use logarithmic differentiation?+

Use it when the variable appears in both the base and the exponent, such as , or , and when a function is a long product or quotient of factors with powers, where the product and quotient rules would be messy.

What is a logarithmic derivative?+

The logarithmic derivative of a function is , which is the derivative of . Its useful property is that the logarithmic derivative of a product is the sum of the logarithmic derivatives of its factors.

Why can't you use the power rule on x^x?+

The power rule only works when the exponent is a constant, and the exponential rule only works when the base is a constant. In both change, so neither applies. In fact, the correct derivative is the two wrong answers added together.

Does logarithmic differentiation work if the function is negative?+

Yes. Strictly you take , which is defined wherever , and its derivative is still . The steps and the final answer are exactly the same.

Related lessons