In this case we need to use logarithmic differentiation, indeed it is impossible to use the power rule since there is an
as exponent. We cannot differentiate it in the same way we do for exponential functions since we take the power of x and not e or another constant. Hence we need to use logarithmic differentiation. First set
![{\displaystyle y=x^{(x^{2})},}](https://wiki.ubc.ca/api/rest_v1/media/math/render/svg/d0bb9a875ddc4997d159b46c280b4e3c53fe5e2a)
then taking the logarithm on both sides we find
![{\displaystyle \ln y=\ln(x^{(x^{2})})=x^{2}\ln(x).}](https://wiki.ubc.ca/api/rest_v1/media/math/render/svg/360df7ca8074a06fdd42e6c0ec9afdf50dfcfac8)
Now keeping in mind that y is a function of x, we can take the derivatives on both sides and get
![{\displaystyle {\frac {d}{dx}}\ln y={\frac {d}{dx}}(x^{2}\ln(x)).}](https://wiki.ubc.ca/api/rest_v1/media/math/render/svg/c22909c8b9234db75073809e60508b0d6cf2b459)
The left-hand side is simply
![{\displaystyle {\frac {d}{dx}}\ln y={\frac {1}{y}}\cdot {\frac {d}{dx}}y={\frac {1}{y}}y',}](https://wiki.ubc.ca/api/rest_v1/media/math/render/svg/82970e71117b632eb4b848d01954126a50984bee)
while the right-hand side gives, using the product rule,
![{\displaystyle {\frac {d}{dx}}(x^{2}\ln(x))=2x\ln(x)+x^{2}{\frac {1}{x}}=2x\ln(x)+x.}](https://wiki.ubc.ca/api/rest_v1/media/math/render/svg/34631859232f1dd5cc9318048614f0c99c2489d5)
Putting everything back together, we get
![{\displaystyle {\frac {1}{y}}y'=2x\ln(x)+x,}](https://wiki.ubc.ca/api/rest_v1/media/math/render/svg/e68124770d6a6dfb451274d0e1d0dc6dddcde984)
and thus
![{\displaystyle \displaystyle y'=y(2x\ln(x)+x).}](https://wiki.ubc.ca/api/rest_v1/media/math/render/svg/2f84e5d2aa4f063b072af7e13642bdefeadcccdf)
Replacing y by
we finally get
![{\displaystyle y'=x^{(x^{2})}(2x\ln(x)+x).}](https://wiki.ubc.ca/api/rest_v1/media/math/render/svg/a2501e90ea7fc970cbac36b9111dee143265dd4b)