Differentiate $x^{a^x}$ without logarithmic differentiation? Problem. Compute $\frac{d}{dx} x^{a^x}$.
Method 1: Logarithmic Differentiation (Correct):
\begin{align*}
y&= x^{a^x} \\
\ln(y)&=a^x \cdot \ln(x) \\
\frac{1}{y} \frac{dy}{dx} &=a^x \frac{1}{x} + \ln(x) \ln(a) a^x \\
\frac{dy}{dx} &= y\left(\frac{1}{x} a^x + \ln(a) \ln(x) a^x\right) \\
\frac{dy}{dx} &= x^{a^x}\left(\frac{1}{x} a^x + \ln(a) \ln(x) a^x\right) \\
\frac{dy}{dx} &= a^x x^{a^x}\left(\frac{1}{x} + \ln(a) \ln(x)\right) \\
\frac{dy}{dx} &= a^x x^{a^x-1}\left(1 + x\ln(a) \ln(x) \right) \\
\end{align*}
Method 2: Chain Rule (Incorrect):
\begin{align*}
y&= x^{a^x} \\
\frac{dy}{dx} &= a^x x^{a^x-1} \cdot \left[\ln(a) \cdot a^x\right]
\end{align*}
Method 2 is incorrect because it $x^{a^x}$ is not a power function, so we cannot apply power rule (thanks @Alann_Rosas and @Parcly_Taxel).
My Question: Can Ninad Munshi's answer here be adopted to correct method 2 without the use of logarithmic differentiation? What is the name (and/or proof) of this generalized version of chain rule?
Thank you!

It is not a misapplication of the chain rule, but of the power rule. The power rule does not work for non-constant exponents; by that logic the derivative of $x^x$ would be $x\cdot x^{x-1}=x^x$, which is flat-out wrong.
