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.gates.you.know.what Feb 5 '14 at 21:32

You can use b.gatessucks idea to make it analytically:

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


then integrate:

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


You can use:

$\exp \left[\frac{1}{2} t\left(z-\frac{1}{z}\right)\right]=\sum_{k=-\infty }^{\infty } z^k J_k(t)$

with $t=2$. So rhs is basically the Laurent series of f[t] in $z=0$, so the coefficient $a_{-1}$ of the series is the Residueso $J_{-1}(2)=-J_1(2)$.