Derivative of x^x
x^x breaks both the power rule and the exponential rule — the base and the exponent are both variables — so it demands the heaviest tool in the kit: logarithmic differentiation.
Step-by-step solution
Let y = xx. Then ln y = x ln x — the exponent comes down, converting an impossible power into an ordinary product.
Left side (chain rule): y′/y. Right side (product rule): 1·ln x + x·(1/x) = ln x + 1.
y′ = y·(ln x + 1) = xx(ln x + 1).
Why it works
Why do the standard rules fail? The power rule d/dx[xⁿ] = nxⁿ⁻¹ assumes the exponent is frozen; the exponential rule d/dx[aˣ] = aˣ ln a assumes the base is frozen. In x^x nothing is frozen. Amusingly, if you (incorrectly) apply both rules anyway and add the results — x·x^(x−1) + x^x ln x — you get the right answer. That's not luck: it's the multivariable chain rule showing through, with each rule capturing one variable's contribution.
The factor (ln x + 1) also hands you the function's minimum for free: the derivative is zero when ln x = −1, i.e. at x = 1/e ≈ 0.368, where x^x bottoms out at about 0.692. It's a satisfying payoff — a function that looks untouchable yields its minimum to three lines of logarithms.
Common mistakes
- Applying the power rule alone (x·x^(x−1)) or the exponential rule alone (x^x ln x) — each captures only half the change.
- Forgetting the y′/y on the left side when differentiating ln y implicitly.
- Leaving the answer in terms of y instead of substituting x^x back in.
Practice problems
Differentiate x2x
Answer: 2x2x(ln x + 1) — same method; ln y = 2x ln x.
Where is the minimum of xx for x > 0?
Answer: x = 1/e, from setting ln x + 1 = 0.
Differentiate xsin(x)
Answer: xsin(x)[cos(x) ln x + sin(x)/x] — log both sides, product rule.