Derivative of $x^x$

I can't get any of these on my own and I am attempting to do $x^x$ I had it explained to me for about an hour and I still can't do it on my own. I thought I was supposed to make it into $x(\ln x)$ which should be equivalent to the original term. Then the differentiation should be easy for most people from here.

$$1(\ln x)+x(\frac1x) $$ or $$\ln x+1$$

This is of course wrong but I do not know why.


Solution 1:

Use the fact that $y=e^{\ln(y)}$ and that $\ln(a^b)=b\ln(a)$ to get

$$ x^x=e^{\ln(x^x}=e^{x\ln(x)}. $$

Then the derivative you want will be the derivative of this:

$$ \frac{d}{dx}(x^x)=\frac{d}{dx}(e^{x\ln(x)}). $$

By chain rule this derivative is then:

$$ \frac{d}{dx}(e^{x\ln(x)})=e^{x\ln(x)}\left(\ln(x)+x\cdot\frac{1}{x}\right). $$

Thus the final answer is $x^x(\ln(x)+1)$.

Solution 2:

Start with $$y=x^x$$ Take logarithms on both sides: $$\log y=\log(x^x)$$ Simplify on the right side: $$\log y=x\log x$$ Differentiate with respect to $x$, remembering to use the chain rule on the left side: $$(1/y)(dy/dx)=\log x+1$$ So, $$dy/dx=y\times(\log x+1)=x^x(\log x+1)$$