Evaluate the following integral:
Question:

Evaluate the following integral:

$\int \frac{1}{\sin x+\sin 2 x} d x$

Solution:

Let, $I=\int \frac{1}{\sin x+\sin 2 x} d x$

$\Rightarrow I=\int \frac{1}{\sin x+2 \sin x \cos x} d x$

Multiplying and dividing by $\sin x$

$\Rightarrow I=\int \frac{\sin x}{\sin ^{2} x+2 \sin ^{2} x \cdot \cos x} d x$

$\Rightarrow I=\int \frac{\sin \mathrm{x}}{1-\cos ^{2} \mathrm{x}+2\left(1-\cos ^{2} \mathrm{x}\right) \cos \mathrm{x}} \mathrm{dx}$

Let $\cos x=t,-\sin x d x=d t$

$\Rightarrow 1=A(1+t)(1+2 t)+B(t-1)(1+2 t)+C\left(t^{2}-1\right)$

$\therefore I=\int \frac{d t}{\left(t^{2}-1\right)+2\left(t^{2}-1\right) t}$

$\Rightarrow I=\int \frac{d t}{\left(t^{2}-1\right)(1+2 t)}$

Let, $\frac{1}{\left(t^{2}-1\right)(1+2 t)}=\frac{A}{t-1}+\frac{B}{1+t}+\frac{C}{1+2 t}$

For $t=1, A=\frac{1}{6}$

For $t=-1, B=\frac{1}{2}$

For $t=-\frac{1}{2}, C=-\frac{4}{3}$

So, $I=\frac{1}{6} \int \frac{\mathrm{dt}}{\mathrm{t}-1}+\frac{1}{2} \int \frac{\mathrm{dt}}{\mathrm{t}+1}-\frac{4}{3} \int \frac{\mathrm{dt}}{1+2 \mathrm{t}}$

$\Rightarrow \mathrm{I}=\frac{1}{6} \log |\mathrm{t}-1|+\frac{1}{2} \log |1+\mathrm{t}|-\frac{2}{3} \log |1+2 \mathrm{t}|+\mathrm{c}$

So, $I=\frac{1}{6} \log |\cos x-1|+\frac{1}{2} \log |1+\cos x|-\frac{2}{3} \log |1+2 \cos x|+c$