# Differentiation of $x^x$

What is the differentiation of $$x^x$$ wrt $$x$$? Is it $$x^x$$ or $$x^x(1+\ln x)$$?

Why it can't be differentiated using chain rule and the formula $$\frac{d}{dx}(x^n)=nx^{n-1}$$

• why would it be $x^x$? let $x^x=e^{x\ln(x)}$ Oct 3, 2020 at 5:54
• If you want to apply the chain rule, you need 2 functions say $f$ and $g$ s.t. $f \circ g (x)=x^x$. Which $f$ and $g$ you think would be appropriate? Oct 3, 2020 at 5:55
• @cxh007 f(x)=x^x and g(x)=x and again what is the differentiation of g(x). Then g(f(x)) Oct 3, 2020 at 5:59
• @Debakant But that wouldn't help. $(f \circ g)'(x)=(f'\circ g)(x) \cdot g'(x)=(x^x)' \cdot1=f'(x)$, you still don't know what is $(x^x)'$. Oct 3, 2020 at 6:04
• Instead if you choose $f(t)=e^t,g(x)=x \log x$, then $(x^x)'=(f' \circ g)(x) \cdot g'(x)=e^{g(x)} \cdot (1+\log x)=x^x(1+\log x)$. Oct 3, 2020 at 6:20

It can be differentiated using the multivariable chain rule, $$\frac{d}{dx}f(u(x), v(x)) = \frac{\partial f}{\partial u} \frac{du}{dx} + \frac{\partial f}{\partial v} \frac{dv}{dx}.$$

Set $$f(u,v)=u^v$$ and $$u(x)=v(x)=x$$. Then $$\frac{\partial f}{\partial u} = v u^{v-1} \\ \frac{\partial f}{\partial v} = u^v \ln u$$ so $$\frac{d}{dx}(x^x) = \frac{d}{dx}f(u(x), v(x)) = \frac{\partial f}{\partial u} \frac{du}{dx} + \frac{\partial f}{\partial v} \frac{dv}{dx} \\ = v(x) u(x)^{v(x)-1} \cdot 1 + u(x)^{v(x)}\ln u(x) \cdot 1 \\ = x \cdot x^{x-1} + x^x \ln x \\ = x^x + x^x \ln x \\ = x^x (1+\ln x).$$

Is it in the form $$x^n$$ to apply said formula? Here the exponent is a function of your variable $$x$$, not a natural number.

Instead we make a certain transformation to use the differentiation rule regarding a composite function, $$f(g(x))'=f'(g(x))g'(x)$$.

Here we have $$f(x)=e^x$$ and $$g(x)=x\ln x$$, thus:

$$(x^x)'=((e^{\ln x})^x)'=(e^{x\ln x})'=(x\ln x)'e^{x\ln x}=$$ $$[(x)'\ln x+x(\ln x)']e^{x\ln x}=(\ln x+1)x^x$$

It cannot be differentiated using the chain rule because the exponent is not fixed; it's a variable with respect to which you are differentiating.

The answer is $$x^x(1 + \ln x)$$ which can be found by logarithmic differentiation and under the assumption that the domain makes sense.