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}$
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It only takes a minute to sign up.
Sign up to join this communityWhat 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}$
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.