Integrate : $\int \frac{\sin x}{\sin4x} \,dx$

From the step before the last step you had it as:

$$\eqalign{\int\frac{dx}{\cos x\cos2x} &= \int\frac{dx}{\cos x(2(\cos x)^2 - 1))}\cr & = \int\frac{1}{\cos x} - \frac{2\cos x}{(2(\cos x)^2 - 1)}dx\cr & = \int\frac{1}{\cos x} - \frac{2\cos x}{1 - 2(\sin x)^2}dx\ .\cr}$$

From now you can integrate 1/cosx = secx and its antiderivative is well known.

The second term: let u = sinx, then du = cosxdx, and use fration decomposition to continue.


$$\frac1{\cos x\cos2x}=\frac{\cos x}{\cos^2x(\cos2x)}=\frac{\cos x}{(1-\sin^2x)(1-2\sin^2x)} $$

Setting $\displaystyle\sin x=u$ in $\displaystyle I=\int\frac{dx}{\cos x\cos2x},$

$\displaystyle I=\int\frac{du}{(1-u^2)(1-2u^2)} =\frac12\int\frac{du}{(1-u^2)\left(\dfrac12-u^2\right)} $

$\displaystyle I=\frac22\int\frac{(1-u^2)-\left(\dfrac12-u^2\right)}{(1-u^2)\left(\dfrac12-u^2\right)}du=\int\frac{du}{1-u^2}-\int\frac{du}{\dfrac12-u^2}$

Can you take it home from here?