Derivative of the power tower May somebody help me to correctly calculate the dervative of the $n$-th power tower function?
$$
\begin{align}
f_1(x)&=x\\
f_n(x)&=x^{f_{n-1}(x)}\\
&=x^{x^{x^{...^x}}}\text{ where }x\text{ occurs }n\text{ times}
\end{align}
$$
The solution given here is for the infinite case $f_{\infty}=\lim_{n\to\infty}f_n$.
 A: My approach would be to try to find derivatives inductively. First we have $f_1'(x)=1$. Then differentiating $f_2(x)=x^{f_1(x)}$ we have
$$
\log(f_2(x))=f_1(x)\log x\implies\frac{f_2'(x)}{f_2(x)}=f_1'(x)\log x +\frac{f_1(x)}{x}=1+\log x
$$
so that $f_2'(x)=f_2(x)(1+\log x)=x^x(1+\log x)$ and more generally
$$
f_n'(x)=f_n(x)\cdot\left(f_{n-1}'(x)\log x+\frac{f_{n-1}(x)}{x}\right)
$$
Then perhaps looking at $f_3',f_4'$ some kind of pattern emerges that can be proven inductively. But perhaps someone comes up with something smarter.

The notation gets messy, so let us instead write $a_n:=f_n(x)$ and $b_n:=f_n'(x)$ together with $c:=\log x$ and $d:=1/x$ to have
$$
b_n=a_n(c\cdot b_{n-1}+d\cdot a_{n-1})\\
$$
so with this we get
$$
\begin{align}
b_2&=a_2(c\cdot b_1+d\cdot a_1)\\
b_3&=a_3(c\cdot b_2+d\cdot a_2)\\
&=a_3(c\cdot a_2(c\cdot b_1+d\cdot a_1)+d\cdot a_2)\\
&=c^2\cdot a_3a_2b_1+cd\cdot a_3a_2a_1+d\cdot a_3a_2\\
b_4&=a_4(c\cdot b_3+d\cdot a_3)\\
&=a_4(c\cdot(c^2\cdot a_3a_2b_1+cd\cdot a_3a_2a_1+d\cdot a_3a_2)+d\cdot a_3)\\
&=c^3\cdot a_4a_3a_2b_1+c^2d\cdot a_4a_3a_2a_1+cd\cdot a_4a_3a_2+d\cdot a_4a_3
\end{align}
$$
and maybe a pattern has emerged. It looks like we have, noting that $b_1=1$ and $d\cdot a_1=1$ and defining $a_0=1$:
$$
\begin{align}
b_n=&c^{n-1}d\cdot a_na_{n-1}\cdots a_2a_1a_0+c^{n-2}d\cdot a_n\cdots a_1\\
&+c^{n-3}d\cdot a_n\cdots a_2+...+d\cdot a_n a_{n-1}\\
=&\sum_{i=1}^n c^{n-i}d\cdot \prod_{j=i-1}^n a_j
\end{align}
$$

Let us try to prove this. The base cases $n=1,2,3,4$ have already been computed above. So let us turn to the inductive step:
$$
\begin{align}
b_{n+1}&=a_{n+1}(c\cdot b_n+d\cdot a_n)\\
&=a_{n+1}\left(c\cdot\left(\sum_{i=1}^n c^{n-i}d\cdot \prod_{j=i-1}^n a_j\right) +d\cdot a_n\right)\\
&=\left(\sum_{i=1}^n c^{n+1-i}d\cdot \prod_{j=i-1}^{n+1} a_j\right)+d\cdot a_{n+1}a_n\\
&=\sum_{i=1}^{n+1} c^{n+1-i}d\cdot \prod_{j=i-1}^{n+1} a_j
\end{align}
$$
which proves the claim.

Substituting back the values of $a_n,b_n,c$ and $d$ we then have shown that
$$
\begin{align}
f_n'(x)&=\sum_{i=1}^n (\log x)^{n-i}\frac 1x\cdot \prod_{j=i-1}^n f_j(x)\\
&=\sum_{i=1}^n (\log x)^{n-i}\cdot x^{-1+\prod_{j=i-1}^n f_{j-1}(x)}
\end{align}
$$
where $f_0(x)=1$ and $f_{-1}(x)=1$ have been added.
A: Write
$$
f_{-1}(x)=0;\qquad f_n(x) = x^{f_{n-1}(x)}
$$
so that $f_0(x)=1$ and the higher ones are the same as before.  Then
$$
\frac{d}{dx} f_n(x) = \sum_{k=1}^n
x^{\left(-1+\sum_{j=n-1-k}^{n-1}f_j(x)\right)}\log^{k-1}(x)
$$
A: let ${}^nx$ = $x\uparrow\uparrow n =\underbrace {x^{x^{\cdot ^{\cdot ^{x}}}}}_{n}$  the nth tetration of x

Our goal: Is to find $\displaystyle{d\over dx}(^nx)$

Calculating some derivatives at first to try understand the patterns:
$\displaystyle{d\over dx}(^2x) = x^x(1+\ln x)$
$\displaystyle{d\over dx}(^3x) = (^3x)(^2x)\Big({1\over x}+\ln x+(\ln x)^2\Big)$
$\displaystyle{d\over dx}(^4x) = (^4x)(^3x)\Big({1\over x}+{^2x\over x}\ln x+{}^2x(\ln x)^2+{}^2x(\ln x)^3\Big)$
Now, we begin to notice a pattern involving $\ln x$. Just computing one more expression
$\displaystyle{d\over dx}(^5x) = (^5x)(^4x)\Big({1\over x}+{^3x\over x}\ln x+{({}^3x)({}^2x)\over x}(\ln x)^2+({}^3x)({}^2x)(\ln x)^3+({}^3x)({}^2x)(\ln x)^4\Big)$

Computing the general derivative
Since $\displaystyle {}^nx = x^{\big({}^{(n-1)}x\big)} = e^{{}^{(n-1)}x\ln x}$
Therefore
$${d\over dx}({}^nx) = {d\over dx}(e^{{}^{(n-1)}x\ln x}) = e^{{}^{(n-1)}x\ln x}{d\over dx}\big({}^{(n-1)}x\ln x\big) = {}^nx\Big({{}^{(n-1)}x\over x}+\ln x {d\over dx}\big({}^{(n-1)}x\big)\Big)$$
Now try to cast the general form of the derivative to resemble the pattern in the calculated derivatives, you can see they come in the form: 
$${d\over dx}({}^nx) = ({}^nx)({}^{(n-1)}x)\Big({1\over x} + \cdots \Big)$$
Now, we could make 
$${d\over dx}({}^nx) = ({}^nx)({}^{(n-1)}x)\Big({1\over x} + {{d\over dx}\big({}^{(n-1)}x\big)\over {}^{(n-1)}x}\ln x\Big)$$
Notice that the derivative always starts with two tetration factors; so that
$${{d\over dx}\big({}^{(n-1)}x\big)\over {}^{(n-1)}x{}^{(n-2)}x} = B(n) = \text{The big bracket}$$
Now, we could rewrite the derivative as
$${d\over dx}({}^nx) = ({}^nx)({}^{(n-1)}x)\Big({1\over x} + {}^{(n-2)}x\ln x B(n-1)\Big)$$
$B(n)$: the big bracket can also be defined recursively as 
$$B(n) = {1\over x} + {}^{(n-2)}x\ln x B(n-1), \text{ if } n>3$$
$$B(3) = {1\over x} + \ln x + (\ln x)^2$$

$$\begin{align}{d\over dx}({}^nx)
&= ({}^nx)({}^{(n-1)}x)B(n) \\
&= ({}^nx)({}^{(n-1)}x)\Big({1\over x} + {}^{(n-2)}x\ln x B(n-1)\Big) \\
&= ({}^nx)({}^{(n-1)}x)\Bigg({1\over x} + {}^{(n-2)}x\ln x \Big({1\over x} + {}^{(n-3)}x\ln x B(n-2)\Big)\Bigg) \\
&= ({}^nx)({}^{(n-1)}x)\Bigg({1\over x} + {{}^{(n-2)}x\over x}\ln x + {}^{(n-2)}x{}^{(n-3)}x(\ln x)^2 B(n-2)\Big)\Bigg) \\
&= ({}^nx)({}^{(n-1)}x)\Bigg({1\over x} + {{}^{(n-2)}x\over x}\ln x + {}^{(n-2)}x{}^{(n-3)}x(\ln x)^2 \Big({1\over x} + {}^{(n-4)}x\ln x B(n-3)\Big)\Bigg) \\
&= ({}^nx)({}^{(n-1)}x)\Bigg({1\over x} + {{}^{(n-2)}x\over x}\ln x + {{}^{(n-2)}x{}^{(n-3)}x\over x}(\ln x)^2 + {}^{(n-2)}x{}^{(n-3)}x{}^{(n-4)}x(\ln x)^3 B(n-3)\Bigg) \\
&= ({}^nx)({}^{(n-1)}x)\Bigg({1\over x} + {{}^{(n-2)}x\over x}\ln x + {{}^{(n-2)}x{}^{(n-3)}x\over x}(\ln x)^2 + \cdots + \Big(\prod^i_{j=2}{{}^{n-j}x}\Big){(\ln x)^{i-1}\over x} + \cdots + \Big(\prod^{n-2}_{j=2}{{}^{n-j}x}\Big){(\ln x)^{(n-3)}}B(3)\Bigg) \\
&= ({}^nx)({}^{(n-1)}x)\Bigg({1\over x} + {{}^{(n-2)}x\over x}\ln x + {{}^{(n-2)}x{}^{(n-3)}x\over x}(\ln x)^2 + \cdots + \Big(\prod^i_{j=2}{{}^{n-j}x}\Big){(\ln x)^{i-1}\over x} + \cdots + \Big(\prod^{n-2}_{j=2}{{}^{n-j}x}\Big){(\ln x)^{(n-3)}} \Big({1\over x} + \ln x + (\ln x)^2\Big)  \Bigg) \\
\end{align}$$
Now, all terms in $B(n)$ follow the same general form: $\displaystyle\Big(\prod^i_{j=2}{{}^{n-j}x}\Big){(\ln x)^{i-1}\over x}$, where $i$ is the index of the term, except the last 3 terms but notice the following similarity:
The third last term equals $\displaystyle\Big(\prod^{n-2}_{j=2}{{}^{n-j}x}\Big){(\ln x)^{(n-3)}\over x}$ which is the same as its general formula
The second last term equals 
$$\Big(\prod^{n-2}_{j=2}{{}^{n-j}x}\Big){(\ln x)^{(n-3)}}\cdot \ln x = 
({}^1x)\Big(\prod^{n-2}_{j=2}{{}^{n-j}x}\Big){(\ln x)^{(n-2)}\over ({}^1x)} = 
\Big(\prod^{n-1}_{j=2}{{}^{n-j}x}\Big){(\ln x)^{(n-2)}\over x}$$
again it is the same as its general formula
The last term equals 
$$\Big(\prod^{n-2}_{j=2}{{}^{n-j}x}\Big){(\ln x)^{(n-3)}}\cdot (\ln x)^2 = 
({}^0x)({}^1x)\Big(\prod^{n-2}_{j=2}{{}^{n-j}x}\Big){(\ln x)^{(n-1)}\over ({}^0x)({}^1x)} = 
\Big(\prod^{n}_{j=2}{{}^{n-j}x}\Big){(\ln x)^{(n-1)}\over x}$$
again it is the same as its general formula
Note that $\displaystyle ({}^0x) = 1, ({}^1x) = x$

Now we deduce that
$$\begin{align}{d\over dx}({}^nx) &= ({}^nx)({}^{(n-1)}x)\sum_{i=1}^{n}{\Bigg[\Big(\prod^i_{j=2}{{}^{n-j}x}\Big){(\ln x)^{(i-1)}\over x}\Bigg]} \\
&= {({}^nx)({}^{(n-1)}x)\over x}\sum_{i=1}^{n}{\Bigg[{(\ln x)^{(i-1)}}\prod^i_{j=2}{{}^{n-j}x}\Bigg]}\blacksquare
\end{align}$$
