# Using residue theorem to compute an integral

This most likely has a simple solution, but for some reason I keep getting a complex answer to this real integral. Here's the problem:

Let $$S_{\epsilon} := \{x \in \mathbb{R} : |x-1| > \epsilon\}$$. Compute $$\lim_{\epsilon\rightarrow 0^{+}} \int_{S_{\epsilon}} \frac{x}{(x^{2}+4)(x-1)}dx$$ using the residue theorem.

Attempt: I think my best bet is to use the simple contour $$\Gamma$$ which is a semi-annulus about $$z=1$$ in the upper-half plane of outer radius $$R$$ and inner radius $$\epsilon$$. That is, $$\Gamma = \gamma_{1} - \gamma_{2} + \gamma_{3} + \gamma_{4}$$, where \begin{align} &\gamma_{1}: t \in [1-R, 1-\epsilon],\\ &\gamma_{2}: \epsilon e^{it}, 0 \leq t \leq \pi, \\ &\gamma_{3}: t \in [1+\epsilon, 1 + R], \\ &\gamma_{4}: Re^{it}, 0 \leq t \leq \pi. \end{align}

Letting $$f(z) := \frac{z}{(z^{2}+4)(z-1)}$$, the residue theorem gives me $$\int_{\Gamma} f = 2\pi i\text{res}_{2i}(f) = \frac{1}{2(2i-1)}$$ ($$2i$$ is the only pole in int$$(\Gamma)$$ when $$R$$ is large). Hence I have the identity

\begin{align} \frac{1}{2(2i-1)} &= \int_{\gamma_{1}} f(z)dz - \int_{\gamma_{2}} f(z)dz + \int_{\gamma_{3}} f(z) dz + \int_{\gamma_{4}} f(z)dz \\ &\implies \frac{1}{2(2i-1)} + \int_{\gamma_{2}} f(z) dz = \int_{\gamma_{1}} f(z)dz + \int_{\gamma_{3}}f(z)dz + \int_{\gamma_{4}}f(z)dz. \end{align}

Letting $$R \rightarrow \infty$$ yields

\begin{align} \frac{1}{2(2i-1)} + \int_{0}^{\pi} \frac{i\epsilon^{2}e^{2it}}{(\epsilon^{2}e^{2it}+4)(\epsilon e^{it}-1)}dt = \int_{-\infty}^{1-\epsilon} f(t) dt + \int_{1+\epsilon}^{\infty} f(t)dt, \end{align}

where the integral over $$\gamma_{4}$$

$$\int_{0}^{\pi} \frac{R^{2}ie^{2it}}{(R^{2}e^{2it}+4)(Re^{it}-1)} dt$$

went to $$0$$ as $$R \rightarrow \infty$$ (needs justification...). I then want to let $$\epsilon \rightarrow 0^{+}$$ to get

$$\frac{1}{2(2i-1)} + 0 (\text{right?}) = \lim_{\epsilon \rightarrow 0^{+}} \int_{S_{\epsilon}} f(t)dt.$$

The problem with this is that the RHS should be real, while the LHS is not. Where did I go wrong?

Edit: I realized my parametrizations were off a bit. $$\gamma_{2}$$ should be $$1 + \epsilon e^{it}$$ and $$\gamma_{4}$$ should be $$1 + Re^{it}$$. Yet still, the $$\epsilon$$-integral still goes to zero it seems.

• The complex integral is $2\pi i$ times the residue so it is $\frac{\pi i}{2i-1}=\frac{\pi (2-i)}{5}$, the integral in $\epsilon$ is actually $\frac{\pi i}{5}$ in the limit at zero so you are good as the imaginary parts cancel! – Conrad Apr 29 at 23:16
• @Conrad Ah yes I can't believe I've missed that. Thanks so much. – Fred Apr 29 at 23:30
• You are welcome! – Conrad Apr 29 at 23:44

I made a silly mistake: the parametrization I used for $$\gamma_{2}, \gamma_{4}$$ was wrong! I should've shifted by $$1$$. In particular, the $$\epsilon$$-integral becomes $$\pi i/5$$. I also forgot to multiply the residue I calculated by $$2\pi i$$. This gives me a real number for an answer.
\begin{align} &\bbox[10px,#ffd]{\mrm{P.V.}\int_{-\infty}^{\infty}{x \over \pars{x^{2} + 4}\pars{x - 1}}\,\dd x} = \mrm{P.V.}\int_{-\infty}^{\infty}{x + 1 \over x^{2} + 2x + 5} \,{\dd x \over x} \\[5mm] = &\ \int_{-\infty}^{\infty}\pars{% {x + 1 \over x^{2} + 2x + 5} - {-x + 1 \over x^{2} - 2x + 5}} \,{\dd x \over x} = \int_{-\infty}^{\infty}{x^{2} + 3 \over x^{4} + 6x^{2} + 25}\,\dd x \\[5mm] = &\ \bbx{2\pi \over 5} \end{align}
• @Fred $\displaystyle\mathrm{P.V.}$ means $\displaystyle\color{red}{\texttt{Principal Value}}$. Maybe, tomorrow I'll try the "residue's" one. Thanks. – Felix Marin Apr 30 at 5:03