$\int \frac{\cos 4x}{4 \sin 2x} dx$ $\int \frac{\cos 4x}{4 \sin 2x} dx$
Let $u=2x$, $dx = 1/2 du$
$\int \frac{\cos 2u}{4 \sin u} \frac{1}{2} du = \frac{1}{8} \int \frac{1-2\sin^2 u}{\sin u}du \frac{1}{8} \int \frac{1}{\sin u} du - \frac{1}{8} \int 2 \sin u$
How do I integrate $\int \frac{1}{\sin u} du$ to get $\ln (\tan x)$ ?
The online calculator told me to use Weierstrass Substitution which I have not learnt before. Is there any other way to solve this ?

$$\int \frac{dx}{\sin x}=\int \frac{d(\cos x)}{\cos^2x-1}
= \frac12\ln \frac{1-\cos x}{1+\cos x}=\frac12\ln\frac{\sin^2\frac x2}{\cos^2\frac x2}=\ln\tan\frac x2
$$
