Evaluate $\int_0^{\infty}\frac{\sqrt{x}}{x^2+1}dx$ without Complex Analysis I found  this question on a Complex Analysis Qualifying Exam:
How would you evaluate: $$\int_0^{\infty}\frac{\sqrt{x}}{x^2+1}dx$$
I am interested in all methods including Complex Analysis, I'm just less familiar with it. 
For instance, since the integral is from $0$ to $\infty$ do we only consider the $x-i$ factor in $x^2+1=(x-i)(x+i)$ since $i$ would be the only root in the upper half plane?
 A: Write $x=\tan t$ so your integral is $$\int_0^{\pi/2}\tan^{1/2}tdt=\frac12\operatorname{B}\left(\frac14,\,\frac34\right)=\frac{\pi}{2}\csc\frac{\pi}{4}=\frac{\pi}{\sqrt{2}}.$$See here and here if any of the theory I used is unfamiliar.
A: Without complex analysis? Okay... 
Let $$I=\int_0^\infty\frac{\sqrt{x}}{x^2+1}dx$$ 
Enforce $x:=y^2\implies dx=2y \space dy$. So $$I=\int_0^\infty\frac{\sqrt{x}}{x^2+1}dx=2\int_0^\infty \frac{y^2}{y^4+1}dy=2\int_0^\infty\frac{y^2}{y^2\left(y^2+\frac{1}{y^2}\right)}dy$$ $$=\int_0^\infty \frac{1-\frac{1}{y^2}+1+\frac{1}{y^2}}{y^2+\frac{1}{y^2}}dy=\int_0^\infty\frac{1-1/y^2}{(y+1/y)^2-2}dy+\int_0^\infty\frac{1+1/y^2}{(y-1/y)^2+2}dy\tag1$$
For the first of the two integrals  let $t=y+1/y\implies dt=(1-1/y^2)\space dy$. For the second, let $u=y-1/y\implies du=(1+1/y^2)\space dy$. Hence $(1)$ becomes: $$I=\int_{\infty}^\infty\frac{dt}{t^2-2}+\int_{-\infty}^\infty\frac{du}{u^2+2}=0+\int_{-\infty}^\infty\frac{du}{u^2+2}=2\int_0^\infty\frac{du}{2\left(\left(\frac{u}{\sqrt{2}}\right)^2+1\right)}\tag2$$
Finally with the substitution $z=\frac{u}{\sqrt{2}}\implies dz=\frac{du}{\sqrt{2}}$ $(2)$ becomes $$I=\sqrt{2}\int_0^\infty\frac{dz}{z^2+1}=\sqrt{2}\left(\arctan(z)\big|^\infty_0\right)=\sqrt{2}\left(\frac{\pi}{2}\right)=\frac{\pi}{\sqrt{2}}$$
Thus $$\boxed{I=\frac{\pi}{\sqrt{2}}}$$
A: WLOG $\sqrt x=y\implies x=y^2\implies dx=2y\ dy$
Now $$I=\int_0^\infty\dfrac{2y^2}{y^4+1}dy$$
$$=\int_0^\infty\dfrac{y^2-1}{y^4+1}dy+\int_0^\infty\dfrac{y^2+1}{y^4+1}dy$$
$$=\int_0^\infty\dfrac{1-\dfrac1{y^2}}{y^2+\dfrac1{y^2}}dy+\int_0^\infty\dfrac{1+\dfrac1{y^2}}{y^2+\dfrac1{y^2}}dy$$
For the first integral use $$u=\int\left(1-1/y^2\right)dy$$
and for the second $$v=\int\left(1+1/y^2\right)dy$$
Finally $y^2+\dfrac1{y^2}=\left(y-\dfrac1y\right)^2+2=\left(y+\dfrac1y\right)^2-2$
A: For the sake of completeness, here's the complex analysis method using the residue theorem: first, notice that
$$\int_{-R}^{-\rho} \frac{\sqrt{x}}{x^2 + 1} dx = \int_\rho^R \frac{\sqrt{-x}}{(-x)^2 + 1} dx = i\int_\rho^R \frac{\sqrt{x}}{x^2 + 1} dx$$
We're going to integrate our function on an annulus excluding a small circle at $0$ in order to avoid issues of differentiability at $z = 0.$ Consider the contour $C_{R, \rho}$ in the complex plane which is the union of the real numbers $[-R, -\rho],$ the arc $\gamma_\rho = \{\rho e^{i\theta}: 0 \leq \theta \leq \pi\},$ the real numbers $[\rho, R]$ and the arc $\Gamma_R = \{Re^{i\theta}: 0 \leq \theta \leq \pi\}.$ We must have that
$$\int_{C_{R, \rho}} = \int_{[-R, -\rho]} + \int_{\gamma_\rho} + \int_{[\rho, R]} + \int_{\Gamma_R}$$
$$\Rightarrow \int_{[-R, -\rho]} + \int_{[\rho, R]} = \int_{C_{R, \rho}} - \int_{\gamma_\rho} - \int_{\Gamma_R}$$
$$\Rightarrow \int_\rho^R \frac{\sqrt{x}}{x^2 + 1} dx = \frac{1}{1 + i}\left(\int_{C_{R, \rho}} \frac{\sqrt{z}}{z^2 + 1} dz - \int_{\Gamma_R} \frac{\sqrt{z}}{z^2 + 1} dz - \int_{\gamma_\rho} \frac{\sqrt{z}}{z^2 + 1} dz\right)$$
$$\Rightarrow \int_0^\infty \frac{\sqrt{x}}{x^2 + 1} dx = \frac{1}{1 + i}\lim_{R \to \infty, \rho \to 0}\left(\int_{C_{R, \rho}} \frac{\sqrt{z}}{z^2 + 1} dz - \int_{\Gamma_R}\frac{\sqrt{z}}{z^2 + 1} dz - \int_{\gamma_\rho} \frac{\sqrt{z}}{z^2 + 1} dz\right)$$
So, we just need to consider the three integrals on the right for sufficiently large $R$ and small $\rho.$
Our integrand is differentiable for all $z$ not equal to $0, i,$ or $-i.$ Of these, $i$ lies interior to $C_{R, \rho}$ for $\rho < 1 < R,$ and the others are never interior to $C_{R, \rho}.$ So, by the residue theorem we have
$$\int_{C_{R, \rho}} \frac{\sqrt{z}}{z^2 + 1} dz = 2\pi i \cdot \text{Res}_{z = i}\frac{\sqrt{z}}{z^2 + 1}$$
and because our integrand can be rewritten as $$\frac{\frac{\sqrt{z}}{z + i}}{z - i} = \frac{g(z)}{z - i}$$
where $g(z)$ is differentiable at $z = i,$ it is a simple pole so we have
$$2\pi i \cdot \text{Res}_{z = i} \frac{g(z)}{z - i} = 2\pi i \cdot g(i) = 2\pi i \cdot \frac{\sqrt{i}}{i + i} = \frac{\pi}{\sqrt{2}}(1 + i)$$
Regarding the other two, computing them directly would be difficult, but recalling that we only need to compute their limits there's a trick we can use: recall that
$$\left|\int_{\Gamma_R} \frac{\sqrt{z}}{z^2 + 1} dz\right| \leq \int_{\Gamma_R} \left|\frac{\sqrt{z}}{z^2 + 1}\right| dz \leq \int_{\Gamma_R} dz \cdot \max_{z \in \Gamma_R} \left|\frac{\sqrt{z}}{z^2+1}\right|$$
and noting that the triangle inequality gives us that $$|z^2| \leq |z^2 + 1| + |-1| \Rightarrow |z^2 + 1| \geq |z|^2 - 1$$
and that $|z| = R$ everywhere on $\Gamma_R,$ this gives us
$$0 \leq \left|\int_{\Gamma_R} \frac{\sqrt{z}}{z^2 + 1} dz\right| \leq \frac{\pi R^{\frac32}}{R^2 - 1}$$
and taking limits as $R \to \infty$ on each and using the squeeze theorem, we get that
$$\lim_{R \to \infty} \int_{\Gamma_R} \frac{\sqrt{z}}{z^2 + 1} dz = 0$$
and by a similar argument (this time showing $|z^2 + 1| \geq 1 - |z|^2$) we get that
$$\lim_{\rho \to 0} \int_{\gamma_\rho} \frac{\sqrt{z}}{z^2 + 1} dz = 0$$
So, finally we have
$$\int_0^{\infty} \frac{\sqrt{x}}{x^2 + 1} dx = \frac{1}{1+ i}\left(\frac{\pi}{\sqrt{2}}(1 + i) - 0 - 0\right) = \boxed{\frac{\pi}{\sqrt{2}}}$$
A: \begin{align}
\int_0^{\infty}\frac{\sqrt{x}}{x^2+1}dx
\overset{x\to1/x}=& \ \frac12\int_0^{\infty}\frac{{\sqrt x}+\frac1{\sqrt x}}{x^2+1}dx
=\int_0^{\infty}\frac{d(\sqrt{x}-\frac1{\sqrt x})}{(\sqrt x-\frac1{\sqrt x})^2+2}=\frac\pi{\sqrt2}
\end{align}
A: Let $x^2=y$ we obtaine : 
$\int_0^{\infty}\frac{x^{-\frac{1}{4}}}{2(1+x)}dx$ 
Then we use beat function : 
$\beta(\frac{3}{4},\frac{1}{4})$
