Question:
Evaluate the following integrals:
$\int e^{x}(\cot x+\log \sin x) d x$
Solution:
Let $I=\int e^{x}(\cot x+\log \sin x) d x$
$=\int e^{x} \cot x d x+\int e^{x} \log \sin x d x$
Integrating by parts
$=\int e^{x} \log \sin x d x+\int e^{x} \cot x d x$
$=(\log \sin x) e^{x}-\int e^{x} \frac{d}{d x} \log \sin x d x+\int e^{x} \cot x d x+c$
$=(\log \sin x) e^{x}-\int e^{x} \cot x d x+\int e^{x} \cot x d x+c$
$=(\log \sin x) e^{x}+c$