Logarithmic differentiation
Taking logs first
What is the derivative of x^x? The power rule suggests x\cdot x^{x-1}. The exponential rule suggests x^x\ln x. Neither is right. Can you guess what is?
Each rule assumes something stays fixed. The power rule needs a constant exponent, and the exponential rule needs a constant base. In x^x, both change. Below, the ochre line uses whichever rules you tick. Try each one alone, then both, and see which line actually touches the curve.
Drag the point along the curve. The ochre line has the slope your chosen rules give.
Take the log first
The trouble with x^x is the variable exponent. A logarithm brings the exponent down where the product rule can reach it. Take \ln of both sides, then differentiate implicitly:
The left side becomes y'/y by the chain rule, just as in implicit differentiation. The last step multiplies by y and replaces it with the original function.
- 1. Take ln of both sides
Then use the log laws to turn exponents into factors, products into sums and quotients into differences.
- 2. Differentiate both sides
The left side is \tfrac{y'}{y}. The right side is now a sum of simpler terms.
- 3. Multiply by y
Write the answer in terms of x by substituting the original function for y.
Why the answer is a sum
Expand the answer: x^x(\ln x+1)=x^x\ln x+x\cdot x^{x-1}. That is exactly the exponential rule's answer plus the power rule's answer. Each wrong rule found half of the change.
This is not a coincidence. When the base and the exponent both move, the function changes for two reasons at once. Over a tiny step, the change due to the moving base and the change due to the moving exponent simply add. Logarithmic differentiation adds them for you, without asking you to see the split.
Messy products and quotients
The same trick saves work on functions that only involve fixed powers but have many factors. For
the quotient rule inside a product rule is painful. Logs turn it into a sum:
If y can be negative, take \ln|y| instead. Since \tfrac{d}{dx}\ln|y|=\tfrac{y'}{y} as well, the steps do not change.
Solve it step by step
Take logs, differentiate, and evaluate. The score counts steps you answer correctly on the first try.
Common mistakes
- Using one rule on a variable power
Neither the power rule nor the exponential rule applies to x^x. Tick one box above to see how far off each is.
- Misusing the log laws
\ln(x^x)=x\ln x, not (\ln x)^x. And \ln(a+b) does not split, so \ln(x+1) stays as it is.
- Stopping at y′/y
The derivative is y'. Multiply by y, written as the original function.