# What is the derivative of x^x?

Mar 5, 2018

$\frac{\mathrm{dy}}{\mathrm{dx}} = {x}^{x} \left(\ln \left(x\right) + 1\right)$

#### Explanation:

We have:

$y = {x}^{x}$ Let's take the natural log on both sides.

$\ln \left(y\right) = \ln \left({x}^{x}\right)$ Using the fact that ${\log}_{a} \left({b}^{c}\right) = c {\log}_{a} \left(b\right)$,

$\implies \ln \left(y\right) = x \ln \left(x\right)$ Apply $\frac{d}{\mathrm{dx}}$ on both sides.

$\implies \frac{d}{\mathrm{dx}} \left(\ln \left(y\right)\right) = \frac{d}{\mathrm{dx}} \left(x \ln \left(x\right)\right)$

The chain rule:

If $f \left(x\right) = g \left(h \left(x\right)\right)$, then $f ' \left(x\right) = g ' \left(h \left(x\right)\right) \cdot h ' \left(x\right)$

$\frac{d}{\mathrm{dx}} \left({x}^{n}\right) = n {x}^{n - 1}$ if $n$ is a constant.

Also, $\frac{d}{\mathrm{dx}} \left(\ln x\right) = \frac{1}{x}$

Lastly, the product rule:

If $f \left(x\right) = g \left(x\right) \cdot h \left(x\right)$, then $f ' \left(x\right) = g ' \left(x\right) \cdot h \left(x\right) + g \left(x\right) \cdot h ' \left(x\right)$

We have:

$\implies \frac{\mathrm{dy}}{\mathrm{dx}} \cdot \frac{1}{y} = \frac{d}{\mathrm{dx}} \left(x\right) \cdot \ln \left(x\right) + x \cdot \frac{d}{\mathrm{dx}} \left(\ln \left(x\right)\right)$

$\implies \frac{\mathrm{dy}}{\mathrm{dx}} \cdot \frac{1}{y} = 1 \cdot \ln \left(x\right) + x \cdot \frac{1}{x}$

$\implies \frac{\mathrm{dy}}{\mathrm{dx}} \cdot \frac{1}{y} = \ln \left(x\right) + \cancel{x} \cdot \frac{1}{\cancel{x}}$
(Don't worry about when $x = 0$, because $\ln \left(0\right)$ is undefined)

$\implies \frac{\mathrm{dy}}{\mathrm{dx}} \cdot \frac{1}{y} = \ln \left(x\right) + 1$

$\implies \frac{\mathrm{dy}}{\mathrm{dx}} = y \left(\ln \left(x\right) + 1\right)$

Now, since $y = {x}^{x}$ , we can substitute $y$.

$\implies \frac{\mathrm{dy}}{\mathrm{dx}} = {x}^{x} \left(\ln \left(x\right) + 1\right)$