Is there a closed form expression for $\int_{0}^{\pi}\frac{1}{a-cos\theta}d\theta$? Is there a closed form results for this integral
$$
\int_{0}^{\pi}\frac{1}{a-cos\theta}d\theta
$$
where a > 1.
 A: Hint:
you can use the substitution:
$$
u=\tan \left(\frac{x}{2}\right)
$$
that gives:
$$
\cos x= \frac{1-u^2}{1+u^2} \qquad dx=\frac{2 du}{1+u^2}
$$
A: With residue calculus we can evaluate it without any difficulty.
Setting $z = e^{i\theta}$ we have
$$\cos\theta = \frac{1}{2}(z + z^{-1})$$
So
$$\frac{1}{2}\int_0^{2\pi}\frac{-i}{z\left(a - \frac{1}{2}\left(z + \frac{1}{z}\right)\right)}\ \text{d}z$$
We denote
$$f(z) = \frac{-i}{z\left(a - \frac{1}{2}\left(z + \frac{1}{z}\right)\right)} = \frac{i}{z^2 - za + 1}$$
Since $a > 1$ you will get real or complex roots respectively for $a \geq 2$ and $1 < a < 2$.
If you know how to compute residues, after putting in the unit circle you will have to compute
$$2\pi i \sum_{\alpha} \text{res}(f(z), z_{\alpha})$$
In the end
$$\int_0^{\pi}\frac{1}{a - \cos\theta}\ \text{d}\theta = \frac{\sqrt{\frac{a+1}{a-1}}\pi}{1+a}$$
Which since $a > 1$ becomes
$$\int_0^{\pi}\frac{1}{a - \cos\theta}\ \text{d}\theta = \frac{\pi}{\sqrt{a^2-1}}$$
A: Put the integral in standard form:
$$\int\frac1{a-\cos\theta}d\theta=\frac1a\int\frac1{1-\frac1a\cos\theta}d\theta=\frac1a\int\frac1{1+e\cos\nu}d\nu$$
where $0<e=\frac1a<1$ is the eccentricity and $\nu=\theta-\pi$ is the true anomaly. Convert to eccentric anomaly:
$$\sin E=\frac{\sqrt{1-e^2}\sin\nu}{1+e\cos\nu},\,\cos E=\frac{\cos\nu+e}{1+e\cos\nu},\,dE=\frac{\sqrt{1-e^2}}{1+e\cos\nu}d\nu$$
Then
$$\int\frac1{a-\cos\theta}d\theta=\frac1{a\sqrt{1-e^2}}\int dE=\frac1{\sqrt{a^2-1}}E+C$$
When $\theta=0,\,\nu=-\pi,\,\sin E=0,\,\cos E=-1,\,E=-\pi$.
When $\theta=\pi,\,\nu=0,\,\sin E=0,\,\cos E=1,\,E=0$.
So $$\int_0^{\pi}\frac1{a-\cos\theta}d\theta=\frac1{a\sqrt{1-e^2}}\int_{-\pi}^0 dE=\left.\frac1{\sqrt{a^2-1}}E\,\right|_{-\pi}^0=\frac{\pi}{\sqrt{a^2-1}}$$
The eccentric anomaly goes back at least to Kepler, who used it to express his law of areas (which is the geometric equivalent of conservation of angular momentum).
A: do you know complex analysis, the Cauchy integral formula, the residue theorem ? if not, write $$\int_0^{\pi} \frac{1}{a - \cos \theta} d\theta = \frac12 \int_{-\pi}^{\pi} \frac{1}{a - \cos \theta} d\theta =  \int_{-\pi}^{\pi} \frac{1}{2a - e^{i \theta} - e^{-i \theta}} d\theta = - \int_{-\pi}^{\pi} \frac{e^{i \theta}}{e^{2i \theta} - 2a e^{i \theta}  + 1} d\theta $$ $$= -  \int_{-\pi}^{\pi} \frac{e^{i \theta}}{(e^{i \theta}-\rho_1)(e^{i \theta}-\rho_2)} d\theta = \alpha \int_{-\pi}^{\pi} \frac{e^{i \theta}}{e^{i \theta}-\rho_1} d\theta + \beta\int_{-\pi}^{\pi} \frac{e^{i \theta}}{e^{i \theta}-\rho_2} d\theta$$ 
where $\rho_1,\rho_2$ are obtained by factorization of the polynomial $z^2 - 2az + 1$ and $\alpha,\beta$ are obtained by identification (or partial fraction decomposition).
and the last integrals can be easily evaluated, obtaining :
$$ = \alpha 2 i \pi \ 1_{|\rho_1| < 1} + \beta 2 i \pi \  1_{|\rho_2| < 1}$$
A: Two methods have already been given on paths to obtain the integral's value. It is fairly evident that the general integral can take on the form
$$\int \frac{d\theta}{a - \cos\theta} = - \frac{2}{\sqrt{1-a^2}} \, \tanh^{-1}\left(\frac{(a+1) \, \tan\left(\frac{\theta}{2}\right)}{\sqrt{1-a^2}} \right).$$
For the limits given it is seen that $\tan\left(\frac{\pi}{2}\right) = \infty$ and $\tan\left(\frac{0}{2}\right) = 0$. Using $\tanh^{-1}(\infty) = - \frac{\pi i}{2}$ and $\tanh^{-1}(0) = 0$ then the integral in question becomes
$$\int_{0}^{\pi} \frac{d\theta}{a - \cos\theta} = \frac{\pi}{\sqrt{a^2 - 1}}.$$
