# Evaluating $\int_0^{\infty} \frac{\sqrt{x}}{x^2+2x+5} dx$ using complex analysis

how do I compute

$$\int_0^{\infty} \frac{\sqrt{x}}{x^2+2x+5} dx$$

with complex analysis?

I feel like im calculating the residue wrong and I cant get to the answer correctly. I tried to branch cut the real $0 \rightarrow \infty$ but I feel like im doing it wrong. any help is appriciated.

thank you for the input everyone it is very helpful.

i did come down to calculating the integral

$$\int_0^{\infty} \frac{\sqrt{x}}{x^2+2x+5} dx = i\pi [Res(f,z_1=-1+2i)+Res(f,z_2=-1-2i)]$$

Then given answer to this question is $\frac{\pi}{2}\sqrt{\frac{\sqrt{5}-1}{2}}$

I was just simply calculating

$i\pi [Res(f,z=-1+2i)+Res(f,z=-1-2i)] = i\pi \left(\frac{\sqrt{z_1}}{2z_1+2}+\frac{\sqrt{z_2}}{2z_2+2}\right)$

Solving for

$\frac{\pi}{4} \left(\sqrt{-1+2i}-\sqrt{-1-2i}\right)$

I get $\frac{\pi}{2}\sqrt{\frac{-\sqrt{5}-1}{2}}$ and I still dont know what I am doing wrong for that one sign error.

• That's the right branch-cut. Can you add what you did? It's hard to spot any mistakes without seeing that. – Daniel Fischer Nov 19 '14 at 17:21
• Perhaps you computed the wrong value for $\sqrt{-1-2i}$. With the branch cut given, it is $-\sqrt{\phi-1}+i\sqrt\phi$ and not $\sqrt{\phi-1}-i\sqrt\phi$. – robjohn Nov 19 '14 at 18:53

The integral along the contour just above the real axis would be $$\int_0^R\frac{\sqrt{x}}{x^2+2x+5}\mathrm{d}x\tag{1}$$ The integral along the contour circling the complex plane at a radius of $R$ would be bound by \begin{align} \int_0^{2\pi}\frac{\sqrt{R}}{R^2-2R-5}R\,\mathrm{d}\theta &\stackrel{\hphantom{R\to\infty}}{\le}\frac{2\pi}{R^{1/2}-2R^{-1/2}-5R^{-3/2}}\\ &\stackrel{R\to\infty}{\to}0\tag{2} \end{align} The integral along the contour just below the real axis would be $$\int_R^0\frac{-\sqrt{x}}{x^2+2x+5}\mathrm{d}x\tag{3}$$ Adding up the pieces $(1)$, $(2)$, and $(3)$, and letting $R\to\infty$, we get \begin{align} 2\int_0^\infty\frac{\sqrt{x}}{x^2+2x+5}\mathrm{d}x &=2\pi i\left[\vphantom{\frac{\sqrt{-1-2i}}{-4i}}\right.\underbrace{\frac{\sqrt{-1-2i}}{-4i}}_{\begin{array}{}\text{Residue at}\\z=-1-2i\end{array}}+\underbrace{\frac{\sqrt{-1+2i}}{4i}}_{\begin{array}{}\text{Residue at}\\z=-1+2i\end{array}}\left.\vphantom{\frac{\sqrt{-1-2i}}{-4i}}\right]\\ &=2\pi i\left[\frac{-\sqrt{\phi-1}+i\sqrt\phi}{-4i}+\frac{\sqrt{\phi-1}+i\sqrt\phi}{4i}\right]\\[12pt] &=\frac\pi{\sqrt\phi}\tag{4} \end{align} and therefore, $$\int_0^\infty\frac{\sqrt{x}}{x^2+2x+5}\mathrm{d}x=\frac\pi{2\sqrt\phi}\tag{5}$$
• From what I've been taught, you also have to consider a second circle around the branch point whose radius goes to $0$. This integral does go to $0$, it is nontrivial – Dylan Nov 28 '17 at 12:37
• @Dylan: the integrand near $x=0$ vanishes, so the integral around an infinitesimal semi-circle will be the integral of a vanishing function over an infinitesimal contour; so it will be $0$. I didn't think it was really worth mentioning, but perhaps I will move part of this comment into the answer. – robjohn Nov 28 '17 at 14:33