TITLE: How to calculate $ \int_{0}^{\infty} \frac{ x^2 \log(x) }{1 + x^4} $?
QUESTION [13 upvotes]: I would like to calculate $$\int_{0}^{\infty} \frac{ x^2 \log(x) }{1 + x^4}$$ by means of the Residue Theorem. This is what I tried so far: We can define a path $\alpha$ that consists of half a half-circle part ($\alpha_r$) and a path connecting the first and last point of that half circle (with radius $r$) so that we have $$ \int_{-r}^{r} f(x) dx + \int_{\alpha_r} f(z) dz = \int_{\alpha} f(z) dz = 2 \pi i \sum_{v = 1}^{k} \text{Res}(f;a_v) $$ where $a_v$ are zeros of the function $\frac{x^2 \log(x) }{1+x^4}$. 
If we know $$\lim_{r \to \infty} \int_{\alpha_r} f(z) dz = 0 \tag{*} $$ then we know that $$\lim_{r \to \infty} \int_{-r}^{r} f(x) dx = \int_{-\infty}^{\infty} f(x) dx = 2 \pi i \sum_{v=1}^{k} \text{Res}(f;a_v) $$ and it becomes 'easy'. 
Q: How do we know (*) is true?

REPLY [3 votes]: We can use Integration under Differentiation to solve/generalize this problem instead of residues or special functions. It is much easier. Let
$$ J_n(a)=\int_0^\infty \frac{x^a}{1+x^n}dx. $$
Clearly
$$ J_n'(a)=\int_0^\infty \frac{x^2\ln x}{1+x^n}dx. $$
Note $J_4'(0)=I$. First we calculate
\begin{eqnarray}
J_n(a)&=&\int_0^1\frac{x^a+x^{n-a-2}}{1+x^n}dx\\
&=&\int_0^1\sum_{k=0}^\infty(-1)^n(x^a+x^{n-a-2})x^{kn}dx\\
&=&\sum_{k=0}^\infty(-1)^k\left(\frac{1}{nk+a+1}+\frac{1}{nk+n-a-1}\right)\\
&=&\sum_{k=0}^\infty(-1)^k\frac{1}{nk+a+1}\\
&=&\sum_{k=-\infty}^\infty(-1)^k\frac{1}{nk+a+1}\\
&=&\frac{\pi}{n\sin(\frac{a+1}{n}\pi)}.
\end{eqnarray}
So
$$ J_n'(a)=-\frac{\pi^2\cos(\frac{(a+1)\pi}{n})}{n^2\sin^2(\frac{(a+1)\pi}{n})} $$
and hence
$$ I=J_4'(2)=\frac{\pi^2}{8\sqrt2}. $$
Here we used the following result
$$ \sum_{k=-\infty}^\infty(-1)^k\frac{1}{ak+b}=\frac{\pi}{a\sin(\frac{b}{a}\pi)}.$$