Using calculus of residues to evaluate a trig integral

This is my partial attempt at the solution. I am unsure how to proceed further.

-

Hint: You have a pole at $z=0$ of order $5001$ and you need the formula to calculate the residue.

Added: Another approach for finding the residue is to compute the Laurent series of the integrand. Rearranging the integral as

$$\frac{2\pi}{2^{5000}} \frac{1}{2\pi i}\int_{|z|=1}\frac{(1+z^2)^{5000}}{z^{5001}}dz.$$

Then computing the Laurent series using the binomial theorem gives

$$\frac{(1+z^2)^{5000}}{z^{5001}} = \sum_{m=0}^{5000} {5000 \choose m} z^{2m-5001}.$$

Now, the residue is the coefficient of $z^{-1}$ which corresponds to $m=2500$ in the above series and equals

$$r = \frac{2\pi}{2^{5000}}{5000 \choose 2500} .$$

-
How would I find the 5000th derivative of $(z^2+1)^{5000}$ in order to apply the formula? – MikeMan May 12 '13 at 10:53
Thank you. There is no $2z$ in the expression it is $z^{2}$ – MikeMan May 12 '13 at 11:05
@MikeMan: I'll correct this. Still you can the binomial approach. – Mhenni Benghorbal May 12 '13 at 11:08
You are a life saver – MikeMan May 12 '13 at 11:18
@MikeMan: No problem. You are welcome. It is a nice problem. – Mhenni Benghorbal May 12 '13 at 11:18