# Differentiate the following functions with respect to x :

Question:

Differentiate the following functions with respect to $x$ :

$e^{x} \log (\sin 2 x)$

Solution:

Let $y=e^{x} \log (\sin 2 x)$

On differentiating $y$ with respect to $x$, we get

$\frac{d y}{d x}=\frac{d}{d x}\left[e^{x} \log (\sin 2 x)\right]$

We have $(\text { uv })^{\prime}=$ vu' $+$ uv' (product rule)

$\Rightarrow \frac{d y}{d x}=\log (\sin 2 x) \frac{d}{d x}\left(e^{x}\right)+e^{x} \frac{d}{d x}[\log (\sin 2 x)]$

We know $\frac{d}{d x}\left(e^{x}\right)=e^{x}$ and $\frac{d}{d x}(\log x)=\frac{1}{x}$

$\Rightarrow \frac{d y}{d x}=\log (\sin 2 x) \times e^{x}+e^{x}\left[\frac{1}{\sin 2 x} \frac{d}{d x}(\sin 2 x)\right]$ [chain rule]

$\Rightarrow \frac{d y}{d x}=e^{x} \log (\sin 2 x)+\frac{e^{x}}{\sin 2 x}\left[\frac{d}{d x}(\sin 2 x)\right]$

We have $\frac{\mathrm{d}}{\mathrm{dx}}(\sin \mathrm{x})=\cos \mathrm{x}$

$\Rightarrow \frac{d y}{d x}=e^{x} \log (\sin 2 x)+\frac{e^{x}}{\sin 2 x}\left[\cos 2 x \frac{d}{d x}(2 x)\right]$

$\Rightarrow \frac{d y}{d x}=e^{x} \log (\sin 2 x)+\frac{2 e^{x} \cos 2 x}{\sin 2 x}\left[\frac{d}{d x}(x)\right]$

$\Rightarrow \frac{d y}{d x}=e^{x} \log (\sin 2 x)+2 e^{x} \cot 2 x\left[\frac{d}{d x}(x)\right]$

However, $\frac{\mathrm{d}}{\mathrm{dx}}(\mathrm{x})=1$

$\Rightarrow \frac{\mathrm{dy}}{\mathrm{dx}}=\mathrm{e}^{\mathrm{x}} \log (\sin 2 \mathrm{x})+2 \mathrm{e}^{\mathrm{x}} \cot 2 \mathrm{x} \times 1$

$\Rightarrow \frac{\mathrm{dy}}{\mathrm{dx}}=\mathrm{e}^{\mathrm{x}} \log (\sin 2 \mathrm{x})+2 \mathrm{e}^{\mathrm{x}} \cot 2 \mathrm{x}$

$\therefore \frac{\mathrm{dy}}{\mathrm{dx}}=\mathrm{e}^{\mathrm{x}}[\log (\sin 2 \mathrm{x})+2 \cot 2 \mathrm{x}]$

Thus, $\frac{d}{d x}\left[e^{x} \log (\sin 2 x)\right]=e^{x}[\log (\sin 2 x)+2 \cot 2 x]$