I am currently working on, out of interest, the integral $$F(n;a)=\int_0^\pi \frac{\mathrm dx}{(1+a\cos x)^n}$$ For $a\in(-1,1)$ and $n\in \Bbb N$. I would like to know if my methods are correct or if there are any other ways to go about this.
Attempt:
Starting with $t=\tan\frac{x}2$, $$F(n;a)=2\int_0^\infty \frac1{\left[1+a\frac{1-t^2}{1+t^2}\right]^n}\frac{\mathrm dt}{1+t^2}$$ $$F(n;a)=2\int_0^\infty \frac{\left(t^2+1\right)^{n-1}}{\left[(1-a)t^2+1+a\right]^n}\mathrm dt$$ Then using the binomial theorem, $$F(n;a)=2\sum_{k=0}^{n-1}{n-1\choose k}\int_0^\infty\frac{x^{2k}}{\left[(1-a)x^2+1+a\right]^n}\mathrm dx$$ $$F(n;a)=\frac2{(1-a)^n}\sum_{k=0}^{n-1}{n-1\choose k}\int_0^\infty\frac{x^{2k}}{\left[x^2+\frac{1+a}{1-a}\right]^n}\mathrm dx$$ We then recall the work of my collaborator @DavidG, $$\int_0^\infty\frac{x^{q}}{\left[x^w+b\right]^p}\mathrm dx=\frac{b^{\frac{1+q}{w}-p}}{w}\frac{\Gamma\left(p-\frac{1+q}{w}\right)\Gamma\left(\frac{1+q}{w}\right)}{\Gamma\left(p\right)}$$ So with $w=2$, $b=\frac{1+a}{1-a}$, $p=n$, and $q=2k$, $$F(n;a)=\frac1{(1-a)^n}\sum_{k=0}^{n-1}{n-1\choose k}\left(\frac{1+a}{1-a}\right)^{\frac{2k+1}{2}-n}\frac{\Gamma\left(n-\frac{2k+1}{2}\right)\Gamma\left(\frac{2k+1}{2}\right)}{\Gamma\left(n\right)}$$ $$F(n;a)=\frac1{(1-a)^n}\sum_{k=0}^{n-1}\left(\frac{1+a}{1-a}\right)^{\frac{2k+1}{2}-n}\frac{\Gamma\left(n-\frac{2k+1}{2}\right)\Gamma\left(\frac{2k+1}{2}\right)}{k!\Gamma(n-k)}$$ Which is a closed form. Did I do this correctly? How else could've this been done? Thanks.
$ \left(\frac{1+a}{1-a}\right)^{\frac{2k+1}{2}-n} = \left(\frac{1+a}{1-a}\right)^k \cdot \left(\frac{1+a}{1-a}\right)^{\frac{1}{2} - n} $
– Jan 19 '19 at 06:26