Evaluate $\int_{-\pi}^\pi\cos^n(a-x)\cos((n-2r)x) \,dx $ How to show (possibly without using any reduction formulae techniques) that
$$
\int_{-\pi}^\pi\cos^n(a-x)\cos((n-2r)x) \,\mathrm dx = \lambda\cos((n-2r)a)
$$
with $-\pi<a<\pi$ and $n$ a positive integer, $r<\frac{n}{2}$ a positive integer. 
 A: We can transform the integral as
\begin{align}
I&=\int_{-\pi}^\pi\cos^n(a-x)\cos((n-2r)x) \,\mathrm dx \\
&=\int_{a-\pi}^{a+\pi}\cos^n(y)\cos((n-2r)(a-y)) \,\mathrm dy \\
&=\int_{a-\pi}^{a+\pi}\cos^n(y)\left[\cos((n-2r)a)\cos((n-2r)y)+\sin((n-2r)a)\sin((n-2r)y)\right] \,\mathrm dy\\
&=\int_{-\pi}^{\pi}\cos^n(y)\left[\cos((n-2r)a)\cos((n-2r)y)+\sin((n-2r)a)\sin((n-2r)y)\right]\,\mathrm dy\\
&=\cos((n-2r)a)\int_{-\pi}^{\pi}\cos^n(y)\cos((n-2r)y)\,\mathrm dy\\
\end{align}
where we used the periodicity of the functions and their parity properties.
Then we have to evaluate
\begin{equation}
\lambda=\int_{-\pi}^{\pi}\cos^n(y)\cos((n-2r)y)\,\mathrm dy\\
\end{equation} 
It can be done using the residue method by integrating on the unit circle:
\begin{align}
\lambda&=2^{-n-1}\int_{C}\left( z+\frac{1}{z} \right)^n\left( z^{n-2r}+\frac{1}{z^{n-2r}} \right)\frac{dz}{iz}\\
&=-i2^{-n-1}\int_{C}\left( z^2+1 \right)^n\left( z^{2n-4r}+1 \right)\frac{dz}{z^{2n-2r+1}}\\
&=2^{-n}\pi\operatorname{Res}\left[z^{-2n+2r-1}\left( z^2+1 \right)^n\left( z^{2n-4r}+1 \right);z=0\right]
\end{align}
The residue is the coefficient of degre $2n-2r$ of the polynom $\left( z^2+1 \right)^n\left( z^{2n-4r}+1 \right)$ which is $\binom{n}{r}+\binom {n}{n-r}=2\binom{n}{r}$. Finally,
\begin{equation}
\lambda=2^{1-n}\pi\binom{n}{r}
\end{equation} 
