# Find the derivative of $f(x)=x^{x^{\dots}{^{x}}}$.

Find the derivative of $$f(x)$$: $$f(x)=x^{x^{\dots}{^{x}}}$$

Let $$n$$ be the number of overall $$x's$$ in $$f(x)$$. So for $$n=1$$, $$f(x)=x$$. I then tried to determine a pattern by solving for the derivative from $$n=1$$ to $$n=5$$. Here's what I got:

\begin{align} n = 2 \Longrightarrow f(x) &= x^x \\ f'(x) &= \frac{d}{dx}\left(e^{x\ln \left(x\right)}\right) \\ &= e^{x\ln \left(x\right)}\frac{d}{dx}\left(x\ln \left(x\right)\right) \\ &= e^{x\ln \left(x\right)}\left(\ln \left(x\right)+1\right) \\ &= x^x\left(\ln \left(x\right)+1\right) \end{align}

\begin{align} n = 3 \Longrightarrow f(x) &= x^{x^{x}} \\ f'(x) &= \frac{d}{dx}\left(e^{x^x\ln \left(x\right)}\right) \\ &= e^{x^x\ln \left(x\right)}\frac{d}{dx}\left(x^x\ln \left(x\right)\right) \\ &= e^{x^x\ln \left(x\right)}\left(x^x\ln \left(x\right)\left(\ln \left(x\right)+1\right)+x^{x-1}\right) \\ &= x^{x^x}\left(x^x\ln \left(x\right)\left(\ln \left(x\right)+1\right)+x^{x-1}\right) \end{align}

\begin{align} n = 5 \Longrightarrow f(x) &= x^{x^{x^{x^{x}}}} \\ f'(x) &= ... \\ &= x^{x^{x^{x^x}}}\left(x^{x^{x^x}}\ln \left(x\right)\left(x^{x^x}\ln \left(x\right)\left(x^x\ln \left(x\right)\left(\ln \left(x\right)+1\right)+x^{x-1}\right)+x^{x^x-1}\right)+x^{x^{x^x}-1}\right) \end{align}

However, I am not sure if I see a pattern here that can help solve the question.

• Hint: $y=x^y$ where $y=f(x)$ – DARK Jan 20 at 11:07
• Are you asking about $f'(x)$ for $f(x)$ being a finite tower of $x$s of height $n$, or about the limit when $n\to\infty$? – Christoph Jan 20 at 11:14

All the other answers are for the case where there are infinite x's. However, there are finite ($$n$$) x's in this problem!

Let's first denote the function as $$f_n(x)=x^{x^{\cdots^x}}$$ with $$n$$ x's in the exponent. For example, $$f_1(x)=x^x, f_0(x)=x.$$

Take the logarithm of both sides, we get $$\ln f_n(x)=f_{n-1}(x)\ln x$$. Taking the derivative gives $$\frac{f'_n(x)}{f_n(x)}=f'_{n-1}(x)\ln x+\frac{f_{n-1}(x)}{x}$$

$$f'_n(x)=f_n(x) f'_{n-1}(x)\ln x+\frac{f_n(x) f_{n-1}(x)}{x}$$

That's just a basic recurrence relation. We know that $$a_n=Ca_{n-1}+D\implies a_n=c C^{n-1} + \frac{D(C^n-1)}{C-1}$$ where $$c$$ is an arbitrary constant.

Similarly, we may get $$f'_n(x)=c(f_n(x)\ln x)^{n-1}+\frac{f_n(x)f_{n-1}(x)}{x(f_n(x)\ln x-1)} ((f_n(x)\ln x)^n-1)$$

To get the value of the parameter $$c$$, let $$n=1$$, then $$f'_1(x)=c+x^x$$. Hence, $$c=x^x \ln x$$. Substituting in, we get the final answer (in a rather cumbersome form) $$f'_n(x)=x^x \ln x(f_n(x)\ln x)^{n-1}+\frac{f_n(x)f_{n-1}(x)}{x(f_n(x)\ln x-1)} ((f_n(x)\ln x)^n-1)$$

Let $$f_1(x)=x$$ and $$f_n(x)=x^{f_{n-1}(x)}=x^{x^{\ldots^{x}}}$$ ($$n$$ $$x's$$ on the exponent). Then $$\ln(f_n(x))=f_{n-1}(x)\cdot\ln(x)$$ so: $$\frac{f'_n(x)}{f_{n}(x)}=f'_{n-1}(x)\cdot\ln(x)+\frac{f_{n-1}(x)}{x}\implies f'_{n}(x)=f_{n}(x)\cdot\left(f'_{n-1}(x)\cdot\ln(x)+\frac{f_{n-1}(x)}{x}\right).$$

$$f(x) = x^{f(x)}\\ \ln(f(x))=f(x) \ln(x)\\ \frac{1}{f(x)}f'(x) = \frac{f(x)}{x} + \ln(x)f'(x),\\ f'(x)=\left(\frac{1}{f(x)}-\ln(x)\right)^{-1}\frac{f(x)}{x},\\ f'(x)=\left(\frac{f(x)}{1-\ln(x)f(x)}\right)\frac{f(x)}{x}.$$

• This answer refers to $x^{x^{x^{\cdots}}}$ instead of a finite tower $x^{x^{\cdots^x}}$. – Christoph Jan 20 at 11:17
• Although this doesn't strictly answer the question, I think it's a very nice answer. +1 – A-Level Student Jan 20 at 14:50

$$x^{x^{x^\cdots}}= y \implies x^y = y \implies1 = yx^{-y} = ye^{-y\log (x)}$$

which means

$$y = \frac{-W(-\log (x))}{\log (x)}$$

where $$W$$ is the principal branch of the Lambert-W function. Now, the problem of the successive derivatives is "much" simpler (have a look here for the derivatives of $$W(t)$$).

• This answer refers to $x^{x^{x^{\cdots}}}$ instead of a finite tower $x^{x^{\cdots^x}}$. – Christoph Jan 20 at 11:17