What is the derivative of x to the x?

The base and exponent both vary, so neither the ordinary power rule nor the simple exponential rule works alone.

LaTeX article Updated July 11, 2026

ddxxx=xx(lnx+1)\frac{d}{dx}x^x=x^x(\ln x+1)

Why the usual rules do not fit

The power rule assumes a constant exponent. The derivative of a to the x assumes a constant base. In x to the x, both move, so applying either rule by itself drops part of the change.

Logarithmic differentiation turns the exponent into multiplication, where the product rule can see both contributions.

The logarithmic step

Set y equal to x to the x and take natural logs: ln y = x ln x. Differentiate implicitly, remembering that y is a function of x.

Multiplying by y at the end restores the original exponential expression.

yy=lnx+1\frac{y'}y=\ln x+1

Domain note

The real-valued logarithmic derivation is cleanest for x greater than zero. Extensions to selected negative rational inputs require more careful domain analysis and do not define one smooth real function on all negative x.

Worked example

Common mistakes

  • Writing x·x^(x−1) and treating the exponent as constant.
  • Forgetting the chain-rule factor y′/y after differentiating ln y.
  • Omitting the positive-domain assumption.

Keep these ideas

  • Variable exponents suggest logarithms.
  • Differentiate x ln x with the product rule.
  • Substitute y = xˣ back only at the end.
Vocab
Derivative
Math glossaryDerivative
ddx[f(x)]\frac d{dx}[f(x)]dydx\frac{dy}{dx}

The instantaneous rate of change of a function.

Learn more
Derivative notations
Math glossaryDerivative notations
ddx[f(x)]\frac d{dx}[f(x)]dydx=f(x)\frac{dy}{dx}=f'(x)

Different notations emphasize the operator, dependent variable, function, or time.

Learn more
Chain rule
Math glossaryChain rule
ddxf(g(x))=f(g(x))g(x)\frac d{dx}f(g(x))=f'(g(x))g'(x)

Differentiates a composition from outside to inside.

Learn more
Product rule
Math glossaryProduct rule
(fg)=fg+fg(fg)'=f'g+fg'

Differentiates a product as two cross contributions.

Learn more
Tangent line
Math glossaryTangent line
yf(a)=f(a)(xa)y-f(a)=f'(a)(x-a)

A line matching a curve's instantaneous direction at a point.

Learn more
Math glossary