Is $\frac{\cos(\frac{1}{z})}{z^2}$ meromorphic or Not? my professor used the Cauchy Residue Theorem to evaluate the path integral (along the positively-oriented unit circle about the origin with winding number 3) 
$$\int_{\gamma}\frac{\cos(\frac{1}{z})}{z^2}$$
His reasoning is that, when expanded into series, 
$$\operatorname{res}(f,0) = 0.$$ 
However, I don't see how the integrand is meromorphic since I think it has an essential singularity at the origin. When I did the integral, I just used the fact that the integrand has a primitive on an annulus about the origin and thus the integral must be zero. Is my professor wrong to use the Cauchy Residue Theorem on the justification that it only works for meromorphic functions? 
Thanks in advance for any help!
 A: You are both right! Your proof is sound and elegant. But your professor is also correct.
The learning moment here is that the Cauchy residue theorem—and indeed the existence of residues themselves—do not require the function to be meromorphic. They work for any function that is holomorphic outside of isolated singularity points.
This is a great moment to go back to the proof that a contour integral over a small circle going around an isolated singularity $z_0$ equals the residue of the integrand—that is, the coefficient of $(z-z_0)^{-1}$ in the Laurent expansion of the integrant. The proof literally integrates the Laurent series term by term, and after the change of variables $z=z_0+\varepsilon e^{i\theta}$, the resulting series of integrals vanishes completely except for the residue term. In addition to reinforcing why the residue arises in the first place, revisiting this proof will confirm that it never required the Laurent series to be finite in the negative-exponent direction (which is equivalent to meromorphy).
A: Cauchy Residue Theorem does not require the function to be meromorphic 
A: One can have a residue at an isolated essential singularity. Any holomorphic
function on a region $\{z:0<|z|<r\}$ has a Laurent series
$$f(z)=\sum_{n=-\infty}^\infty c_nz^n$$
converging absolutely to $f(z)$ in that region. The residue of $f$ at $0$ is $c_{-1}$
and
$$\int_{\gamma}f(z)\,dz=2\pi ic_{-1}$$
for a small circle centred at $0$.
In your example
$$f(z)=z^{-2}-\frac{z^{-4}}{2!}+\cdots$$
has $c_{-1}=0$.
A: Another way to do this is to substitute $w=\frac{1}{z}\implies dw=-\frac{1}{z^2}dz$ so that the new contour $\gamma'$ is $\vert w \vert=1$ oriented clockwise. This reduces the integral to
$I=\int_{\gamma'}-\cos w dw$=0 (By Cauchy's theorem)
