TITLE: Integral $\int_0^\pi \big( (1+\alpha \cos x) \cos x \big)^n dx $
QUESTION [7 upvotes]: I have been struggling with the integral 
$$ I_n(\alpha) = \frac{1}{\pi} \int_0^\pi \big( (1+\alpha \cos x) \cos x \big)^n dx,$$
where $\alpha$ is real and $n$ is a non-negative integer. 
It is relatively easy to get the values for specific $n$;
$$I_0(\alpha) = 1,~~I_1(\alpha) = \alpha/2,~~I_2(\alpha) =\frac{1}{8} \left(3 \alpha ^2+4\right), \ldots$$ 
But how do I get the expression for general $I_n(\alpha)$?
I have tried building a recursion but did not quite succeed.
I also tried taking the derivatives of 3.661.3 from Gradshteyn-Ryzhik
but did not get anything nice.
Edit I
Attempt using the binomial theorem: 
\begin{align} 
\frac{1}{\pi} \int_0^{\pi} dx~ \big( 1 + \alpha\cos (x) \big)^n \cos (x)^n
&= \frac{1}{\pi} 
\int_0^{\pi} dx~ \cos (x)^n \sum_{m=0}^n{ {n}\choose{m}} \alpha^m \cos(x)^m \\
&= \sum_{m=0}^n{ {n}\choose{m}} \alpha^m \frac{1}{\pi} \int_0^{\pi} dx~ \cos (x)^{n+m} \\
&= \sum_{m=0}^n{ {n}\choose{m}} \alpha^m
\frac{ 2^{n+m} \pi }{(n+m)! \Gamma\left( \frac{1}{2}(1-n-m) \right)^2} 
\begin{cases}
1,~~n+m ~ {\rm even}\\
0,~~n+m ~ {\rm odd}
\end{cases}
\end{align}
But I did not quite manage to express the last sum in some nice form...
the best I got is:
\begin{align} I_n(\alpha) &=
\left(1 + (-1)^n\right) \frac{\Gamma (n+1)}
{2^{n+1}\Gamma \left(\frac{n+2}{2}\right)^2}
\,_3F_2\left(\tfrac{1}{2}(1-n),\tfrac{1}{2}(1+n),-\tfrac{n}{2};\tfrac{1}{2},1+\tfrac{n}{2};\alpha ^2\right) \\
&~~~~+
 \left(1 + (-1)^{n+1}\right)
\frac{n \Gamma (n+1)}
{2^n(n+1) \Gamma \left(\frac{n+1}{2}\right)^2}
\alpha \,_3F_2\left(\tfrac{1}{2}(1-n),1-\tfrac{n}{2},1+\tfrac{n}{2};\tfrac{3}{2},\tfrac{1}{2}(3+n);\alpha ^2\right)
\end{align}
But it is not very instructive...
P.S. The same can be also be obtained from the solution suggested by orlp.
Edit II
Following a nice suggestion of Igor's I got the result
$$ I_n(\alpha) = \frac{2i}{(2n)!} \lim_{z\to i} \frac{d^{2n}}{dz^{2n}}
\frac{\left(1 +\alpha + (1-\alpha) z^2 \right)^n \left(1 - z^2\right)^n}{(z+i)^{2n+1}}.
 $$
However, it is quite tricky now (at least for me) to explicitly compute this derivative.
Any suggestions?

REPLY [2 votes]: This is a proof through small steps without really explaining my thought process, because at this point I spent way too much time on it and my thoughts are lost in the wind. The end result is a series of coefficients for $\alpha$.
$$ I_n(\alpha) = \frac{1}{\pi} \int_0^\pi (1+\alpha \cos(x))^n \cos(x)^n dx$$
$$ I_n(\alpha) = \frac{1}{\pi} \int_0^\pi \sum_{k=0}^n\binom{n}{k}(\alpha\cos(x))^k \cos(x)^n dx$$
$$ I_n(\alpha) = \frac{1}{\pi} \sum_{k=0}^n\binom{n}{k}\alpha^k\int_0^\pi \cos(x)^{k+n} dx$$
$$ I_n(\alpha) = \frac{1}{\pi} \sum_{k=0}^n\binom{n}{k}\alpha^k\int_0^\pi 2^{-k-n}(e^{ix}+e^{-ix})^{k+n} dx$$
$$ I_n(\alpha) = \frac{1}{\pi} \sum_{k=0}^n\binom{n}{k}2^{-k-n}\alpha^k\int_0^\pi (e^{ix}+e^{-ix})^{k+n} dx$$
From this point on $k+n$ must be even, otherwise the integral is zero:
$$ I_n(\alpha) = \frac{1}{\pi} \sum_{k=0}^n \frac{1+(-1)^{k+n}}{2}\binom{n}{k}2^{-k-n}\alpha^k \pi \binom{k+n}{\frac{k + n}{2}}$$
$$ I_n(\alpha) = \sum_{k=0}^n\frac{1+(-1)^{k+n}}{2}2^{-n-k}\binom{n}{k}\binom{k+n}{\frac{k + n}{2}}  \alpha^k $$