# The Derivative of x to the x to the x

A use case for logarithmic differentiation.

February 3, 2023

To find the derivative of $x^{x^x}$, use logarithmic differentiation. In order to apply this technique, let the expression being differentiated equal $y$:

$y = x^{x^x}$.

Now take the natural logarithm of both sides:

$\ln{y} = \ln x^{x^x}$.

Use the properties of the logarithm to get

$\ln{y} = x^x \ln x$.

$x^x$ is still problematic, so take the natural logarithm of both sides again:

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

Using the properties of the logarithm once more, arrive at

$\ln (\ln{y}) = x \ln x + \ln (\ln x)$.

Take the derivative of both sides with respect to $x$. Use the chain rule and the product rule. Simplify the equation, then solve it for $\frac{\textrm{d}y}{\textrm{d}x}$. You’ll get

\begin{aligned} \frac{\textrm{d}}{\textrm{d}x} \ln (\ln{y}) &= \frac{\textrm{d}}{\textrm{d}x} (x \ln x + \ln (\ln x)) \\ \frac{1}{\ln y} \cdot \frac{1}{y} \cdot \frac{\textrm{d}y}{\textrm{d}x} &= \ln x + x \cdot \frac{1}{x} + \frac{1}{\ln x} \cdot \frac{1}{x} \\ \frac{1}{\ln y} \cdot \frac{1}{y} \cdot \frac{\textrm{d}y}{\textrm{d}x} &= \ln x + 1 + \frac{1}{x \ln x} \\ \frac{\textrm{d}y}{\textrm{d}x} &= y \ln y (\ln x + 1 + \frac{1}{x \ln x}). \\ \end{aligned}

We can make our result a bit more useful by substituting $x^{x^x}$ for $y$. This produces

\begin{aligned} \frac{\textrm{d}y}{\textrm{d}x} &= x^{x^x} \ln x^{x^x} (\ln x + 1 + \frac{1}{x \ln x}) \\ &= x^{x^x} x^x \ln x (\ln x + 1 + \frac{1}{x \ln x}) \\ &= x^{x^x + x} (\ln^2 x + \ln x + \frac{1}{x}). \end{aligned}