Differentiate the following functions with respect to $x$ :
$\frac{2^{x} \cos x}{\left(x^{2}+3\right)^{2}}$
Let $y=\frac{2^{x} \cos x}{\left(x^{2}+3\right)^{2}}$
On differentiating y with respect to $x$, we get
$\frac{d y}{d x}=\frac{d}{d x}\left[\frac{2^{x} \cos x}{\left(x^{2}+3\right)^{2}}\right]$
Recall that $\left(\frac{\mathrm{u}}{\mathrm{v}}\right)^{\prime}=\frac{\mathrm{vu}^{\prime}-\mathrm{uv}^{\prime}}{\mathrm{v}^{2}}$ (quotient rule)
$\Rightarrow \frac{d y}{d x}=\frac{\left(x^{2}+3\right)^{2} \frac{d}{d x}\left(2^{x} \cos x\right)-\left(2^{x} \cos x\right) \frac{d}{d x}\left[\left(x^{2}+3\right)^{2}\right]}{\left[\left(x^{2}+3\right)^{2}\right]^{2}}$
We have (uv)' = vu' + uv' (product rule)
$\Rightarrow \frac{d y}{d x}=\frac{\left(x^{2}+3\right)^{2}\left[\cos x \frac{d}{d x}\left(2^{x}\right)+2^{x} \frac{d}{d x}(\cos x)\right]-\left(2^{x} \cos x\right) \frac{d}{d x}\left[\left(x^{2}+3\right)^{2}\right]}{\left(x^{2}+3\right)^{4}}$
We know $\frac{d}{d x}\left(a^{x}\right)=a^{x} \log a, \frac{d}{d x}(\cos x)=-\sin x$ and $\frac{d}{d x}\left(x^{n}\right)=n x^{n-1}$
$\Rightarrow \frac{\mathrm{dy}}{\mathrm{dx}}$
$=\frac{\left(x^{2}+3\right)^{2}\left[\cos x\left(2^{x} \log 2\right)+2^{x}(-\sin x)\right]-\left(2^{x} \cos x\right)\left[2\left(x^{2}+3\right)^{2-1} \frac{d}{d x}\left(x^{2}+3\right)\right]}{\left(x^{2}+3\right)^{4}}$
$\Rightarrow \frac{d y}{d x}$
$=\frac{\left(x^{2}+3\right)^{2}\left[2^{x} \log 2 \cos x-2^{x} \sin x\right]-\left(2^{x} \cos x\right)\left[2\left(x^{2}+3\right)\left\{\frac{d}{d x}\left(x^{2}\right)+\frac{d}{d x}(3)\right\}\right]}{\left(x^{2}+3\right)^{4}}$
However, $\frac{d}{d x}\left(x^{2}\right)=2 x$ and derivative of constant is 0 .
$\Rightarrow \frac{d y}{d x}=\frac{\left(x^{2}+3\right)^{2}\left[2^{x} \log 2 \cos x-2^{x} \sin x\right]-\left(2^{x} \cos x\right)\left[2\left(x^{2}+3\right)\{2 x+0\}\right]}{\left(x^{2}+3\right)^{4}}$
$\Rightarrow \frac{d y}{d x}=\frac{\left(x^{2}+3\right)^{2} 2^{x}(\log 2 \cos x-\sin x)-2^{x} 4 x\left(x^{2}+3\right) \cos x}{\left(x^{2}+3\right)^{4}}$
$\Rightarrow \frac{d y}{d x}=\frac{\left(x^{2}+3\right)^{2} 2^{x}(\log 2 \cos x-\sin x)}{\left(x^{2}+3\right)^{4}}-\frac{2^{x} 4 x\left(x^{2}+3\right) \cos x}{\left(x^{2}+3\right)^{4}}$
$\Rightarrow \frac{\mathrm{dy}}{\mathrm{dx}}=\frac{2^{\mathrm{x}}(\log 2 \cos \mathrm{x}-\sin \mathrm{x})}{\left(\mathrm{x}^{2}+3\right)^{2}}-\frac{2^{\mathrm{x}} 4 \mathrm{x} \cos \mathrm{x}}{\left(\mathrm{x}^{2}+3\right)^{3}}$
$\therefore \frac{\mathrm{dy}}{\mathrm{dx}}=\frac{2^{\mathrm{x}}}{\left(\mathrm{x}^{2}+3\right)^{2}}\left(\log 2 \cos \mathrm{x}-\sin \mathrm{x}-\frac{4 \mathrm{x} \cos \mathrm{x}}{\mathrm{x}^{2}+3}\right)$
Thus, $\frac{d}{d x}\left[\frac{2^{x} \cos x}{\left(x^{2}+3\right)^{2}}\right]=\frac{2^{x}}{\left(x^{2}+3\right)^{2}}\left(\log 2 \cos x-\sin x-\frac{4 x \cos x}{x^{2}+3}\right)$