How To Use The Steps on Page 149 in Calculus Made Easy To Solve Chapter XIV Example 12 Please how do I take the derivative of
$ y = \left(\frac{1}{a^x}\right)^{ax} $
from Calculus Made Easy Chapter XIV Example 12 using the steps used 
to solve 
$y=a^x$ 
on page 149.
The steps are 
\begin{align*}
y & = a^x\\
\log_ey & = x\log_e a\\
x & =\frac{\log_ey}{\log_ea} = \frac{1}{\log_ea}\, x \,\log_ey\\
\frac{dx}{dy} & =\frac{1}{\log_ea}\, x \, \frac{1}{a^2 \, x\, \log_ea}\\
\frac{dy}{dx} & = \frac{1}{\frac{dx}{dy}} = a^x \, x\, \log_ea
\end{align*}
These were my steps and were I got stuck
\begin{align*}
y & = \left(\frac{1}{a^x} \right)^{ax}\\
y & = a^{-ax^2}\\
\log_ey & = \log_ea^{-ax^2}\\
\log_ey & = -ax^2\log_ea\\
\frac{\log_ey}{\log_ea} & = -ax^2
\end{align*}

$y(x)=\exp(\ln(a) a x)$ its derivative is $a\ln(a)\exp(\ln(a)ax)$.
