Differentiate the following functions with respect to $x$ :
$x^{\sin x}$
Let $y=x^{\sin x}$
Taking log both the sides:
$\log y=\log \left(x^{\sin x}\right)$
$\log y=\sin x \log x\left\{\log x^{a}=\operatorname{alog} x\right\}$
Differentiating with respect to $\mathrm{x}$ :
$\Rightarrow \frac{\mathrm{d}(\log \mathrm{y})}{\mathrm{dx}}=\frac{\mathrm{d}(\sin \mathrm{x} \log \mathrm{x})}{\mathrm{dx}}$
$\Rightarrow \frac{\mathrm{d}(\log \mathrm{y})}{\mathrm{dx}}=\sin \mathrm{x} \times \frac{\mathrm{d}(\log \mathrm{x})}{\mathrm{dx}}+\log \mathrm{x} \times \frac{\mathrm{d}(\sin \mathrm{x})}{\mathrm{dx}}$
$\left\{\right.$ Using product rule, $\left.\frac{\mathrm{d}(\mathrm{uv})}{\mathrm{dx}}=\mathrm{u} \frac{\mathrm{dv}}{\mathrm{dx}}+\mathrm{v} \frac{\mathrm{du}}{\mathrm{dx}}\right\}$
$\Rightarrow \frac{1}{y} \frac{d y}{d x}=\sin x \times \frac{1}{x} \frac{d x}{d x}+\log x(\cos x)$
$\left\{\frac{\mathrm{d}(\log \mathrm{u})}{\mathrm{dx}}=\frac{1}{\mathrm{u}} \frac{\mathrm{du}}{\mathrm{dx}} \& \frac{\mathrm{d}(\sin \mathrm{x})}{\mathrm{dx}}=\cos \mathrm{x}\right\}$
$\Rightarrow \frac{1}{y} \frac{d y}{d x}=\frac{\sin x}{x}+\log x \cos x$
$\Rightarrow \frac{d y}{d x}=y\left(\frac{\sin x}{x}+\log x \cos x\right)$
Put the value of $y=x^{\sin x}$ :
$\Rightarrow \frac{d y}{d x}=x^{\sin x}\left(\frac{\sin x}{x}+\log x \cos x\right)$