Evaluation of the integral. $$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:)  
 A: 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}$$
A: You have a pole at $z=-\epsilon$, so pick a contour that encloses this pole. For example suppose $\epsilon=1$. It looks like a good choice is a half-circle contour whose diamater is on the imaginary axis and encloses $z=-1$. Now it's easy to show the integral vanishes on the circular part as the radius goes to infinity (note that $e^{\epsilon z}=e^{\epsilon x}e^{iy\epsilon}$ and since $\epsilon=1$, you have that $e^{\epsilon x}\rightarrow 0$ as $x\rightarrow-\infty$. In particular, the denominator is enough to send the integral to 0.
A: $\newcommand{\angles}[1]{\left\langle #1 \right\rangle}%
 \newcommand{\braces}[1]{\left\lbrace #1 \right\rbrace}%
 \newcommand{\bracks}[1]{\left\lbrack #1 \right\rbrack}%
 \newcommand{\ds}[1]{\displaystyle{#1}}%
 \newcommand{\expo}[1]{{\rm e}^{#1}}%
 \newcommand{\ic}{{\rm i}}%
 \newcommand{\imp}{\Longrightarrow}%
 \newcommand{\pars}[1]{\left( #1 \right)}%
 \newcommand{\pp}{{\cal P}}%
 \newcommand{\ul}[1]{\underline{#1}}%
 \newcommand{\verts}[1]{\left\vert #1 \right\vert}$

\begin{align}
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
=
\expo{-\epsilon^{2}}
\int_{-{\rm i}\infty}^{+{\rm i}\infty}
\frac{{\rm e}^{\epsilon\pars{z + \epsilon}}}{\left(z+\epsilon\right)^n}\,{\rm d}z
\end{align}



*

*$\large \epsilon < 0$
\begin{align}
I\left(n,\epsilon\right)
&=
\expo{-\epsilon^{2}}\pars{-2\pi\ic}\sum_{\ell = 0}^{\infty}
{\epsilon^{\ell} \over \ell!}\,
\int_{-{\rm i}\infty}^{+{\rm i}\infty}
{{\rm d}z \over \pars{z + \epsilon}^{n - \ell}}
=
\expo{-\epsilon^{2}}\pars{-2\pi\ic}
{\epsilon^{n - 1} \over \pars{n - 1}!}\,
\end{align}


*$\large \epsilon > 0$
\begin{align}
I\left(n,\epsilon\right)
&=
\expo{-\epsilon^{2}}\pars{+\,2\pi\ic}\sum_{\ell = 0}^{\infty}
{\epsilon^{\ell} \over \ell!}\,
\int_{-{\rm i}\infty}^{+{\rm i}\infty}
{{\rm d}z \over \pars{z + \epsilon}^{n - \ell}}
=
\expo{-\epsilon^{2}}\pars{+\,2\pi\ic}
{\epsilon^{n - 1} \over \pars{n - 1}!}\,
\end{align}


*$\large \epsilon = 0$: Left to the OP.



$$\color{#ff0000}{\large%
\int_{-{\rm i}\infty}^{+{\rm i}\infty} \frac{{\rm e}^{\epsilon z}}{\left(z+\epsilon\right)^n}\,{\rm d}z
\color{#000000}{\ =\ }
2\pi\ic\,{\rm sgn}^{n}\pars{\epsilon}\,
{\verts{\epsilon}^{n -1} \over \pars{n - 1}!}\,,
\qquad
\color{#000000}{\epsilon \not= 0}}
$$

