Solution.
Let f ( z ) = 1 ( 1 + z 2 ) ( 1 + ( x − z ) 2 ) f\p{z} = \frac{1}{\p{1 + z^2}\p{1 + \p{x-z}^2}} f ( z ) = ( 1 + z 2 ) ( 1 + ( x − z ) 2 ) 1 , which has poles at ± i \pm i ± i and
1 + ( x − z ) 2 = 0 ⟺ x ± i . 1 + \p{x - z}^2 = 0
\iff x \pm i. 1 + ( x − z ) 2 = 0 ⟺ x ± i .
For 0 < R < ∣ x + i ∣ 0 < R < \abs{x + i} 0 < R < ∣ x + i ∣ , let γ R \gamma_R γ R be the semicircle with [ − R , R ] \br{-R, R} [ − R , R ] and arc { R e i θ ∣ 0 ≤ θ ≤ π } \set{Re^{i\theta} \mid 0 \leq \theta \leq \pi} { R e i θ ∣ 0 ≤ θ ≤ π } . Then the only poles of f f f in the interior of γ R \gamma_R γ R are i i i and x + i x + i x + i . The residues of f f f there are
Res ( f ; i ) = lim z → i ( z − i ) f ( z ) = lim z → i 1 ( i + z ) ( 1 + ( x − z ) 2 ) = 1 2 i ( 1 + ( x − i ) 2 ) \begin{aligned}
\Res{f}{i}
&= \lim_{z \to i} \p{z - i} f\p{z} \\
&= \lim_{z \to i} \frac{1}{\p{i + z}\p{1 + \p{x - z}^2}} \\
&= \frac{1}{2i\p{1 + \p{x - i}^2}}
\end{aligned} Res ( f ; i ) = z → i lim ( z − i ) f ( z ) = z → i lim ( i + z ) ( 1 + ( x − z ) 2 ) 1 = 2 i ( 1 + ( x − i ) 2 ) 1
and
Res ( f ; x + i ) = lim z → x + i ( z − ( x + i ) ) f ( z ) = lim z → x + i 1 ( 1 + z 2 ) ( ( z − x ) + i ) = 1 2 i ( 1 + ( x + i ) 2 ) . \begin{aligned}
\Res{f}{x + i}
&= \lim_{z \to x+i} \p{z - \p{x+i}}f\p{z} \\
&= \lim_{z \to x+i} \frac{1}{\p{1 + z^2}\p{\p{z - x} + i}} \\
&= \frac{1}{2i\p{1 + \p{x+i}^2}}.
\end{aligned} Res ( f ; x + i ) = z → x + i lim ( z − ( x + i ) ) f ( z ) = z → x + i lim ( 1 + z 2 ) ( ( z − x ) + i ) 1 = 2 i ( 1 + ( x + i ) 2 ) 1 .
As for the integral, on the arc C R C_R C R , we get
∣ ∫ C R f ( z ) d z ∣ = ∣ ∫ 0 π i R e i θ ( 1 + R 2 e i 2 θ ) ( 1 + ( x − R e i θ ) 2 ) d θ ∣ ≤ ∫ 0 π R ( R 2 − 1 ) ( R 2 − ( 1 + x ) ) 2 d θ = π R ( R 2 − 1 ) ( R 2 − ( 1 + x ) ) 2 \begin{aligned}
\abs{\int_{C_R} f\p{z} \,\diff{z}}
&= \abs{\int_0^\pi \frac{iRe^{i\theta}}{\p{1 + R^2e^{i2\theta}}\p{1 + \p{x - Re^{i\theta}}^2}} \,\diff\theta} \\
&\leq \int_0^\pi \frac{R}{\p{R^2 - 1}\p{R^2 - \p{1 + x}}^2} \,\diff\theta \\
&= \frac{\pi R}{\p{R^2 - 1}\p{R^2 - \p{1 + x}}^2}
\end{aligned} ∣ ∣ ∫ C R f ( z ) d z ∣ ∣ = ∣ ∣ ∫ 0 π ( 1 + R 2 e i 2 θ ) ( 1 + ( x − R e i θ ) 2 ) i R e i θ d θ ∣ ∣ ≤ ∫ 0 π ( R 2 − 1 ) ( R 2 − ( 1 + x ) ) 2 R d θ = ( R 2 − 1 ) ( R 2 − ( 1 + x ) ) 2 π R
which tends to 0 0 0 as R → ∞ R \to \infty R → ∞ . Thus, by the residue theorem, sending R → ∞ R \to \infty R → ∞ yields
∫ − ∞ ∞ d y ( 1 + y 2 ) ( 1 + ( x − y ) 2 ) = 2 π i ( 1 2 i ( 1 + ( x − i ) 2 ) + 1 2 i ( 1 + ( x + i ) 2 ) ) = π ( 1 + ( x + i ) 2 + 1 + ( x − i ) 2 ( 1 + ( x − i ) 2 ) ( 1 + ( x + i ) 2 ) ) = π ( 2 + 2 x 2 − 2 1 + ( x + i ) 2 + ( x − i ) 2 + ( x − i ) 2 ( x + i ) 2 ) = π ( 2 x 2 1 + 2 x 2 − 2 + x 4 + 2 x 2 + 1 ) = 2 π x 2 + 4 . \begin{aligned}
\int_{-\infty}^\infty \frac{\diff{y}}{\p{1 + y^2}\p{1 + \p{x-y}^2}}
&= 2\pi i \p{\frac{1}{2i\p{1 + \p{x - i}^2}} + \frac{1}{2i\p{1 + \p{x+i}^2}}} \\
&= \pi\p{\frac{1 + \p{x + i}^2 + 1 + \p{x - i}^2}{\p{1 + \p{x - i}^2}\p{1 + \p{x + i}^2}}} \\
&= \pi\p{\frac{2 + 2x^2 - 2}{1 + \p{x + i}^2 + \p{x - i}^2 + \p{x - i}^2\p{x + i}^2}} \\
&= \pi\p{\frac{2x^2}{1 + 2x^2 - 2 + x^4 + 2x^2 + 1}} \\
&= \frac{2\pi}{x^2 + 4}.
\end{aligned} ∫ − ∞ ∞ ( 1 + y 2 ) ( 1 + ( x − y ) 2 ) d y = 2 πi ( 2 i ( 1 + ( x − i ) 2 ) 1 + 2 i ( 1 + ( x + i ) 2 ) 1 ) = π ( ( 1 + ( x − i ) 2 ) ( 1 + ( x + i ) 2 ) 1 + ( x + i ) 2 + 1 + ( x − i ) 2 ) = π ( 1 + ( x + i ) 2 + ( x − i ) 2 + ( x − i ) 2 ( x + i ) 2 2 + 2 x 2 − 2 ) = π ( 1 + 2 x 2 − 2 + x 4 + 2 x 2 + 1 2 x 2 ) = x 2 + 4 2 π .