Evaluating real integral using complex analysis. I'm trying to compute the following integral:
$$\int_0^{\infty}\frac{\sqrt{x}}{1+x^4}dx$$
I'll not write down everything I've done, but choosing the branch cut on the positive real axes we have that:
$$\int_0^{\infty}\frac{\sqrt{x}}{1+x^4}dx=\pi i \sum_{z_i}Res(f,z_i) \qquad z_i\in\{\pm \sqrt{i},\pm\sqrt{-i}\}$$
So we have to compute four residues.
My thought was changing the branch cut by putting it on the negative imaginary axes. We can do it by choosing $arg(z) \in (-\frac{\pi}{2},\frac{3\pi}{2}]$. So we have that:
$$(1+i)\int_0^{\infty}\frac{\sqrt{x}}{1+x^4}dx=2\pi i \sum_{z_i}Res(f,z_i) \qquad z_i\in\{e^{i\frac{\pi}{4}},e^{i\frac{3\pi}{4}}\}$$
By doing this, we now need to compute only two residues. But I'm really finding difficulties in computing those residues: in fact I can't obtain the result I'm expecting. Can you please show me the computation and tell me if my argument was clear and correct?
Thanks in advance.
 A: The calcus of the residues are relatevely simple when you have simple poles.
Infact, if $z_0$ is a simple pole then $f(z) = a_{-1}(z-z_{0})^{-1}+ \sum\limits_{n \geq 0}a_n(z-z_0)^n$
So $(z-z_{0})f(z) = (z-z_{0})^{-1}+ \sum\limits_{n \geq 0}a_n(z-z_0)^n$ which implies
$$\text{Res}(f,z_{0}) = a_{-1} = \lim\limits_{z \to z_0}(z-z_{0})f(z)$$
This result to be useful when we condiser $f$ of the form $\frac{f}{q}$ with $p,q$ holomorphic function, $p(z_0) \ne 0$ and $z_0$ a simple pole of $q$ since
$$\text{Res}(f,z_{0})= a_{-1} = \lim\limits_{z \to z_0}(z-z_{0})\frac{p(z)}{q(z)} = \frac{p(z_0)}{q'(z_0)}$$
In general :
For higher order poles a strategy could be : If $f$ has a pole of order $k$ in $z_0$, $g(z) = (z-z_0)^k f(k)$ extends to an holomorphic function in $z_0$ (I'm gonna call it improperly by $g$ as well)
With this setting $$f(z) = a_{-k}(z-z_0)^k + \cdots + a_{-1}(z-z_0)^{-1} + \sum\limits_{n \geq 0}a_n(z-z_0)^n$$
$$g(z) = a_{-k} + \cdots + a_{-1}(z-z_0)^{k-1} +  \sum\limits_{n \geq 0}a_n(z-z_0)^{n+k}$$
So $a_{-1}$ is the coefficient of $(z-z_0)^{k-1}$ in the expansion of $g$ which is holomorphic. Knowing that $a_{n} = \frac{f^{(n)}(z_0)}{n!}$ we have $$\text{Res}(f,z_{0}) = a_{-1} = \frac{g^{(k-1)}(z_0)}{(k-1)!}$$
Hope this helps with your calculations.
A: Under $x^4\to x$,
$$\int_0^{\infty}\frac{\sqrt{x}}{1+x^4}dx=\frac14\int_0^\infty\frac{1}{x^{5/8}(1+x)}dx. $$
Let
$$ f(z)=\frac{1}{z^{5/8}(1+z)}. $$
Let $C_r, C_R$ be circles at $0$ cut from $r$ to $R$, respectively, and $C_1, C_2$ be the top and bottom parts of the segment from $r$ to $R$. Then, for big $R>0$ and small $r>0$,
$$ \int_{C_R}f(z)dz+\int_{C_r^-}f(z)dz+\int_0^{R}f(x)dx-\int_0^{R}f(xe^{2\pi i})dx=2\pi i\text{Res}(f,z=-1). $$
Clearly
$$ \bigg|\int_{C_R}f(z)dz\bigg|\le\frac{1}{R^{5/8}(R-1)}2\pi R=\frac{2\pi R^{3/8}}{R-1}, \bigg|\int_{C_r^-}f(z)dz\bigg|\le\frac{1}{r^{5/8}(1-r)}2\pi r=\frac{2\pi r^{3/8}}{1-r} $$
and
$$ \int_0^{R}f(xe^{2\pi i})dx=e^{-5\pi i/4}\int_0^\infty f(x)dx, \text{Re}(f,z=-1)=e^{-5\pi i/8}. $$
So letting $R\to\infty, r\to 0^+$, one has
$$ (1+e^{-5\pi i/4})\int_0^\infty f(x)dx=2\pi i e^{-5\pi i/8} $$
or
$$ \int_0^\infty f(x)dx=\frac{2\pi i e^{-5\pi i/8}}{1+e^{-5\pi i/4}}=\frac{\pi}{\cos(\pi/8)}. $$
Thus
$$\int_0^{\infty}\frac{\sqrt{x}}{1+x^4}dx=\frac14\int_0^\infty\frac{1}{x^{5/8}(1+x)}dx=\frac{\pi}{4\cos(\pi/8)}. $$
