# 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.

• What have you attempted thus far? Oh, and by the way, use \mathrm dx to generate $\mathrm dx$ instead of $dx$ if you want. – Mr Pie Feb 14 '18 at 19:42
• @user477343 I've tried to use $\cos^n(x)=\frac{(e^{ix}+e^{-ix})^n}{2^n}$ and then Binomial theorem, but it seems to be too tedious. – Alex Feb 14 '18 at 19:49
• Do you have any restriction on $\lambda$? If not, then $a$ could be anything, just choose $\lambda$ appropriately after picking any $a$. – Clayton Feb 14 '18 at 19:54
• $\lambda$ is a fixed (maybe complex) parameter, the same for any $a$. – Alex Feb 14 '18 at 19:56

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 $$\lambda=\int_{-\pi}^{\pi}\cos^n(y)\cos((n-2r)y)\,\mathrm dy\\$$ 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, $$\lambda=2^{1-n}\pi\binom{n}{r}$$