The integrals of things looking like $e^{(\frac{a}{z}+\frac{b}{z-c})}$ on closed contours I have recently encountered a truely terrible integral which I need to compute. I am not sure it's doable but before throwing the whole project in the bin I thought I would ask here. At the moment, a step I require is evaluating the integral of $f(z)$ along a closed coutour $C$ containing zero where $f(z)$ is something like
$f(z)=e^{(\frac{a}{z}+\frac{b}{z-c})}g(z)$
$c$ is located outside the contour $g(z)$ is holomorphic inside the disk enclosed by $C$ which has a very long but finite taylor expansion. The reason no traditional tricks work (using the coordinate change $z=1/w$, looking at the series and trying to collect together all the $\frac{1}{z}$ terms) is of course this $\exp((\frac{b}{z-c}))$ term, for which the series expansion has an infinite number of terms, so trying to sum up all those containing $1/z$ is doomed from the start... Has anybody ever encountered something similar? I tried reading about Bessel functions, but they didn't quite fix the problem.
 A: You can use the residue theorem, given the series expansion of
$$h(z)=e^{b/(z-c)}g(z)=\sum_{n=0}^\infty h_n z^n,$$
the contour integral (with $0$ inside and $c$ outside of the contour $C$) evaluates to
$$\oint_C e^{a/z}e^{b/(z-c)}g(z)\,dz=2\pi i\sum_{n=1}^\infty \frac{ h_{n-1}a^n}{n!}=2\pi i\sum_{n=1}^\infty \frac{ a^n}{n!(n-1)!}h^{(n-1)}(0),$$
with $h^{(n)}(0)$ the $n$-fold derivative of $h(z)$ evaluated at $z=0$. 
I would love to be shown wrong, but I'm pretty certain this is the best one can do in the general case $-$ there is no short-cut to the residue at an essential singularity.
A: Your question is too general because you don't specify $g(z)$ and $C$. Something can be done for more concrete cases e.g. $g(z):=z^n,\, n \in \mathbb{N}, C:=\{z:|z|=2\}$ with Maple 2019.1:
int(I*eval(exp(1/z) * exp(2/(z - 1)), z = 2*exp(t*I))*2*exp(t*I), t = 0 .. 2*Pi,numeric);


$ { 1.788426568\times 10^{-14}}+ 18.84955592\,i$

identify(18.84955592*I);


$6\,i\pi $ 

I think the same can be done with Mathematica.
Addition. Making use of  the residue at infinity and Maple, one obtains a simple symbolic result
residue(exp(1/z)*exp(2/(z - 1)), z = infinity + infinity*I) 


$-3\pi i$

Therefore, the above integral equals $6\pi i$. Under some conditions on $g(z)$ this should work in the general case too.
