$$I\left(n,\epsilon\right)=\int_{-{\rm i}\infty}^{+{\rm i}\infty} \frac{{\rm e}^{\epsilon z}}{\left(z+\epsilon\right)^n}\,{\rm d}z$$
The integration is taken along the imaginary axis,
an integer $n\gt 0$ and
$\epsilon \in \left[-1, +1\right]$
How to evaluate $I\left(n, \epsilon\right)$?
I saw this question in a textbook, when I am studying. This question seems so interesting to me. Thus, I am asking here. I never have seen such question up to today. And I have No idea to solve this. Only I guess, I need to use residue theorem. Therefore, Please can someone explain and solve this clearly? I am willing to learn:) thank you so much:)
Let's take the case $\epsilon=-1$. Then consider the following contour integral:
$$\oint_C dz \frac{e^{-z}}{(z-1)^n}$$
where $C$ is the semicircle of radius $R$ oriented positively, with center at the origin and diameter along the imaginary axis, closing to the right (i.e., enclosing the positive real axis). Then we may split this contour integral into two pieces:
$$-\int_{-i R}^{i R} dz \frac{e^{-z}}{(z-1)^n} + i R \int_{-\pi/2}^{\pi/2} d\theta \, e^{i \theta} \frac{e^{-R \cos{\theta}} e^{-i R \sin{\theta}}}{(R e^{i \theta}-1)^n}$$
Now, we may show that the magnitude of the second integral vanishes as $R \to \infty$ when $n \gt 0$; this magnitude is bounded by:
$$2 R \int_0^{\pi/2} d\theta \, \frac{e^{-R \cos{\theta}}}{R^n} = \frac{2}{R^{n-1}} \int_0^{\pi/2} d\theta \, e^{-R \sin{\theta}} \le \frac{2}{R^{n-1}} \int_0^{\pi/2} d\theta \,e^{-2 R \theta/\pi} \le \frac{\pi}{R^n}$$
By the residue theorem, the contour integral is also equal to $i 2 \pi$ times the residue at the pole $z=1$, which is
$$\frac{1}{(n-1)!} \left [\frac{d^{n-1}}{dz^{n-1}} e^{-z} \right ]_{z=1} = \frac{(-1)^{n-1}}{(n-1)!} \frac{1}{e}$$
Therefore, we can say that
$$\int_{-i \infty}^{i \infty} dz \frac{e^{-z}}{(z-1)^n} = i 2 \pi \frac{(-1)^{n}}{(n-1)!} \frac{1}{e}$$
Similarly, for $\epsilon = +1$, you can find using the above method (and being careful to orient the contour positively) that
$$\int_{-i \infty}^{i \infty} dz \frac{e^{z}}{(z+1)^n} = i 2 \pi \frac{1}{(n-1)!} \frac{1}{e}$$