Find the closed form for the integral $$\mathcal I= \int_{-\infty}^\infty \frac{\sin (\pi x)}{(x^2 - 7x + 10)(x^2 + 1)} dx$$
My attempt
In order to solve this integral, what I first consider is using residue theory. First of all, notice that
- The denominator cancels out when $x^2 - 7x + 10 = 0 \Leftrightarrow x = \frac{7 \pm \sqrt{7^2 - 40}}{2} = \begin{cases} x_1 = 2 \\ x_2 = 5 \end{cases}$, as well as when $x^2 + 1 = 0 \Leftrightarrow x=\pm i$. Notice that the poles $2$ and $5$ are placed on the real axis, and the only one on the upper semiplane is $i$.
- From Euler's identity we know that $e^{i \pi x} = \cos(\pi x) + i \sin(\pi x)$. Therefore, we can rewrite the integral as $$\Im \left( \int_{-\infty}^\infty \frac{e^{\pi z}}{(z^2 - 7z + 10)(z^2 + 1)} dz \right) = \Im \left( \int_{-\infty}^\infty \frac{e^{i\pi z}}{(z-2)(z-5)(z+i)(z-i)} dz \right)$$ From residue theory, we know that $$\int_{-\infty}^\infty \frac{e^{i\pi z}}{(z-2)(z-5)(z+i)(z-i)} dz = 2\pi i Res(f(z); z=i) + \pi i Res(f(z); z=2) + \pi i Res(f(z); z=5)$$
Now were I'm not confident is calculating the residues. I can apply that, as all the poles are simple, $$Res(f(z); z=i) = \lim_{z\to i} (z-i) f(z) = \lim_{z\to i} \frac{e^{i\pi z}}{(z-2)(z-5)(z+i)} = \frac{e^{-\pi}}{18i + 14}$$ $$Res(f(z); z=2) = \lim_{z\to 2} (z-2) f(z) = \lim_{z\to 2} \frac{e^{i\pi z}}{(z-i)(z-5)(z+i)} = \frac{-e^{2i\pi}}{15}$$ $$Res(f(z); z=5) = \lim_{z\to 5} (z-5) f(z) = \lim_{z\to 5} \frac{e^{i\pi z}}{(z-i)(z-2)(z+i)} = \frac{e^{5i\pi}}{78}$$ So $$\mathcal I=\Im \left(2\pi i \frac{e^{-\pi}}{18i + 14} + \pi i \frac{-e^{2i\pi}}{15} + \pi i \frac{e^{5i\pi}}{78} \right)$$
From here I have two concerns:
- How can I simpify the resulting expresion of the integral, if it is indeed the correct answer.
- In my previous post for an integral, I was said that the residues are indeed the terms of the Taylor expresion (since in this integral the poles are simple, they would be the $0^{th}$ term?), but I could not figure out how to find them that way, if someone could explain me that method.
Thanks so much for the helping:)
(1) Since $e^{2 \pi i k} = (-1)^k$ for $k \in \Bbb Z$, the second and third terms of the expression in $\Im(\cdots)$ are purely imaginary. We can compute the imaginary part of the first term by rewriting it in the form $a + b i$, by multiplying both the numerator and denominator of the fraction by the conjugate $14 - 18 i$ of the denominator.
More generally, if $a, b \in \Bbb R$ are distinct, the computation gives for $$f(x) := \frac{\sin \pi x \,dx}{(x - a) (x - b) (x^2 + 1)}$$ that \begin{align*} \operatorname{PV}\int_{-\infty}^\infty f(x) \,dx &= \Im \left(2 \pi i \left[\operatorname{Res}(f(z), i) + \frac{1}{2} \operatorname{Res}(f(z), a) + \operatorname{Res}(f(z), b)\right] \right) \\ &= \pi \Im \left[\frac{e^{-\pi}}{(i - a)(i - b)} + \frac{i e^{\pi i a}}{(a - b)(a^2 + 1)} - \frac{i e^{\pi i b}}{(a - b)(b^2 + 1)}\right] \\ &= \frac{\pi [ e^{-\pi} (a^2 - b^2) + (1 + b^2) \cos \pi a - (1 + a^2) \cos \pi b]}{(a - b) (1 + a^2) (1 + b^2)} \end{align*} In the special case that $a, b \in \Bbb Z$, the second and third terms in the numerator are $(1 + b^2) (-1)^a$ and $-(1 + a^2) (-1)^b$, repectively. Specializing to the integral at hand, i.e., the case $a = 2, b = 5$, gives a value of $$\frac{\pi}{390}\left(21 e^{-\pi} - 31\right) = -0.24240\ldots,$$ which agrees with your numerical evaluation.
(2) It's not entirely clear what this question is asking, but perhaps the following will clarify the issue: If $f(z)$ has a simple pole at $z = z_0$, its Laurent expansion is $$\frac{b_{-1}}{z - z_0} + a_0 + a_1(z - z_0) + \cdots ,$$ where $b_{-1} = \operatorname{Res}(f, z_0)$, and so $(z - z_0) f(z)$ (with the singularity at $z = z_0$ removed) has a Taylor series defined at $z = z_0$, namely, $$b_{-1} + a_0 (z - z_0) + a_1 (z - z_0)^2 + \cdots .$$ In particular, $\operatorname{Res}(f, z_0) = b_{-1} = \lim_{z \to z_0} (z - z_0) f(z)$.