Compute $\oint_{|z|=4} \frac{e^{1 /(z-1)}}{z-2} d z$ Here is an integral.
$\oint_{|z|=4} \frac{e^{1 /(z-1)}}{z-2} d z$
Obviously, the function is not analytic in $D(0,4)$, thus, we should apply residue theorem
$\oint_{c} f(z) d z=2 \pi i \sum_{j=1}^{n} b_{1 j}$
where $b_{1j}$ is the first coefficient in Laurent series at the point of singularity.
So,
at the point $z_1 = 2$ we have a pole of the first order.
$Res_{z_1} = e^1 $
at the point $z_2 = 1$ we have an essential singularity. Compute Laurent series of the function in the point $z=1$. WolframAlpha:
$\frac{e^{1 /(z-1)}}{z-2} = \sqrt[x-1]{e}\left(-1-(z-1)-(z-1)^{2}-(z-1)^{3}+O\left((z-1)^{4}\right)\right)$
Thus, $Res_{z_2} =  -1$
And we get:
$\oint_{c} f(z) d z=2 \pi i (e - 1)$
It does not make sense, for a correct answer is $2i$
What is wrong? Tell me, please.
 A: It is clear that$$\operatorname{res}_{z=2}\left(\frac{e^{1/(z-1)}}{z-2}\right)=e^{1/(2-1)}=e.$$On the other hand, near $1$ we have$$e^{1/(z-1)}=1+\frac1{z-1}+\frac1{2!(z-1)^2}+\frac1{3!(z-1)^3}+\cdots\tag1$$and$$\frac1{z-2}=-\frac1{1-(z-1)}=-1-(z-1)-(z-1)^2-(z-1)^3+\cdots\tag2$$If we compute the Cauchy product of the series $(1)$ and $(2)$, then the coefficient of $(z-1)^{-1}$ shall be$$-1-\frac1{2!}-\frac1{3!}-\cdots=1-e.$$In other words,$$\operatorname{res}_{z=1}\left(\frac{e^{1/(z-1)}}{z-2}\right)=1-e$$and therefore$$\oint_{|z|=4}\frac{e^{1/(z-1)}}{z-2}\,\mathrm dz=2\pi i\bigl(e+(1-e)\bigr)=2\pi i.$$
A: The computation of the residue is wrong as it has to be done term by term multiplying the Laurent series of the exponential with the geometric series expansion of the denominator in powers of $z-1$; straightforward but tedious.
A much easier way is to use Cauchy and note that for $R>4$ we have (noting that if $z=Re^{it}, dz=iRe^{it}dt=izdt$):
$\oint_{|z|=4} \frac{e^{1 /(z-1)}}{z-2} dz=\oint_{|z|=R} \frac{e^{1 /(z-1)}}{z-2} dz=\int_0^{2\pi}\frac{ize^{1 /(z-1)}}{z-2} dt \to 2\pi i, |z|=R \to \infty$ as $\frac{iz}{z-2} \to i$ and $e^{1 /(z-1)} \to 1$ for $|z|=R \to \infty$.
so the integral is actually $2\pi i$
