# Real improper integral with "Residue Theorem"

I have to prove that $$\int_{0}^{+\infty}\frac{\sqrt{x}}{(x^{2}+1)}dx=\frac{\pi}{\sqrt{2}}$$. I don't know what curve to use in the complex plane as the domain of integration is $$[0,+\infty)$$ and not my "usual" $$(-\infty,+\infty)$$ where the curve is as we know a semicircle of radius $$R$$ centered at the origin. I tried a stupid way: $$f(z):=\frac{\sqrt{z}}{(z^{2}+1)}$$ with poles of order $$1$$ at $$z_{1}=i,z_{2}=-i$$. Considering the curve in the complex plane consisting of the quarter of the circle of radius $$R$$ centered at the origin in the first quadrant, I calculate $$Res(f(z),z_{1})=\frac{1}{2\sqrt{i}}$$ and by the "Residue Theorem" the initial integral is $$2\pi i*(\frac{1}{2\sqrt{i}})=\pi \sqrt{i}$$ which is clearly a silly answer. I think this method fails because the singularity $$z_{1}=i$$ is on the curve and not "inside it".

• Hi, welcome to Math SE. If you don't try @Hyperon's substitution, the usual approach is a keyhole contour (in which case $\sqrt{-i}=\sqrt{e^{3i\pi/2}}=e^{3i\pi/4}$). You can actually also use a semicircle because if $f(z):=z^{1/2}/(z^2+1)$ then $f(-z)=if(z)$ so your integral is $\frac{1}{1+i}\int_{-\infty}^\infty f(x)\mathrm{d}x$.
– J.G.
Jan 12 at 8:28
• I've just realized I should clarify $f(-z)=if(z)$ assumes $z\ge0$, which is enough for our purposes. By the way, when you use a sector contour as you tried, think carefully about the integrand's behaviour on the other radius. In this case, it turns out the most helpful choices are the semicircle & keyhole I've suggested.
– J.G.
Jan 12 at 8:48

Starting from $$I= \int\limits_0^\infty \frac{\sqrt{x}}{x^2+1} dx$$, perform the change of variables $$x=u^2$$ obtaining $$I= 2\int\limits_0^\infty \frac{u^2}{u^4+1} du = \int\limits_{-\infty}^\infty \frac{u^2}{u^4+1}du.$$ Written in this form, the integral can easily be evaluated by computing the complex integral $$I_R=\int\limits_{C_R} \frac{z^2}{z^4+1} dz,$$ where the closed curve $$C_R$$ consists of the interval $$[-R,R]$$ on the real axis and a large semicircle in the upper half plane (centered around the origin) with radius $$R$$ (taken counterclockwise). The contribution originating from the semicircle vanishes in the limit $$R\to \infty$$, such that $$I= \lim\limits_{R\to \infty} I_R$$. The complex integrand has poles at $$z_n= e^{i \pi/4} e^{i\pi n/2}, \quad n=0,1,2,3.$$ It is now an easy task to obtain the residues of the integrand at the poles $$z_0$$ and $$z_1$$ in the upper half plane and to apply the residue theorem to compute the integral (left as an exercise).
Remark: The main reason, why your approach was doomed to fail, was not primarily the presence of the singularity at $$z=i$$ on your curve of integration (this could be avoided by distorting the path circumventing the pole), but the fact that the contribution from the path at (or near) the imaginary axis does not vanish, preventing to obtain the result for the original real integral.
• Thanks a lot. The fact that $g(u)=\frac{u^{2}}{(u^{4}+1)}$ is an even function really makes "the difference" in this case I think. Jan 9 at 14:51