Evaluate the following integrals:

Question:

Evaluate the following integrals:

$\int e^{x}\left(\frac{\sin x \cos x-1}{\sin ^{2} x}\right) d x$

Solution:

Let $I=\int e^{x}\left(\frac{\sin x \cos x-1}{\sin ^{2} x}\right) d x$

$=\int e^{x}\left(\cot x-\operatorname{cosec}^{2} x\right) d x$

$=\int e^{x}\left(\cot x+-\operatorname{cosec}^{2} x\right) d x$

We know that, $\int e^{x}\left\{f(x)+f^{\prime}(x)\right\}=e^{x} f(x)+c$

let $\mathrm{f}(\mathrm{x})=\cot \mathrm{x} ; \mathrm{f}^{\prime}(\mathrm{x})=-\operatorname{cosec}^{2} \mathrm{x}$

$\int e^{x}\left(\frac{\sin x \cos x-1}{\sin ^{2} x}\right) d x=e^{x} \cot x+c$