How many ways to deal with the integral $\int \frac{d x}{1-\sin x \cos x}$?

Solution 1:

We could use the double-angle formula for sine,

$$\sin 2x = 2 \sin x \cos x$$

and then get

$$\newcommand{\II}{\mathcal{I}} \newcommand{\dd}{\mathrm{d}} \II := \int \frac{\dd x}{1 - \sin x \cos x} = \int \frac{\dd x}{1 - \frac 1 2 \sin 2x} =2 \int \frac{\dd x}{2 - \sin 2x}$$

Then let $u = 2x$ to get

$$\II = \int \frac{\dd u}{2 - \sin u}$$

Weierstrass substitution ($t = \tan(u/2)$) then gives

$$\II = \int \frac{1}{2 - \frac{2t}{1+t^2}} \frac{2}{1+t^2} \, \dd t = \int \frac{\dd t}{t^2 - t + 1}$$

Integral $(13)$ from this PDF then gives the answer

$$\II = \frac{2}{\sqrt 3} \arctan \left( \frac{2t - 1}{\sqrt 3} \right) + C = \frac{2}{\sqrt 3} \arctan \left( \frac{2 \tan(x) - 1}{\sqrt 3} \right) + C $$

Solution 2:

another method:

$\sin(x) = \frac{tan(x)}{sec(x)}$ and $\cos(x) = \frac{1}{sec(x)}$

now you have to do u-substitution and complete the square.