# How to find $\int \frac{\sin x}{2\cos 2x} \operatorname{d}x$?

How to compute $$\int \frac{\sin x}{2\cos 2x} \operatorname{d}x$$

-
In an exam that would be -5 points for missing $\operatorname{d}x$... :-) –  Asaf Karagila Oct 24 '11 at 8:02

Note that $\frac{\sin x}{\cos2x}=\frac{1}{2}\frac{(\cos x+\sin x)-(\cos x-\sin x)}{(\cos x+\sin x)(\cos x-\sin x)}=\frac{1}{2}\left[\frac{1}{(\cos x-\sin x)}-\frac{1}{(\cos x+\sin x)}\right]=\frac{1}{2\sqrt{2}}[$sec$(x$-$\frac{\pi}{4})$-sec$(x$+$\frac{\pi}{4})]$
Substituting $\cos x = y$, the integral becomes $$\frac{1}{2} \int \frac{(-dy)}{2y^2-1} = \frac{1}{4} \int \frac{1}{\frac{1}{2}-y^2} dy.$$ Since the integrand is a rational function of $y$, we can write it in terms of partial fractions: $$\frac{1}{\frac{1}{2}-y^2} = \frac{1}{\sqrt{2}} \left(\frac{1}{\frac{1}{\sqrt 2} +y} + \frac{1}{\frac{1}{\sqrt 2}-y} \right).$$ Can you take it from here?