# $\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 ?

• N.b. the Weierstrass substitution in this case just amounts to $t = \tan x$, which gives the relatively straightforward integral $\int \left(\frac{1}{t} - \frac{8 t}{(1 + t^2)^2}\right)dt$. Commented Nov 19, 2022 at 9:33

Here is an interesting approach: $$\int \dfrac{\mathrm{d}x}{\sin x}=\int \dfrac{2\mathrm{d}t}{\sin 2t}=\int \dfrac{\mathrm{d}t}{\sin t \cos t}=\int \dfrac{\sin^2t+\cos^2t}{\sin t \cos t}\mathrm{d}t=\int \left(\dfrac{\sin t}{\cos t}+\dfrac{\cos t}{\sin t}\right)\mathrm{d}t$$ $$\int \left(\dfrac{\sin t}{\cos t}+\dfrac{\cos t}{\sin t}\right)\mathrm{d}t=-\log (\cos t)+\log(\sin t)+k=\log (\tan t)+k$$ Since $$x=2t$$, you have: $$\int \dfrac{\mathrm{d}x}{\sin x}=\log \left(\tan \dfrac{x}{2}\right)+k$$
Hint Rewrite the standard integration formula $$\int \cot u \,du = - \log\left\vert\csc u + \cot u\right\vert + C$$ using a half-angle identity for cotangent, $$\csc u + \cot u = \frac{1 + \cos u}{\sin u} = \cot \frac{u}{2} = \cot x .$$
$$\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$$