Sometimes given function does not qualify either as exponential or polynomial. For example consider $$f(x)=x^x$$. How to find the derivative in this case? We propose two approaches:

By the Definition of the Logarithm

Remember: logarithm of some $$b$$ with a base $$a$$ is such a number that:

\[a^{\log_a b}=b\]

Let us apply the same to the input function:

\[x^x=e^{\ln x^x}=e^{x\ln x}\]

This is manageable since it is simple composition of exponential and $$x \ln x$$ function. Thus we get:

\[ (x^x)'=(e^{x \ln x})'=e^{x\ln x}\cdot (x\ln x)'=x^x \cdot \left((x)'\cdot \ln x + x\cdot (\ln x)' \right)=x^x(\ln x+1) \]

By logarithmic equation

Consider we have written input as:

\[ y(x)=x^x \]

Then we can in advance take a logarithm of both sides:

\[ \ln y(x)=x \ln x \]

Since both sides coincide, their derivatives coincide two:

\[ ( \ln y(x) )'=\ln x+1 \]

In the left part we clearly see the composition and thus we apply the chain rule:

\[ \frac{1}{y(x)}\cdot y'(x)=\ln x +1 \]

\[y'=y\cdot (\ln x+1) \]