How to calculate the following integrals? How the calculate the following integrals? Therein $D$ is a constant.
$$(1)\;\;\int_{0}^{2\pi}\frac{1}{1-D\cdot\cos\theta} d\theta$$
and
$$(2)\;\;\int_{0}^{2\pi}\frac{1}{1+D\cdot\cos\theta} d\theta$$

$$I_2=\int_0^{2\pi}\frac{d\theta}{1+D\cos(\theta)}=\int_0^{\pi}\frac{d\theta}{1+D\cos(\theta)}+\int_{\pi}^{2\pi}\frac{d\theta}{1+D\cos(\theta)}$$ Let $\theta=\tan(\frac{x}{2})$
$$I_2=\int_0^{\infty}\frac{1}{1+D\frac{1-x^2}{1+x^2}}\frac{2dx}{1+x^2}+\int_{-\infty}^0\frac{1}{1+D\frac{1-x^2}{1+x^2}}\frac{2dx}{1+x^2}=2\int_{-\infty}^{\infty}\frac{dx}{1+x^2+D-Dx^2}=2\int_{-\infty}^\infty \frac{dx}{(1-D)x^2+(1+D)}=\frac{2}{1-D}\int_{-\infty}^{\infty}\frac{dx}{x^2+\frac{1+D}{1-D}}=\frac{2\pi}{\sqrt{1-D^2}}$$ Hopefully all my computation is correct, the other integral can be done in the same way. Just use Weierstrass Substitution.
