In using $\int_C(z+\frac{1}{z})^{2n}\frac{1}{z}dz=\binom{2n}{n}2\pi i$, how does it possible to compute $\int^{\pi}_{-\pi} \cos^{2n} t dt$? In using the result $\int_C(z+\frac{1}{z})^{2n}\frac{1}{z}dz=\binom{2n}{n}2\pi i$, how does it possible to compute $\int^{\pi}_{-\pi} \cos^{2n} t dt$.
A hint given by the textbook is to compute $\int^{\pi}_{-\pi} 2^{2n}i\cos^{2n} t dt$.
I think $C$ is simply the circle in the positive direction, i.e. $z(t)=\cos t + i \sin t$, with $-\pi \leq t < \pi$.
Is anyone could help me at this point? What change of parameter could I use here?

Sub $z=e^{i t}$, $t \in [-\pi,\pi]$.
Then
$$\oint_C \frac{dz}{z} \left (z+\frac1{z} \right )^{2 n} = i 2^{2 n} \int_{-\pi}^{\pi} dt \, \cos^{2 n}{t} $$
By the residue theorem, the contour integral is equal to $i 2 \pi$ times the coefficient of $z^0$ in the expansion of $\left (z+\frac1{z} \right )^{2 n}$, or $\binom{2 n}{n}$, i.e.,
$$i 2^{2 n} \int_{-\pi}^{\pi} dt \, \cos^{2 n}{t} = i 2 \pi \binom{2 n}{n}$$
