Differentiate the following functions with respect to $x$ :
$(\log \sin x)^{2}$
Let $y=(\log \sin x)^{2}$
On differentiating y with respect to $x$, we get
$\frac{\mathrm{dy}}{\mathrm{dx}}=\frac{\mathrm{d}}{\mathrm{dx}}\left[(\log (\sin \mathrm{x}))^{2}\right]$
We know $\frac{d}{d x}\left(x^{n}\right)=n x^{n-1}$
$\Rightarrow \frac{d y}{d x}=2(\log (\sin x))^{2-1} \frac{d}{d x}[\log (\sin x)]$ [using chain rule]
$\Rightarrow \frac{d y}{d x}=2 \log (\sin x) \frac{d}{d x}[\log (\sin x)]$
We have $\frac{d}{d x}(\log x)=\frac{1}{x}$
$\Rightarrow \frac{d y}{d x}=2 \log (\sin x)\left[\frac{1}{\sin x} \frac{d}{d x}(\sin x)\right]$ [using chain rule]
$\Rightarrow \frac{d y}{d x}=\frac{2}{\sin x} \log (\sin x) \frac{d}{d x}(\sin x)$
However, $\frac{d}{d x}(\sin x)=\cos x$
$\Rightarrow \frac{d y}{d x}=\frac{2}{\sin x} \log (\sin x) \cos x$
$\Rightarrow \frac{\mathrm{dy}}{\mathrm{dx}}=2\left(\frac{\cos \mathrm{x}}{\sin \mathrm{x}}\right) \log (\sin \mathrm{x})$
$\therefore \frac{d y}{d x}=2 \cot x \log (\sin x)$
Thus, $\frac{d}{d x}\left[(\log (\sin x))^{2}\right]=2 \cot x \log (\sin x)$