<s>[INST] Evaluating $I_{\alpha}=\int_{0}^{\infty} \frac{\ln(1+x^2)}{x^\alpha}dx$ using complex analysis Again, improper integrals involving $\ln(1+x^2)$
I am trying to get a result for the integral $I_{\alpha}=\int_{0}^{\infty} \frac{\ln(1+x^2)}{x^\alpha}dx$ - asked above link- using some complex analysis, however, I couldn't find an appropriate solution. (Of course, for $\alpha \in (0,3)$ as stated above link (o.w. it is divergent))
Any ideas?
 [/INST] Let $\alpha = 1 + p$. Then we have
$$
\int_0^{\infty}\frac{\ln(1+x^2)}{x^{1+p}}dx
$$
where $0<p<2$. Let $u = \ln(1+x^2)$ and $dv = x^{-1-p}dx$. Then $du = \frac{2x}{1+x^2}$ and $v = \frac{-1}{px^p}$.
$$
uv\big|_0^{\infty}\to 0
$$
for $p\in(0,2)$.
$$
\int_0^{\infty}\frac{\ln(1+x^2)}{x^{1+p}}dx=\frac{2}{p}\int_0^{\infty}\frac{x^{1-p}}{x^2+1}dx
$$
Let $\beta -1 = 1-p$ so $p=2-\beta$. Let $x=t^2$ so $dx=2tdt$.
$$
\frac{4}{2-\beta}\int_0^{\infty}\frac{t^{2\beta - 1}}{t^4+1}dt
$$
The contour we desire is 

The integrals over the semicircles go to zero as $R\to\infty$ and $\delta\to 0$ so we have
\begin{align}
\frac{4}{2-\beta}\int_0^{\infty}\frac{t^{2\beta - 1}}{t^4+1}dt &=
\frac{4}{2-\beta}\int_{-\infty}^{\infty}\frac{z^{2\beta - 1}}{z^4+1}dz\\
&= \frac{4}{2-\beta}\int_0^{\infty}\frac{z^{2\beta - 1}+(-z)^{2\beta - 1}}{z^4+1}dz
\end{align}
Now, $(-z)^{2\beta} = -e^{2\pi i\beta}z^{2\beta}$.
$$
\frac{4}{2-\beta}\int_0^{\infty}\frac{z^{2\beta - 1}+(-z)^{2\beta - 1}}{z^4+1}dz
= \frac{4(1-e^{2\pi i\beta})}{2-\beta}\int_0^{\infty}\frac{z^{2\beta - 1}}{z^4+1}dz\tag{1}
$$
Then $(1)$ is equal to $2\pi i$ times sum of the residue is the upper half plane.
\begin{align}
\frac{8\pi i}{(1-e^{2\pi i\beta})(2-\beta)}\Bigl[\lim_{z\to e^{\frac{i \pi }{4}}}\frac{(z-e^{\frac{i \pi }{4}}) z^{2\beta -1}}{z^4+1}+\lim_{z\to e^{\frac{3i\pi}{4}}}\frac{(z-e^{\frac{3i\pi}{4}})z^{2\beta-1}}{z^4+1}\Bigr] &=
\frac{\pi\csc\bigl(\frac{\pi\beta}{2}\bigr)}{2-\beta}\\
&= \frac{\pi\csc\bigl(\frac{\pi p}{2}\bigr)}{p}\tag{2}\\
&= \frac{\pi\sec\bigl(\frac{\pi\alpha}{2}\bigr)}{1-\alpha}\tag{3}
\end{align}
Equations $(2)$ and $(3)$ occur by back substituting for $\beta$ and $p$.
</s>