I'm asking to evaluate the following integral $$ \int_0^{+\infty} \frac{\sqrt{x}}{x^4+1}dx$$
And my idea was to compute it on the half upper disk of radius $R$ with a little smaller half disk around the origin. I make a branch cut on the negative imaginary axis which means that I restrict the arguments to $(-\pi/2,3/2\pi)$
According to the solution provided the result is $$\frac{\pi \cos(\pi/8)}{2+\sqrt{2}}$$
but I get $\frac{\pi}{2}(\sin(\frac{\pi}{8})+\cos(\frac{\pi}{8}))$. Here is my attempt: We have two simple poles in our domain, $e^{i\pi/4}$ and $e^{i3/4\pi}$, and their residues are $-\frac{1}{4}e^{i 3/8\pi}$ and $-\frac{1}{4}e^{i \pi/8}$. Hence by the Residue theorem the integral along the circuit must be equal to $$ 2\pi i (-\frac{1}{4}e^{i 3/8\pi}-\frac{1}{4}e^{i \pi/8})$$ which is equal to $$-\frac{i\pi}{2}(\cos(\pi/8)+\sin(\pi/8)+i(\cos(\pi/8)+\sin(\pi/8)))$$
Now by ML estimates I believe I can show that the integrals along the two semicircles are going both to $0$, while the integral along the negative real axis is $i$-times the one along the positive real axis, hence purely imaginary. By taking the real part the result is $$ \frac{\pi}{2}(\cos(\pi/8)+\sin(\pi/8))$$ which sadly is not the result given. Am I making any conceptual error? (maybe with the branch cut?) what's wrong? I've double checked my computations but I can't find the error