So I want to compute $ I = \int _0^{\infty }\frac{\sqrt[3]{x}}{x^2+1\:}\:dx$.
First thing I thought of is that integrals from $0$ to $\infty$ usually take a nicer form when we apply the change $x = e^t$, so I did that: $$ I = \int _{-\infty }^{\infty }\frac{e^{\frac{4}{3}t}}{e^{2t}+1\:}\:dt $$
Now, I've seen some other integrals with a form like this one. For the other ones, I computed the contour integral of a rectangle of vertex $[-R, R, R+xi, -R+xi]$, choosing $x$ such that the integrand takes opposite values in $[-R, R]$ and $[-R+xi, R+xi]$.
If I could choose such an $x$, then I would have succeeded, since I can prove that the lateral integrals go to $0$ as $R\to \infty$, and thus the desired integrals would be equal to half the value of the residues enclosed by the rectangle.
But that requires solving the following system: $$ \begin{cases} e^{\frac{4}{3}t} = -e^{\frac{4}{3}(t+xi)} \\ e^{2t} = e^{2(t+xi)} \end{cases} \implies \begin{cases} \frac{4}{3}xi+i\pi = 2ki\pi \\ 2xi = 2ki\pi \end{cases} \implies \begin{cases} x = \frac{3}{4}(2k+1)\pi \\ x = k\pi \end{cases} $$ For $k\in \mathbb{Z}$.
But this system does not have a solution!
The first equation forces $x$ to be $q\pi$ for some $q\not\in\mathbb{Z}$, contradicting the second equation.
From here I am stuck. Can I get a hint?
EDIT: I followed @DanielFischer suggestion to use a keyhole contour.
Let $C$ be the keyhole contour formed by a big circle $\Gamma_R$ of radii $R$, a small circle $\gamma_\epsilon$ of radii $\epsilon$ and two segments connecting the two circles surrounding the positive axis, separated by a $\delta$ margin.
Then we have thanks to the estimation lemma that: $$ |\int_{\Gamma_R}|\le {\sup}_{z\in{\Gamma_R}}{\frac{\sqrt[3]{z}}{z^2+1\:}}\cdot long(\Gamma_R)\sim \frac{R^{1/3}}{R^2}\cdot 2\pi R \to 0 $$
On the other hand, when $\delta \to 0$: $$ \int_R^\epsilon\frac{\sqrt[3]{z}}{z^2+1\:} = \int_R^\epsilon\frac{e^{\log{z}/3}}{z^2+1\:} = \int_R^\epsilon\frac{e^{\frac{\log{|z| + i\arg{z}}}{3}}}{z^2+1\:} = -e^{-2\pi i/3}\int_\epsilon^R\frac{e^{\frac{\log{|z| + i\arg{z}+2\pi i}}{3}}}{z^2+1\:} = -e^{-2\pi i/3}\int_\epsilon^R $$
Thus in the limit: $$ \int_C = \int_\Gamma + \int_\gamma + \int_\epsilon^R + \int_R^\epsilon = \int_0^\infty -e^{-2\pi i/3}\int_0^\infty =\\ =(1 -e^{-2\pi i/3})\int_0^\infty = 2\pi i (Res(i)+Res(-i)) $$
The residues can be easily calculated as: $$ Res(i) = \frac{\sqrt[3]{i}}{2i\:}\\ Res(-i) = \frac{\sqrt[3]{-i}}{-2i\:} $$
Thus $\int_0^\infty = \frac{2\pi i (\frac{\sqrt[3]{i}}{2i\:}+\frac{\sqrt[3]{-i}}{-2i\:})}{(1-e^{-2\pi i/3})} = \frac{π}{2 \sqrt{3}} + \frac{i π}{2}$... which is not real as it should be.
Along the way I've also assumed that $\int_{\gamma_\epsilon}\to 0$, which seems like the case but I cannot prove it.
Therefore, I ask:
- How do I prove that $\int_{\gamma_\epsilon}\to 0$?
- Why is my result wrong?
Turns out the minus sign on the exponent was wrong: $$I = \frac{i \left(e^{\frac{i \pi }{3}}-e^{-\frac{2 i \pi }{3}} \right) \pi }{1-e^{\frac{2 i \pi }{3}}} = -2\pi / \sqrt{3}$$
This result is still wrong according to the almighty Wolfram Alpha, but at least it has a similar form! I'll keep debugging.

So, after the change of variable $x=e^t$, you have to compute the integral
$$I=\int_{-\infty}^\infty\frac{e^{4/3 t}}{e^{2t}+1}\,dt.$$
Consider the contour $$\Gamma:=\underbrace{[-R,R]}_{\gamma_1}\cup\underbrace{[R,R+i\pi]}_{\gamma_2} \cup\underbrace{[R+i\pi,-R+i\pi]}_{\gamma_3}\cup \underbrace{[-R+i\pi,-R]}_{\gamma_4},$$ and note that $f(z):=\frac{e^{4/3 z}}{e^{2z}+1}$ has only a simple pole at $z=i\pi/2$ inside $\Gamma$.
It is easy to see that the integral of $f$ along $\gamma_2$ and $\gamma_4$ goes to zero, so taking the limit $R\to\infty$ we have
$$I+\lim_{R\to\infty}\int_{\gamma_3}f(z)\,dz=2\pi i\;\text{res}(f,z=i\pi)=-i\pi e^{2i\pi/3}.$$
Now,
$$\int_{\gamma_3}f(z)\,dz=-\int_{-R}^R\frac{e^{4/3(t+i\pi)}}{1+e^{2(t+i\pi)}}\,dt=-e^{4/3i\pi}\int_{\gamma_1}f(z)\,dz$$
so finally
$$I-e^{4/3i\pi}I=-i\pi e^{2i\pi/3}\implies I=\frac12\frac{\pi}{\sin(2\pi/3)}=\frac{\pi}{\sqrt{3}}.$$