TITLE: How to compute the complex integral $\int_{\gamma} e^{\frac{1}{z^2 - 1}}\sin{\pi z} \, \mathrm dz$?
QUESTION [15 upvotes]: My Problem
I'm trying to solve problems from old qualifying exams in complex analysis and right now I'm stuck on the following exercise.

Compute the complex integral
$$
\int_{\gamma} e^{\frac{1}{z^2 - 1}}\sin{\pi z} \,\mathrm dz
$$
where $\gamma$ is a closed curve in the right half plane that has index $N$ with respect to the point $1$.


My attempt
By the Residue theorem, since the function $f(z) := e^{\frac{1}{z^2 - 1}}\sin{\pi z}$ has only an isolated singularity at $z = 1$ in the right half plane, which in this case is an essential singularity, we can compute the integral by finding the residue at $1$, more precisely
$$
\int_{\gamma} e^{\frac{1}{z^2 - 1}}\sin{\pi z} \, \mathrm dz = 2\pi i N \operatorname{Res}{(f(z); 1)}
$$
where the $N$ comes from the assumption on the index of the curve.
Now my problem is that I can't compute this residue. The "obvious" things that I have tried are finding the Laurent expansions of the functions $e^{\frac{1}{z^2 - 1}}$ and $\sin{\pi z}$ around $z = 1$. It is easy to find that
$$
\sin{\pi z} =  -\frac{\pi}{1!}(z - 1) + \frac{\pi^3}{3!}(z - 1)^3 -\frac{\pi^5}{5!}(z - 1)^5 + \frac{\pi^7}{7!}(z - 1)^7 + \cdots
$$
Then I tried doing the following with the exponential:
$$
e^{\frac{1}{z^2 - 1}} = \sum_{n = 0}^{\infty}\frac{1}{n!}\frac{1}{(z^2 - 1)^n}
$$
and I thought that maybe then expressing the fraction $\frac{1}{z^2 - 1}$ as
$$
\frac{1}{z^2 - 1} = \frac{1}{2} \left ( \frac{1}{z-1} - \frac{1}{z+1} \right )  
$$
and using the Laurent expansion 
$$
\frac{1}{z+ 1} = \frac{1}{z - 1 + 2} = \frac{1}{2}\frac{1}{1 + \frac{z - 1}{2}} = \frac{1}{2} \sum_{n = 0}^{\infty}\frac{(z - 1)^n}{2^n}
$$
could be of help.
But now I don't see much hope of this working because I would have to put this last infinite series back into the series for the exponential and there's an $n$-th power there, and finally to top it all I would have to multiply by the Laurent series for the $\sin{\pi z}$ to try to get a hold of the coefficient of $\frac{1}{z - 1}$.

I would really appreciate any help with this. Thanks.

REPLY [3 votes]: Using your series expansions we can write:
$$
 e^{\frac1{z^2-1}} \sin \pi z = 
  \sum_{n,k \ge 0} (-1)^{k+1} \frac{\pi^{2k+1}}{(2k+1)!\,n!} 
  \frac1{(z+1)^n}\frac1{(z-1)^{n-2k-1}}
$$
Now (for any $z$ inside the circle of radius 2 centered at $z=1$)
$$
 (z+1)^{-n} = 
 \sum_{l\ge0} \frac{(-n)(-n-1)\cdot\ldots\cdot(-n-l+1)}{l!}2^{-n-l} (z-1)^l
$$
So in total we get
$$
 e^{\frac1{z^2-1}} \sin \pi z = 
  \sum_{n,k,l \ge 0} (-1)^{k+1} \frac{\pi^{2k+1}}{(2k+1)!\,n!} 
  {-n \choose l} \frac1{2^{n+l}} \frac1{(z-1)^{n-2k-l-1}}
$$
The coefficient of $\frac1{z-1}$ is then
$$
 \sum_{n,k \ge 0} 
  \frac{(-1)^{k+1} \pi^{2k+1}}{(2k+1)!\,n!\,4^{n-k}} 
  {-n \choose n-2k}
$$
There must be a nicer solution however....