Let
\[
y=x^x.
\]
Here, both the base and the power contain \(x\), so we use logarithmic differentiation.
Taking logarithm on both sides:
\[
\log y=\log(x^x).
\]
Using the property
\[
\log(a^b)=b\log a,
\]
we get
\[
\log y=x\log x.
\]
Now differentiate both sides with respect to \(x\).
Left side:
\[
\frac{d}{dx}(\log y)=\frac{1}{y}\frac{dy}{dx}.
\]
Right side:
\[
\frac{d}{dx}(x\log x).
\]
Using product rule:
\[
\frac{d}{dx}(x\log x)=x\cdot\frac{1}{x}+\log x\cdot 1.
\]
\[
=1+\log x.
\]
Therefore,
\[
\frac{1}{y}\frac{dy}{dx}=1+\log x.
\]
Multiply both sides by \(y\):
\[
\frac{dy}{dx}=y(1+\log x).
\]
Since
\[
y=x^x,
\]
we get
\[
\frac{dy}{dx}=x^x(1+\log x).
\]
Hence, the derivative is
\[
x^x(1+\log x).
\]