Differentiate $\displaystyle y = a^{x ^{a^{x^\cdots}}}$.

I will assume that everything is well defined and real, not paying attention to whether logarithms are taken of positive numbers and such.

We have $y=a^{x^y}$ (not $y=(a^x)^y$ which would mean $y=a^{{xa}^{{xa}^{\cdots}}}$). Let me denote the derivative operator by $D$.

First we need a little lemma: If $f$ and $g$ are functions of $x$, then $$ D(f^g) = De^{g\log(f)} = e^{g\log(f)}D(g\log(f)) = f^g(g'\log(f)+gf'/f). $$ (There is an easy way to memorize this. If $f$ is constant, the derivative is $f^g\log(f)g'$. If $g$ is constant, the derivative is $gf^{g-1}$. The full derivative is the sum of these two. This argument can be formalized, but it'd be a sidetrack here.)

Applying this to $f(x)=x$ and $g(x)=y(x)$ gives $$ D(x^y) = x^y(y'\log(x)+y/x). $$ This will be useful soon.

Taking the derivative gives \begin{align} y' &= D(a^{x^y}) \\&= a^{x^y}\log(a)D(x^y) \\&= y\log(a)D(x^y) %\\&= %y\log(a)[yx^{y-1}+\log(x)x^yy'] \\&= y\log(a)x^y[y/x+\log(x)y'] \\&= y\log(a^{x^y})[y/x+\log(x)y'] \\&= y\log(y)[y/x+\log(x)y'] . \end{align} This gives $$ [1-\log(x)y\log(y)]y' = y^2\log(y)/x, $$ from which we can solve $$ y'=\frac{y^2\log(y)}{x[1-\log(x)y\log(y)]}. $$ This does not seem to match any of the options given. Here is an alternative form, using $x^y=\log(y)/\log(a)$: $$ y'=\frac{y^2\log(y)}{x\left[1-\log\left(\frac{\log(y)}{\log(a)}\right)\log(y)\right]}. $$

Perhaps I miss a way to manipulate the formula, or perhaps the problem is mistaken; as others have pointed out, taking $y=(a^x)^y$ leads to option C.


\begin{align*} y&=a^{x^{a^{x\cdots}}}\\ \implies y&=a^{x^y}\\ \implies \ln y&=x^y\ln a\hspace{25pt}\cdots\text{(i)}\\ \implies \dfrac{1}{y}\dfrac{dy}{dx}&=\ln a\cdot\dfrac{d}{dx}\left(x^y\right)\\ &=\ln a\cdot\dfrac{d}{dx}\left(e^{y\ln x}\right)\\ &=\ln a\cdot e^{y\ln x}\cdot\dfrac{d}{dx}(y\ln x)\\ &=\ln a\cdot x^y\cdot\left(\dfrac{y}{x}+\ln x\cdot\dfrac{dy}{dx}\right)\\ \implies \dfrac{dy}{dx}&=y\cdot x^y\ln a\cdot\left(\dfrac{y}{x}+\ln x\cdot\dfrac{dy}{dx}\right)\\ \implies \dfrac{dy}{dx}\left(1-y\cdot x^y\ln a\cdot\ln x\right)&=\dfrac{y^2}{x}\cdot x^y\ln a\\ \implies \dfrac{dy}{dx}\left(1-y\cdot\ln y\cdot\ln x\right)&=\dfrac{y^2}{x}\cdot\ln y\hspace{25pt}\text{ as from (i) }[x^y\ln a=\ln y]\\ \implies \dfrac{dy}{dx}&=\dfrac{y^2\ln y}{x\left(1-y\cdot\ln y\cdot\ln x\right)} \end{align*} So, this doesn't matches any answer.