I have a question that asks me to find the value of $\displaystyle\frac{1}{2\pi}\int_{0}^{2\pi} \cos^{2n} x dx$ $\ $ by considering the integral $$ \displaystyle \oint_{\gamma} \frac{1}{z}\left ( z+\frac{1}{z} \right ) ^{2n}dz$$ where $\gamma$ is the circle of radius 1 centered at the origin.
So I expanded the integrand out using the binomial theorem to get the following: $$\displaystyle \frac{1}{z}\left ( z+\frac{1}{z} \right ) ^{2n}=\sum \binom{2n}{k} z^{2n-2k-1}$$ so the integral of each of these terms is 0 apart from when $k=n$ and we get $\int_{\gamma}z^{-1} dz=2\pi{i}$ and so we have that:
$$ \displaystyle \oint_{\gamma} \frac{1}{z}\left ( z+\frac{1}{z} \right ) ^{2n}dz=\binom{2n}{n} 2\pi{i}$$
If we now let $z=e^{it}$ on $\gamma$ then the integral becomes: $$\displaystyle \int_{0}^{2\pi} \frac{ie^{it}}{e^{it}} \left ( e^{it}+e^{-it} \right )^{2n}dt= {i}\int_{0}^{2\pi} \left ( e^{it}+e^{-it} \right )^{2n}dt={i}\int_{0}^{2\pi} \left ( 2{\cos(t)} \right ) ^{2n}dt=\binom{2n}{n} 2\pi{i}$$
and finally: $$\displaystyle\int_{0}^{2\pi} \left ( \cos(t) \right ) ^{2n}dt=\binom{2n}{n} \frac{2\pi}{2^{2n}}$$
However I checked the answers that I have and it is the same apart from on the right hand side there is no $\dfrac{1}{2^{2n}}$, I was wondering what I had done wrong?
Thanks very much for any help