Find the derivative of $\exp (x^x)$
My Attempt:
Let $$y=\exp (x^x)$$ Taking $\textrm {ln}$ on both sides,. $$\ln (y)=\ln \exp (x^x)$$ $$\ln (y)=x\ln (e^x)$$ Differentiating both sides w.r.t $x$ $$\dfrac {y'}{y}=x.\dfrac {1}{e^x} .e^x+ \ln (e^x)$$ $$\dfrac {y'}{y}=x+\ln (e^x)$$ $$y'=\exp (x^x) (x+\ln (e^x))$$
Is this correct?
So the way I imagine you were taught, you would need to take a logarithm twice:
$$ y = e^{x^x} \\ \ln(y) = \ln(e^{x^x}) \\ \ln(y) = x^x \\ \ln(\ln(y)) = \ln(x^x) \\ \ln(\ln(y)) = x\,\ln(x) \\ $$
Now you can take the derivative:
$$ \frac{1}{\ln(y)}\frac{1}{y}\frac{dy}{dx} = x\frac{1}{x} + \ln(x) \\ \frac{1}{\ln(y)}\frac{1}{y}\frac{dy}{dx} = 1 + \ln(x) \\ \frac{dy}{dx} = y\,\ln(y)\,(1 + \ln(x)) $$
Substituting in $y = e^{x^x}$ yields $$ \frac{dy}{dx} = e^{x^x}\,\ln(e^{x^x})\,(1 + \ln(x)) \\ \frac{dy}{dx} = e^{x^x}\,x^x\,(1 + \ln(x)) $$
However, there is actually a rule that they NEVER tell you that you can also use:
$$ d(u^v) = vu^{v - 1}\,du + \ln(u)\,u^v\,dv $$
This rule eliminates the whole process of taking logarithms. Let's see it applied:
$$ y = e^{x^x} \\ d(y) = d(e^{x^x}) \\ dy = e^{x^x} d(x^x) \\ dy = e^{x^x} (x\cdot x^{x - 1}\,dx + \ln(x)x^x\,dx) \\ dy = e^{x^x} (x\cdot x^{x - 1} + \ln(x)x^x)\,dx \\ \frac{dy}{dx} = e^{x^x} (x\cdot x^{x - 1} + \ln(x)x^x) $$ This is the same result as before, just factored differently. As you can see $x\cdot x^{x - 1}$ is the same as $x^x$. That gives $$ \frac{dy}{dx} = e^{x^x} (x^x + \ln(x)x^x) $$ Then you can factor out x^x from the parenthesis and get the original result: $$ \frac{dy}{dx} = e^{x^x} x^x\,(1 + \ln(x)) $$ I just wanted to point this out to you because SO many Calculus courses leave out this really great rule!
Additionally, even though it looks ugly, it is really just a combination of the power rule and the exponentiation rule.