<s>[INST] How many methods are there to find $\int_{0}^{\pi} \frac{d \theta}{a+b \cos \theta}, \textrm{ where }a>b>0$ When I deal with this simple integral, I found there are several methods. Now I share one of them.
Letting $x\mapsto \pi-x $ yields $$I=\int_{0}^{\pi} \frac{d \theta}{a+b \cos \theta}=\int_{0}^{\pi} \frac{d \theta}{a-b \cos \theta}$$
Adding two versions together yields
$$
\begin{aligned}
2 I &=2 a \int_{0}^{\pi} \frac{d \theta}{a^{2}-b^{2} \cos ^{2} \theta} \\
&=4 a\int_0^{\frac{\pi}{2}} \frac{\sec ^{2} \theta}{a^{2} \sec ^{2} \theta-b^{2}} d \theta \quad \textrm{( By symmetry )}\\
&=4 a{\int_{0}^{\infty}} \frac{d t}{\left(a^{2}-b^{2}\right)+a^{2} t^{2}} \\
&=\frac{4}{\sqrt{a^{2}-b^{2}}}\left[\tan^{-1} \left(\frac{at}{\sqrt{a^{2}-b^{2}}}\right)\right]_{0}^{\infty} \\
&=\frac{2 \pi}{\sqrt{a^{2}-b^{2}}}
\end{aligned}
$$
We can now conclude that $$
\boxed{I=\frac{\pi}{\sqrt{a^{2}-b^{2}}}}
$$
Are there any other methods to deal with the integral?
 [/INST] Here's an interesting geometric approach I read in one of Jack D' Aurizio's answers (and have never forgotten). It's not as efficient as using a Weierstrass substitution but I believe the geometric interpretation itself merits some sort of recognition.
For a closed and continuous curve $r(\theta)$ where $0\leq\theta\leq2\pi$, then the area of the region bounded by $r$ can be expressed as
$$A=\frac 12\int\limits_0^{2\pi}r^2(\theta)\,\mathrm d\theta$$
In this problem's case, we can transform the integral into the form above by observing that
$$I=\int\limits_0^{\pi}\frac {\mathrm d\theta}{\left(a+b\cos\theta\right)^2}=\frac 12\int\limits_0^{2\pi}\frac {\mathrm d\theta}{(a+b\cos\theta)^2}$$
Therefore, when
$$r=\frac 1{a+b\cos\theta}$$
the integral $I$ describes the area of an ellipse, which is equal to $\pi$ times the product of the semi-axis. Converting to rectangular coordinates, then we get
$$\frac {\left(a^2-b^2\right)^2}{a^2}\left(x+\frac b{a^2-b^2}\right)^2+\left(a^2-b^2\right)y^2=1$$
Thus, the area is then
$$\int\limits_0^{\pi}\frac {\mathrm d\theta}{(a+b\cos\theta)^2}=\pi\cdot\frac a{a^2-b^2}\cdot\frac 1{\sqrt{a^2-b^2}}=\frac {\pi a}{\left(a^2-b^2\right)^{3/2}}$$
Now, integrate both sides with respect to $a$ to see that
$$\int\limits_0^{\pi}\frac {\mathrm d\theta}{a+b\cos\theta}\color{blue}{=\frac {\pi}{\sqrt{a^2-b^2}}}$$
</s>