# Differentiate the following functions with respect to x :

Question:

Differentiate the following functions with respect to $x$ :

$(\sin x)^{\cos x}$

Solution:

Let $y=(\sin x)^{\cos x}$

Taking log both the sides:

$\Rightarrow \log y=\log (\sin x)^{\cos x}$

$\Rightarrow \log y=\cos x \log \sin x\left\{\log x^{a}=a \log x\right\}$

Differentiating with respect to $\mathrm{x}$ :

$\Rightarrow \frac{\mathrm{d}(\log \mathrm{y})}{\mathrm{dx}}=\frac{\mathrm{d}(\cos \mathrm{x} \log \sin \mathrm{x})}{\mathrm{dx}}$

$\Rightarrow \frac{d(\log y)}{d x}=\cos x \times \frac{d(\log \sin x)}{d x}+\log \sin x \times \frac{d(\cos x)}{d x}$

$\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}=\cos x \times \frac{1}{\sin x} \frac{d(\sin x)}{d x}+\log \sin x(-\sin x)$

$\left\{\frac{\mathrm{d}(\log \mathrm{u})}{\mathrm{dx}}=\frac{1}{\mathrm{u}} \frac{\mathrm{du}}{\mathrm{dx}} ; \frac{\mathrm{d}(\cos \mathrm{x})}{\mathrm{dx}}=-\sin \mathrm{x} ; \frac{\mathrm{d}(\sin \mathrm{x})}{\mathrm{dx}}=\cos \mathrm{x}\right\}$

$\Rightarrow \frac{1}{y} \frac{d y}{d x}=\cot x(\cos x)-\sin x \log \sin x$

$\Rightarrow \frac{d y}{d x}=y\{\cos x \cot x-\sin x \log \sin x\}$

Put the value of $y=(\sin x)^{\cos x}:$

$\Rightarrow \frac{d y}{d x}=(\sin x)^{\cos x}\{\cos x \cot x-\sin x \log \sin x\}$