Logarithmic Differentiation Calculator
This Logarithmic Differentiation Calculator differentiates a power whose base and exponent both contain x, such as x to the x, and shows the working line by line. Neither the power rule nor the exponential rule works on its own here, so the natural log of both sides is taken first. The log rule brings the power down in front, both sides are differentiated, and the result is multiplied back by the original function. Following the same pattern every time keeps the extra factor from being forgotten at the end.
Step-by-step method
- Set up the problem.
- Write the logarithmic differentiation formula.
- Take the natural log of both sides.
- Differentiate both sides, as Step 4a, Step 4b and Step 4c.
- Multiply both sides by y and put y back.
Formula: Logarithmic Differentiation
For a power whose base and exponent both contain x, take ln of both sides, differentiate, then multiply back by the original function.
Useful Tips to Remember
Take the natural log of both sides, use the log laws to break products, quotients and powers apart, then differentiate both sides. The left side becomes \(\frac{1}{y}\frac{dy}{dx}\) by the chain rule. Multiply by \(y\) at the end and replace it with the original function. This method is needed for functions like \(x^x\), where the variable is in both the base and the exponent.
Required knowledge
- How to differentiate ln(x), covered in the Logarithmic Derivative Calculator.
- How to differentiate two functions multiplied together, covered in the Product Rule Calculator.
- How to differentiate a function inside another function, covered in the Chain Rule Calculator.
Where Is Logarithmic Differentiation Used?
Logarithmic differentiation takes the natural log of both sides before differentiating, which turns products, quotients and powers into sums and differences. It is the standard method for functions with a variable in both the base and the exponent, like \(x^x\), which no other basic rule can handle. It also simplifies derivatives of long products and quotients, such as formulas in physics, chemistry and economics with many multiplied factors. Economists use the same idea to find growth rates and elasticities from models built on multiplication.
- Differentiating functions like \(x^x\) and \(x^{\sin x}\)
- Simplifying derivatives of long products and quotients
- Finding growth rates in economic models
- Working with multiplied factors in physics formulas
- Checking derivatives found with the product and quotient rules
Logarithmic Differentiation Practice Problems
Example 1 differentiates \(y = x^x\), and Example 2 differentiates \(y = x^{\sin x}\). Try taking logs of both sides yourself before opening each example. For two more free worked examples, check out the Logarithmic Differentiation Notes.
The worked examples below go through the same pattern from start to finish, so you can compare every step with your own working. For more practice, the notes page goes further with extra worked examples and fuller explanations of the ideas behind each step. Use them together to check your answers and to understand why each step works.
See Example 1 Hide Example 1
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the logarithmic differentiation formula.
- Take the natural log of both sides.
- Differentiate both sides, as Step 4a, Step 4b and Step 4c.
- Multiply both sides by y and put y back.
Formula
Formula: Logarithmic Differentiation
For a power whose base and exponent both contain x, take ln of both sides, differentiate, then multiply back by the original function.
Step 1
Step 1 - Set up the problem.
In this problem: Both the base \(x\) and the power \(x\) contain \(x\), so neither the power rule nor the exponential rule works on its own. Taking the natural log of both sides brings the power down.
Step 2
Step 2 - Write the logarithmic differentiation formula.
In this problem: Take ln of both sides, differentiate, then multiply back by the original function.
Step 3
Step 3 - Take the natural log of both sides.
In this problem: The log rule \(\ln\left(a^{b}\right) = b \ln(a)\) brings the power down in front of the log.
Step 4
Step 4 - Differentiate both sides, as Step 4a, Step 4b and Step 4c.
In this problem: Differentiate the left side and the right side separately.
Step 4a
Step 4a - Differentiate the left side.
In this problem: y depends on \(x\), so by the chain rule the derivative of \(\ln y\) is \(\frac{1}{y}\) times \(\frac{dy}{dx}\).
Step 4b
Step 4b - Differentiate the right side.
In this problem: The right side is \(x \ln\left(x\right)\).
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the product rule formula.
- Differentiate the first factor.
- Differentiate the second factor.
- Substitute into the product rule formula.
- Simplify the result.
Step 1
Step 1 - Set up the two factors f(x) and g(x).
In this problem: The first factor is \(x\) and the second factor is \(\ln\left(x\right)\).
Step 2
Step 2 - Write the product rule formula.
In this problem: The derivative of a product is the derivative of the first times the second, plus the first times the derivative of the second.
Step 3
Step 3 - Differentiate the first factor.
In this problem: Differentiate \(x\) to get \(1\).
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the variable rule formula.
- Apply the variable rule.
Step 1
Step 1 - Set up the problem.
In this problem: We are given \(x\). This is just the variable \(x\).
Step 2
Step 2 - Write the variable rule formula.
In this problem: The variable rule says the derivative of \(x\) with respect to \(x\) is \(1\).
Step 3
Step 3 - Apply the variable rule.
In this problem: Put \(x\) into the rule from Step 2, so its derivative is \(1\).
Final Answer
Step 4
Step 4 - Differentiate the second factor.
In this problem: Differentiate \(\ln\left(x\right)\) to get \(\frac{1}{x}\).
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the derivative rule for the natural logarithm.
- Apply the derivative rule.
Step 1
Step 1 - Identify the logarithmic function and any constant multiple.
In this problem: The function is \(\ln\left(x\right)\).
Step 2
Step 2 - Write the derivative rule for the natural logarithm.
In this problem: The derivative of the natural logarithm is one over x.
Step 3
Step 3 - Apply the derivative rule.
In this problem: Put \(\ln\left(x\right)\) into the rule from Step 2.
Final Answer
Step 5
Step 5 - Substitute into the product rule formula.
In this problem: Substitute the factors and their derivatives into the formula.
Step 6
Step 6 - Simplify the result.
In this problem: Expand the products and combine like terms.
Final Answer
Step 4c
Step 4c - Put both sides back together.
In this problem: The two derivatives are equal, because the two sides were equal.
Step 5
Step 5 - Multiply both sides by y and put y back.
In this problem: Multiplying both sides by y leaves \(\frac{dy}{dx}\) on its own. Then y is replaced with \(x^{x}\).
Final Answer
See Example 2 Hide Example 2
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the logarithmic differentiation formula.
- Take the natural log of both sides.
- Differentiate both sides, as Step 4a, Step 4b and Step 4c.
- Multiply both sides by y and put y back.
Formula
Formula: Logarithmic Differentiation
For a power whose base and exponent both contain x, take ln of both sides, differentiate, then multiply back by the original function.
Step 1
Step 1 - Set up the problem.
In this problem: Both the base \(x\) and the power \(\sin{\left(x \right)}\) contain \(x\), so neither the power rule nor the exponential rule works on its own. Taking the natural log of both sides brings the power down.
Step 2
Step 2 - Write the logarithmic differentiation formula.
In this problem: Take ln of both sides, differentiate, then multiply back by the original function.
Step 3
Step 3 - Take the natural log of both sides.
In this problem: The log rule \(\ln\left(a^{b}\right) = b \ln(a)\) brings the power down in front of the log.
Step 4
Step 4 - Differentiate both sides, as Step 4a, Step 4b and Step 4c.
In this problem: Differentiate the left side and the right side separately.
Step 4a
Step 4a - Differentiate the left side.
In this problem: y depends on \(x\), so by the chain rule the derivative of \(\ln y\) is \(\frac{1}{y}\) times \(\frac{dy}{dx}\).
Step 4b
Step 4b - Differentiate the right side.
In this problem: The right side is \(\ln\left(x\right) \sin{\left(x \right)}\).
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the product rule formula.
- Differentiate the first factor.
- Differentiate the second factor.
- Substitute into the product rule formula.
- Simplify the result.
Step 1
Step 1 - Set up the two factors f(x) and g(x).
In this problem: The first factor is \(\ln\left(x\right)\) and the second factor is \(\sin{\left(x \right)}\).
Step 2
Step 2 - Write the product rule formula.
In this problem: The derivative of a product is the derivative of the first times the second, plus the first times the derivative of the second.
Step 3
Step 3 - Differentiate the first factor.
In this problem: Differentiate \(\ln\left(x\right)\) to get \(\frac{1}{x}\).
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the derivative rule for the natural logarithm.
- Apply the derivative rule.
Step 1
Step 1 - Identify the logarithmic function and any constant multiple.
In this problem: The function is \(\ln\left(x\right)\).
Step 2
Step 2 - Write the derivative rule for the natural logarithm.
In this problem: The derivative of the natural logarithm is one over x.
Step 3
Step 3 - Apply the derivative rule.
In this problem: Put \(\ln\left(x\right)\) into the rule from Step 2.
Final Answer
Step 4
Step 4 - Differentiate the second factor.
In this problem: Differentiate \(\sin{\left(x \right)}\) to get \(\cos{\left(x \right)}\).
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the derivative rule for that trigonometric function.
- Apply the derivative rule.
Step 1
Step 1 - Identify the trigonometric function and any constant multiple.
In this problem: The function is \(\sin{\left(x \right)}\).
Step 2
Step 2 - Write the derivative rule for that trigonometric function.
In this problem: The derivative of \(\sin{\left(x \right)}\) is \(\cos{\left(x \right)}\).
Step 3
Step 3 - Apply the derivative rule.
In this problem: Put \(\sin{\left(x \right)}\) into the rule from Step 2.
Final Answer
Step 5
Step 5 - Substitute into the product rule formula.
In this problem: Substitute the factors and their derivatives into the formula.
Step 6
Step 6 - Simplify the result.
In this problem: Expand the products and combine like terms.
Final Answer
Step 4c
Step 4c - Put both sides back together.
In this problem: The two derivatives are equal, because the two sides were equal.
Step 5
Step 5 - Multiply both sides by y and put y back.
In this problem: Multiplying both sides by y leaves \(\frac{dy}{dx}\) on its own. Then y is replaced with \(x^{\sin{\left(x \right)}}\).
Final Answer
Notes and Practice Mode
Want to understand the method more deeply? The Logarithmic Differentiation Notes go through the same pattern with extra worked examples and fuller explanations of the ideas behind each step, so you can see why every step works and not just what to do. When you are ready to test yourself, Logarithmic Differentiation Practice gives you a new problem at Easy, Medium or Hard level, checks your answer and shows the full working whenever you get one wrong. Practice Mode is available on the Plus and Pro plans.
Login and upgrade to Plus to unlock the full step solution.
Example Problems
Click one to load it into the box and solve it.