For $ a > 1 $ show that \begin{equation} J = \int\limits_0^{\pi}\frac{dx}{a + \cos{x}}=\frac{\pi}{\sqrt{a^2 -1}} \end{equation}
Neither of trivial methods like integration by parts works. The most natural change of variable I see is \begin{equation} t = \cos{x}\\ dt = d\cos{x}=-\sin x \, dx=-\sqrt{1 - t^2} \, dx \text{ for } x \in [0, \pi] \end{equation} Therefore \begin{equation} J = \int\limits_{-1}^{1}\frac{dt}{(a + t)\sqrt{1 - t^2}} \end{equation} which seems relatively simple, but I didn't manage to either solve it by any common method or to find it in any list of integrals.
@Prism thank you. It's a great solution, let me share it.
Substitution $ z = e^{ix} $, than \begin{equation} \cos{x}=\frac{1}{2}(z + \frac{1}{z})\\ \sin{x}=\frac{1}{2i}(z - \frac{1}{z})\\ dx = -i\frac{dz}{z} \end{equation}
Since $ \cos{x} $ takes the same values in the intervals $ (0, \pi) $ and $ (\pi, 2\pi) $ it is clear that the integral from $ 0 $ to $ \pi $ is one-half of the integral from $ 0 $ to $ 2\pi $. Taking this into account we find that the integral equals \begin{equation} -i\oint\limits_{|z|=1}\frac{dz}{z^2 + 2az + 1} \end{equation} The denominator can be factored into $ (z - \alpha)(z - \beta) $ with \begin{equation} \alpha = -a + \sqrt{a^2 - 1}, \ \beta = -a - \sqrt{a^2 - 1} \end{equation} Evidently $ |\alpha| < 1,\ |\beta| > 1 $, and the residue at $ \alpha $ is $ \frac{1}{(\alpha - \beta)} $. The value of the integral is found to be $\pi / \sqrt{a^2 - 1}$