<s>[INST] Finding $\int \frac{dx}{a+b \cos x}$ without Weierstrass substitution. I saw somewhere on Math Stack that there was a way of finding integrals in the form $$\int \frac{dx}{a+b \cos x}$$ without using Weierstrass substitution, which is the usual technique. 
When $a,b=1$ we can just multiply the numerator and denominator by $1-\cos x$ and that solves the problem nicely. 
But I remember that the technique I saw was a nice way of evaluating these even when $a,b\neq 1$.
 [/INST] Another way to get to the same point as C. Dubussy got to is the following:
\begin{align*}
\frac{1}{a + b \cos x} &= \frac{1}{a \left (\cos^2 \frac{x}{2} + \sin^2 \frac{x}{2} \right ) + b \left (\cos^2 \frac{x}{2} - \sin^2 \frac{x}{2} \right )}\\
&= \frac{1}{(a - b) \sin^2 \frac{x}{2} + (a + b) \cos^2 \frac{x}{2}}\\
&= \frac{\sec^2 \frac{x}{2}}{(a + b) + (a - b) \tan^2 \frac{x}{2}},
\end{align*}
and then make the substitution of $t = \tan \frac{x}{2}$ in the integral.
</s>