Prove $\int_0^{2\pi}\frac{3a\sin^2\theta}{(1-a\cos \theta)^4}$ or $\int_0^{2\pi}\frac{\cos\theta}{(1-a\cos\theta)^3}=\frac{3a\pi}{(1-a^2)^{5/2}}$ While doing some mathematical modelling of planetary orbits I have come up with two definite integrals $D_1$ and $D_2$ which appear to produce the same result R when tested with various values of $a$  ( where $0<a<1$).
$$
D_1
\, =\,
\int_0^{2\pi}f_1\,\mathrm{d}\theta
\, =\,
\int_0^{2\pi}\frac{3a\sin^2\theta}{(1-a\cos \theta)^4}\mathrm{d}\theta
\,=\,
\frac{3a\pi}{(1-a^2)^{5/2}}
\, =\,R
$$
and
$$D_2\, =\,\int_0^{2\pi}f_2\,\mathrm{d}\theta
\, =\,
\int_0^{2\pi}\frac{\cos \theta}{(1-a\cos \theta)^3}\,\mathrm{d}\theta
\, =\,
\frac{3a\pi}{(1-a^2)^{5/2}}
\, =\,R$$
The hypothesis: $D_1$ = $D_2$ has been proved in a separate question Prove $\int_0^{2\pi}\frac{3a\sin^2\theta}{(1-a\cos \theta)^4}\mathrm{d}\theta = \int_0^{2\pi}\frac{\cos \theta}{(1-a\cos \theta)^3}\,\mathrm{d}\theta$  .
The remaining hypotheses $D_1$ = $R$ and $D_2$ = $R$ have not been proved.  So the question is:-
Prove $D_1$ = $R$ or $D_2$ = $R$.
Only one proof is required because the other can then be obtained from $D_1$ = $D_2$.

For information
WolframAlpha computes expressions for the indefinite integrals $I_1,I_2$ as follows:-
$$I_1
\, =\,
\int\frac{3a\sin^2\theta}{(1-a\cos \theta)^4}\mathrm{d}\theta
\,=\,
$$
$$constant1 + \frac
{a\,\sqrt{a^2-1}\sin\theta\,[-(2a^3+a)\cos^2\theta+3(a^2+1)cos\theta+a(2a^2-5)]}
{2(a^2-1)^{5/2}(a\cos\theta-1)^3}
$$
$$-\frac
{6a\,(a\cos\theta-1)^3\,\tanh^-1
\left(
\frac{(a+1)\tan(\theta/2)}{\sqrt{a^2-1}}
\right)
}
{(2(a^2-1)^{5/2}\,(a\cos\theta-1)^3}
$$
and
$$I_2
\, =\,
\int\frac{\cos \theta}{(1-a\cos \theta)^3}\,\mathrm{d}\theta
\, =\,
$$
$$constant2 -
\frac
{2a^2\sin\theta-sin\theta}
{2(a^2-1)^2(a\cos\theta-1)}
-\frac
{\sin\theta}
{2(a^2-1)(a\cos\theta-1)^2}
$$
$$
-\frac
{3a\tanh^-1\left(\frac{(a+1)\tan(\theta/2)}{\sqrt{a^2-1}}\right)}
{(a^2-1)^{5/2}}
$$
Note that the final terms of each expression ( i.e. the terms involving $\tanh^{-1} $ and $\tan$ ) are equivalent to each other.
Also, note that
$$\int\frac{\cos\theta}{(1-a\cos\theta)^3}\,d\theta=
\frac{-\sin\theta}{(1-a\cos\theta)^3}
+\int \frac{3a\sin^2\theta}{(1-a\cos\theta)^4}\,d\theta.
$$

Written with StackEdit.

UPDATE 20141028
I have accepted TenaliRaman's answer. I don't yet understand all the steps but his helpful exposition gives me confidence that with time I can understand it because the methods cited (binomials, series) are ones I have learned (at high school).
The answer of M.Strochyk also appears to give a good proof. But the residue method is too advanced for me to understand at present.
UPDATE 20220713
I have now accepted Quanto's answer (because it is simple enough for me to understand).  I have also added an answer based on Quanto's but with the intermediate steps written out.

According to Brian Bóruma's suggestion, integral can be evaluated using the residue theorem
$$\int\limits_0^{2\pi}\frac{\cos \theta}{(1-a\cos \theta)^3}\,{d\theta}=\dfrac{1}{2}\int\limits_{|z|=1}{\dfrac{z+\frac{1}{z}}{\left[1-\frac{a}{2}\left(z+\frac{1}{z}\right)\right]^3} \frac{dz}{iz}}=\\
=-4i\int\limits_{|z|=1}{\dfrac{z^3+z}{\left(-az^2+2z-a\right)^3}dz}= \\
=-4i\int\limits_{|z|=1}{\dfrac{z^3+z}{-a^3\left(z-z_1\right)^3 \left(z-z_2\right)^3}dz}=-\dfrac{8\pi}{a^3}{\operatorname{Res}\limits_{z=z_1}{\dfrac{z^3+z}{\left(z-z_1\right)^3 \left(z-z_2\right)^3}}},$$
where $z_1=\dfrac{1-\sqrt{1-a^2}}{a}, \;\; z_2=\dfrac{1+\sqrt{1-a^2}}{a}.$ Only the point $z_1$ lies in the unit disc and it is a third-order pole for the integrand function.
The residue can be calculated in a standard way:
$$ \operatorname{Res}\limits_{z=z_1}{\dfrac{z^3+z}{\left(z-z_1\right)^3 \left(z-z_2\right)^3}}=\\= \dfrac{1}{2!} \lim\limits_{z\to z_1}{\dfrac{d^2}{dz^2}\left(\dfrac{\left(z-z_1\right)^3 \left(z^3+z \right)}{\left(z-z_1\right)^3 \left(z-z_2\right)^3} \right)} 
=\dfrac{1}{2!} \lim\limits_{z\to z_1}{\dfrac{d^2}{dz^2}\left(\dfrac{z^3+z }{ \left(z-z_2\right)^3} \right)} = \\
=\left. \left[\frac{3 z}{{\left(z - \frac{1+\sqrt{1-a^{2}}} {a}\right)}^{3}} - \frac{3 {\left(3 z^{2} + 1\right)}}{{\left(z - \frac{1+\sqrt{1-a^{2}} }{a}\right)}^{4}} + \frac{6 {\left(z^{3} + z\right)}}{{\left(z - \frac{1+\sqrt{1-a^{2}}}{a}\right)}^{5}}\right] \right|_{z=z_1}. 
$$
