Find derivative of x^x using logarithmic differentiation

medium CBSE JEE-MAIN 3 min read

Question

Find ddx(xx)\frac{d}{dx}(x^x).

Solution — Step by Step

xxx^x is a variable raised to a variable power. Neither the power rule (ddxxn=nxn1\frac{d}{dx}x^n = nx^{n-1}) nor the exponential rule (ddxax=axlna\frac{d}{dx}a^x = a^x \ln a) applies here — those rules require either a constant exponent or a constant base. For xxx^x, both base and exponent vary.

Logarithmic differentiation converts the problem into something manageable.

Let y=xxy = x^x. Take ln\ln of both sides:

lny=ln(xx)\ln y = \ln(x^x)

Using the logarithm power rule ln(ab)=blna\ln(a^b) = b\ln a:

lny=xlnx\ln y = x \ln x

Differentiate implicitly. Left side uses the chain rule:

1ydydx=ddx(xlnx)\frac{1}{y} \cdot \frac{dy}{dx} = \frac{d}{dx}(x \ln x)

Right side uses the product rule: ddx(xlnx)=1lnx+x1x=lnx+1\frac{d}{dx}(x \ln x) = 1 \cdot \ln x + x \cdot \frac{1}{x} = \ln x + 1

So:

1ydydx=lnx+1\frac{1}{y} \cdot \frac{dy}{dx} = \ln x + 1

Multiply both sides by yy:

dydx=y(lnx+1)\frac{dy}{dx} = y(\ln x + 1)

Substitute back y=xxy = x^x:

dydx=xx(lnx+1)\frac{dy}{dx} = x^x(\ln x + 1)

Why This Works

xxx^x can be rewritten as exlnxe^{x\ln x} (using a=elnaa = e^{\ln a}). Then:

ddx(exlnx)=exlnxddx(xlnx)=xx(lnx+1)\frac{d}{dx}(e^{x\ln x}) = e^{x\ln x} \cdot \frac{d}{dx}(x\ln x) = x^x(\ln x + 1)

This is the same answer — logarithmic differentiation is just an organised way of applying this eln()e^{\ln(\cdot)} trick. Taking ln\ln first makes the algebra cleaner.

Logarithmic differentiation is used whenever you have:

  1. Variable to the power of variable: xxx^x, xsinxx^{\sin x}, (sinx)x(\sin x)^x
  2. Long products/quotients: easier to differentiate ln(fg)\ln(f \cdot g) than fgf \cdot g directly

The result xx(lnx+1)x^x(\ln x + 1) should pass a sanity check. At x=1x = 1: derivative =11(ln1+1)=1(0+1)=1= 1^1(\ln 1 + 1) = 1(0 + 1) = 1. You can verify numerically: 1.0011.0011.001001...1.001^{1.001} \approx 1.001001..., giving slope 1\approx 1. ✓

Alternative Method — Exponential Form

Write xx=exlnxx^x = e^{x\ln x} directly.

Let u=xlnxu = x\ln x, so y=euy = e^u.

dydu=eu\frac{dy}{du} = e^u and dudx=lnx+1\frac{du}{dx} = \ln x + 1 (product rule).

By chain rule: dydx=eududx=exlnx(lnx+1)=xx(lnx+1)\frac{dy}{dx} = e^u \cdot \frac{du}{dx} = e^{x\ln x}(\ln x + 1) = x^x(\ln x + 1)

Both methods are equivalent — use whichever feels more natural.

Common Mistake

The most common error is treating xxx^x as if the exponent is a constant: writing ddx(xx)=xxx1=xx\frac{d}{dx}(x^x) = x \cdot x^{x-1} = x^x. This incorrectly uses the power rule with the exponent “treated as constant.” The correct derivative xx(lnx+1)x^x(\ln x + 1) equals xxx^x only when lnx+1=1\ln x + 1 = 1, i.e., lnx=0\ln x = 0, i.e., x=1x = 1. At any other xx, the power rule approach gives the wrong answer.

Want to master this topic?

Read the complete guide with more examples and exam tips.

Go to full topic guide →

Try These Next