<s>[INST] Definite Integral = $\int_0^{2\pi} \frac{\sin^2\theta}{(1-a\cos\theta)^3}\,d\theta$ for $0\le a<1$ I am trying to find an expression for the following Definite Integral  for the range $0 \leq a <1$:
$$D = \int_0^{2\pi} \frac{\sin^2\theta}{(1-a\cos\theta)^3}\,d\theta.$$
which gives (Wolfram Alpha)
$$D= \left[ 
\frac{\sin \theta(\cos \theta - a)}{2(a^2-1)(a \cos\theta-1)^2}
+\frac{\tanh^{-1}\left( \frac{(a+1)\tan(\theta/2)}{\sqrt{a^2-1}}  \right)}{(a^2-1)^{3/2}}\right]_0^{2\pi}
.$$
which can be expressed as
$$D= \left[ 
\frac{(a^2-1)^{1/2}\sin \theta(\cos \theta - a)+2 (a \cos\theta-1)^2\tanh^{-1}\left( \frac{(a+1)\tan(\theta/2)}{\sqrt{a^2-1}}  \right)}{2(a^2-1)^{3/2}(a \cos\theta-1)^2}
\right]_0^{2\pi}
.$$
This expression involves discontinuities and complex numbers which is beyond my present abilities to handle.
 [/INST] It is not difficult to check that for any $a\in\mathbb{R}$ such that $|a|<1$ we have
$$ \int_{0}^{2\pi}\frac{d\theta}{1-a\cos\theta} = \frac{2\pi}{\sqrt{1-a^2}}\tag{1}$$
hence by differentiating both sides of $(1)$ with respect to $a$ we have
$$ \int_{0}^{2\pi}\frac{\cos(\theta)\,d\theta}{(1-a\cos\theta)^2}=\frac{2a\pi}{(1-a^2)^{3/2}},\qquad \int_{0}^{2\pi}\frac{d\theta}{(1-a\cos\theta)^2}= \frac{2\pi}{(1-a^2)^{3/2}}\tag{2}$$
and by differentiating again
$$ \int_{0}^{2\pi}\frac{\sin^2(\theta)\,d\theta}{(1-a\cos\theta)^3}=\frac{\pi}{(1-a^2)^{3/2}} \tag{3}$$
is simple to prove.
</s>