How should $x^{\frac{1}{x}}$ be differentiated? I know the answer is $$\frac{1-\ln(x)}{x^{2-\frac{1}{x}}}$$
but I do not understand how to get there.
Attempt at solution.
I believe the following is true:
$$ \begin{aligned}\frac{d}{dx}x^u&=ux^{u-1}\cdot u^\prime\\ \frac{d}{dx}a^x&=a^x\cdot\ln(a) \end{aligned}$$ but I don't know what to do when both the base and the exponent are functions of $x$.
Hint: Let $y=x^{1/x}$. Now take the natural log of both sides. $$\ln(y)=\ln(x^{1/x})=\frac{1}{x}\ln(x).$$ Now you can differentiate both sides and solve to find $y'$. I'll even do the left side for you: $$\frac{d}{dx}\ln(y)=\frac{y'}{y}=\frac{y'}{x^{1/x}}.$$