Improper integral from expectation

81 Views Asked by At

Question: Can $\int_0^\infty \frac{\sqrt{x}}{(1+x)^2} dx$ be computed with residue calculus?

The integral comes from computing $\mathbb{E}(\sqrt{X})$ where $X=U/(1-U)$ and $U$ is uniformly distributed in the unit interval. One can see that $\mathbb{E}(X)=\infty$ while wolfram computes the expectation of the radical as $\pi/2$ and I confirmed this numerically with Monte Carlo simulations in the r programming language.

It’s been awhile since I’ve done residue calculus so I consulted Ahlfors’ text. Ahlfors treats integrals of the form $\int_0^\infty x^\alpha R(x) dx$ for some rational function (i.e. ratio of polynomials) $R(x)$ and $0<\alpha<1$ which is this case with $\alpha=1/2$ and $R(x)=1/(1+x)^2$ but then states for convergence $R(x)$ must have a zero of at least order 2 at $\infty$ and at most a simple pole at the origin. But the latter is not satisfied here, there is only a zero at the origin not a pole, so this cannot be applied plus we have the pole of order 2 at $a=-1$ to deal with, right?

My idea before reviewing was to try a semi-circle of radius $R>1$ with indented semi-circle about $a=-1$. The residue of $f$ at $a=-1$ I have computed as $-i/2$ and I recall indented estimation lemma resulting in the indented contour integral tending towards $i\pi Res(f,a)$ as the radius shrinks, which with the correct (negative) orientation would give $-\pi/2$ so if the entire contour integral is zero, we can add this to other side and (hopefully) show the rest vanishes except for $\int_0^\infty$ region but I’m obviously handwaving here. This seems problematic because it appears we’d be left with $\int_{-\infty}^{\infty}$ as the larger semi-circle radius grows and the smaller one about $a=-1$ shrinks instead of getting the integral just over the positive half line.

(If this can be done with real methods too, I certainly am not opposed to that answer, this is just for fun)

2

There are 2 best solutions below

0
On

There are many ways to evaluate this integral. One way is as follows: $$\begin{align*} \int_{x=0}^\infty \frac{\sqrt{x}}{(1+x)^2} \, dx &= \int_{x=0}^1 \frac{\sqrt{x}}{(1+x)^2} \, dx + \int_{x=1}^\infty \frac{\sqrt{x}}{(1+x)^2} \, dx \\ &= \int_{x=0}^1 \frac{\sqrt{x}}{(1+x)^2} \, dx + \int_{x=0}^1 \frac{x^{-1/2}}{(1+x)^2} \, dx \\ &= \int_{x=0}^1 \frac{x^{1/2} + x^{-1/2}}{(1+x)^2} \, dx \\ &= \int_{x=0}^1 \frac{x^{-1/2}(x+1)}{(1+x)^2} \, dx \\ &= \int_{x=0}^1 \frac{1}{\sqrt{x}(1+x)} \, dx \\ &= \int_{u=0}^1 \frac{2u \, du}{u (1 + u^2)} \\ &= 2 \left[\tan^{-1} \sqrt{x}\right]_{x=0}^1 \\ &= \frac{\pi}{2}. \end{align*}$$

0
On

Using the substitution $x=u^2$ gives $$\int_0^\infty\frac{\sqrt{x}}{(1+x)^2}\mathrm{d}x=\int_0^\infty\frac{2u^2}{(1+u^2)^2}\mathrm{d}u$$ then we can apply integration by parts giving $$\int_0^\infty\frac{2u^2}{(1+u^2)^2}\mathrm{d}u=\overbrace{\left[-\frac{u}{1+u^2}\right]_0^\infty}^{0}+\int_0^\infty\frac1{1+u^2}\mathrm{d}u=[\arctan{(u)}]_0^\infty=\frac{\pi}2$$