<s>[INST] Integral $\int_0^\pi \big( (1+\alpha \cos x) \cos x \big)^n dx $ 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?
 [/INST] I am not entirely sure the binomial theorem can be avoided, but also the Weierstrass substitution ($(t = \tan x/2)$ transforms your integral into an integral of a rational function from $0$ to infinity, at which point the residue theorem is your friend.
EDIT
A similar method is the following: first note that your integrand is even, so the integral is half of the integral from $-\pi$ to $\pi.$ Now, make the substitution $z = \exp(i x),$ so that $\cos x = \frac12\left(z + \frac1z\right),$ and so your integral is (half of) the integral over the unit circle:
$$ \begin{multline}-i \int_C ((1+ a (1+z^2)/2z)(1+z^2)/2z)^n \frac{dz}z\\ = \frac{-i}{2^{2n}} \int_C((az^2 + 2 z + a)(1+z^2))^n/ z^{2n+1} dz  \\= \frac{-i}{2^{2n}}\int_C (a + 2 z + + 2az^2 + 2 z^3 + az^4)^n/z^{2n+1} d z.\end{multline}$$
So, your goal in life is to find the coefficient of $z^{2 n}$ in  $(a + 2 z + + 2az^2 + 2 z^3 + az^4)^n,$ since that will give you the residue at $0.$
</s>