[EDIT: Now that I've managed to solve this on my own, this is now a (very difficult) challenge problem]
Evaluate \[\large \int_{-\infty}^\infty \frac{\cos(z)}{z^2+1} dz\]

I doubt that many people here (myself included) can help you with a problem of this level. You're better off posting this at some site like this:
http://www.physicsforums.com
where many of the members have Ph.Ds in physics, math, etc...

To me, it looks like what you are doing is changing the real integral into a complex one. Your taking an integral defined on the real line, and changing it to one defined on the complex plane. In the solution, did you have a path for the complex integral?

Almost. There is one more integral needed on the right.I claim that\[\int\limits_{-r}^{r}\frac{\cos(z)}{z^2+1}dz=\int\limits_{C}\frac{e^{iz}}{z^2+1}dz-\int\limits_{\gamma}\frac{e^{iz}}{z^2+1}{dz}\]where \(\gamma\) is the upper part of the semi-circle.

you can consider that as a corollary of Liouville theorem that says if \[fe^g\] has an elementary antiderivative, where f and g are rational functions provided that "g" is not constant, then it has an antiderivative of the form \[he^g\] , h is a rational function. For this to be an antiderivative of \[fe^g\], we need this condition to be satisfied h′+hg′=f.
Now lets say , \[f= \frac{ 1 }{ 1+z^2 }\]and g=iz, the condition is h′+ih=\[\frac{ 1 }{ 1+z^2 }\]. The right side has a pole of order 1 at z=i. In order for the left side to have a pole there, h must have a pole there, but wherever h has a pole of order k, h′ has a pole of order k+1, so the left side can never have a pole of order 1. @KingGeorge hope this complex answer helps you lol i cant go further , i have forgotten most of it :( :(

My professor wasn't the greatest either. As long as we came to class and made some sort of attempt on the homework it was an A. If anyone an finish it, feel free. If no one does, I'll post up a solution sometime in the (hopefully) near future.

I saw something similar to this in a document about Differentiation under the Integral by Keith Conrad.
-->
http://www.math.uconn.edu/~kconrad/blurbs/analysis/diffunderint.pdf
page 13, on 11.
\( \displaystyle \int_{\mathbb{R}} \frac{\cos(xt)}{1+x^2} \; \text{d}x \)
This integral involves an extra variable, t. He is able to figure out the answer with some change of variables and differentiation under the integral work. This problem was really interesting, using a lot of different techniques. (:
With the solution, we may let t=1 to match this integral here.