# How to compute the residue of $e^{z-\frac{1}{z}}$ at z=0?

I've tried the following but it didn't work:

Residue[Exp[z - 1/z], {z, 0}]


not even this:

Residue[Exp[1/z], {z, 0}]


Manually, I've computed the residue in the following way:

$$f(z)=e^{z-\frac{1}{z}}=e^ze^{-\frac{1}{z}}=\left(\sum_{n=0}^{\infty}\frac{z^n}{n!}\right)\left(\sum_{n=0}^{\infty}\frac{(-1)^n}{n!}z^{-n}\right)=$$ $$= \sum_{n=-\infty}^{\infty}\left(\sum_{k=\max(0,n)}^{\infty}\frac{(-1)^{k-n}}{k!(k-n)!}\right)z^n$$

Since the residue is the coefficient of $z^{-1}$, it's equal to:

$$\sum_{k=0}^{\infty}\frac{(-1)^{k + 1}}{k! (k + 1)!}$$

Going back to Mathematica, I get:

Sum[(-1)^(k + 1)/(k! (k + 1)!), {k, 0, Infinity}]
(* -BesselJ[1, 2] *)

N[-BesselJ[1, 2], 30]
(* -0.576724807756873387202448242269 *)


How can I get that result without manual computations?

Of course, the symbolic result is much preferred.

-
You can get the numeric result by using Cauchy's theorem : NIntegrate[ Exp[z - 1/z], {z, 1 + I, -1 + I, -1 - I, 1 - I, 1 + I}]/(2 Pi I). –  b.gatessucks Feb 5 '14 at 21:32

f[t_] = Exp[z - 1/z] /. z -> E^(I t) // FullSimplify

1/(2 Pi) Integrate[E^(I t) f[t], {t, 0, 2 Pi}]