DerivCalc
Written by SilverCodeLabs · Mathematically reviewed · Revised September 17, 2026 · How answers are verified

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.

Answer
d/dx [x^x]  =  xx(ln x + 1)
Rule used: Logarithmic differentiation
Open x^x in the calculator →

Step-by-step solution

1
Take the log of both sides

Let y = xx. Then ln y = x ln x — the exponent comes down, converting an impossible power into an ordinary product.

2
Differentiate both sides

Left side (chain rule): y′/y. Right side (product rule): 1·ln x + x·(1/x) = ln x + 1.

3
Solve for y′

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.

Domain and a second derivation

The formula on this page uses the smooth real-valued definition xˣ = exp(x ln(x)) for x > 0. Some negative inputs admit individual real powers, but they do not give the same smooth function on an open interval. Do not extend this logarithmic derivative formula to negative inputs.

Differentiate exp(x ln(x)) directly: the outer exponential stays unchanged, and the product rule gives d/dx[x ln(x)] = ln(x) + 1. Their product is xˣ(ln(x) + 1), agreeing with logarithmic differentiation.

At x = 1 the function value and derivative are both 1, so the tangent line is y = x. On 0 < x < 1/e, ln(x) + 1 is negative; on x > 1/e it is positive. Thus x = 1/e is the global minimum on the positive domain, with value exp(−1/e) ≈ 0.6922. The practice formulas for x²ˣ and xˢⁱⁿ⁽ˣ⁾ also assume x > 0.

Common mistakes

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.

Related derivatives

e^xln(x)2^xx²