How can I evaluate $$\int_{0}^{\infty} \frac{\sqrt{x} (x+1)}{x^4+1} dx$$ by using Residue theorem.
Thank you
How can I evaluate $$\int_{0}^{\infty} \frac{\sqrt{x} (x+1)}{x^4+1} dx$$ by using Residue theorem.
Thank you
See the link Closed form for $ \int_0^\infty {\frac{{{x^n}}}{{1 + {x^m}}}dx }$ for integrating $\int_0^\infty \frac{x^{a-1}}{1+x^b}dx =\frac\pi {b\sin\frac{\pi a}b}$. Then,
\begin{align} \int_{0}^{\infty} \frac{\sqrt{x} (x+1)}{x^4+1} dx &=\int_{0}^{\infty} \frac{x^{5/2-1}}{x^4+1} dx +\int_{0}^{\infty} \frac{x^{3/2-1}}{x^4+1} dx \\ &= \frac\pi{4\sin\frac{5\pi}8 }+ \frac\pi{4\sin\frac{3\pi}8}=\frac\pi4 \frac{ \sin\frac{5\pi}8 +\sin\frac{3\pi}8}{\sin\frac{5\pi}8 \sin\frac{3\pi}8}\\ &=\frac\pi4 \frac{ 2\cos\frac{\pi}8}{\cos^2\frac{\pi}8}=\frac\pi{2\cos\frac\pi8} \end{align}
We seek to compute using contour integration the integral
$$J = \int_0^\infty \frac{\sqrt{x} (x+1)}{x^4+1} \; dx$$
We work with
$$f(z) = \frac{\exp(\mathrm{Log}(z)/2) (z+1)}{z^4+1}$$
where $\mathrm{Log}(z)$ is the branch with argument in $[0,2\pi).$ We use a keyhole contour wih radius $R$ and the slot on the positive real axis. Let $\Gamma_0$ be the segment on the real axis up to $R$, $\Gamma_1$ the big circle of radius $R$, $\Gamma_2$ the segment below the real axis coming in from $R$ and finally $\Gamma_3$ the small circle of radius $\epsilon$ enclosing the origin. We then have with
$$\rho_k = \exp(\pi i/4+\pi i k/2)$$
that
$$\left(\int_{\Gamma_0} + \int_{\Gamma_1}+ \int_{\Gamma_2}+ \int_{\Gamma_3}\right) f(z) \; dz = 2\pi i \times \sum_{k=0}^3 \mathrm{Res}_{z=\rho_k} f(z).$$
The poles are all simple and we get for the residues
$$\frac{\exp(\mathrm{Log}(\rho_k)/2) (\rho_k+1)}{4\rho_k^3} = -\frac{\exp(\mathrm{Log}(\rho_k)/2) \rho_k (\rho_k+1)}{4} \\ = -\frac{\exp(\pi i/8 + \pi i k/4 + \pi i/2 + \pi i k)}{4} - \frac{\exp(\pi i/8 + \pi i k/4 + \pi i/4 + \pi i k/2)}{4} \\ = - \frac{\exp(5\pi i/8) \exp(5\pi i k/4)}{4} - \frac{\exp(3\pi i/8) \exp(3\pi i k/4)}{4}.$$
Summing over $k$ we find
$$-\frac{1}{4} \exp(5\pi i/8) \sum_{k=0}^3 \exp(5\pi i k/4) = -\frac{1}{4} \exp(5\pi i/8) \frac{2}{1-\exp(5\pi i/4)}$$
and
$$-\frac{1}{4} \exp(3\pi i/8) \sum_{k=0}^3 \exp(3\pi i k/4) = -\frac{1}{4} \exp(3\pi i/8) \frac{2}{1-\exp(3\pi i/4)}.$$
Now observe that in the limit for $\Gamma_0$ and $\Gamma_2$
$$\int_{\Gamma_0} f(z) \; dz = J$$
and
$$\int_{\Gamma_2} f(z) \; dz = \int_{\infty}^0 \exp(\pi i) \frac{\sqrt{x}(x+1)}{x^4+1} \; dx = \int_0^\infty \frac{\sqrt{x}(x+1)}{x^4+1} \; dx = J.$$
For the large circle of radius $R$ we have by the ML-estimate on $\Gamma_1$ the bound $\lim_{R\rightarrow\infty} 2\pi R\times \frac{\sqrt{R} (R+1)}{R^4-1} = 0,$ so this vanishes. For the small circle $\Gamma_3$ of radius $\epsilon$ we find $\lim_{\epsilon\rightarrow 0} 2\pi \epsilon \times \frac{\sqrt{\epsilon}(1+\epsilon)}{1-\epsilon^4} = 0,$ and this too vanishes.
The conclusion is that $$J = \frac{1}{2} \times 2\pi i \left(-\frac{1}{2} \frac{\exp(5\pi i/8)}{1-\exp(5\pi i/4)} -\frac{1}{2} \frac{\exp(3\pi i/8) }{1-\exp(3\pi i/4)}\right) \\ = -\frac{\pi i}{2} \left(\frac{1}{\exp(-5\pi i/8)-\exp(5\pi i/8)} + \frac{1}{\exp(-3\pi i/8)-\exp(3\pi i/8)}\right) \\ = \frac{\pi i}{4i} \left(\frac{2i}{-\exp(-5\pi i/8)+\exp(5\pi i/8)} + \frac{2i}{-\exp(-3\pi i/8)+\exp(3\pi i/8)}\right).$$
This at last yields the closed form
$$\bbox[5px,border:2px solid #00A000]{ \frac{\pi}{4} \frac{1}{\sin(3\pi/8)} + \frac{\pi}{4} \frac{1}{\sin(5\pi/8)}.}$$
This admits further simplification as the two arguments to the sine function are symmetric about $\pi/2$ so we get
$$\bbox[5px,border:2px solid #00A000]{ \frac{\pi}{2} \frac{1}{\sin(3\pi/8)}.}$$