Evaluate $\int_0^\infty\frac{\cos(x+\ln{x})}{x^2+1}dx$ and $\int_0^\infty\frac{\sin(x+\ln{x})}{x^2+1}dx$

calculuscomplex-analysisdefinite integralsimproper-integrals

I recently ran across the following integrals
$$I=\int_0^\infty\frac{\cos(x+\ln{x})}{x^2+1}dx$$ $$J=\int_0^\infty\frac{\sin(x+\ln{x})}{x^2+1}dx$$
They both converge according to WolframAlpha. I am curious whether there is a closed form. I tried combining these integrals while using Euler’s identity.
$$I+Ji=\int_0^\infty\frac{e^{i(x+\ln{x})}}{x^2+1}dx=\int_0^\infty\frac{x^ie^{ix}}{x^2+1}$$
I wanted to use contour integration at this step, but I didn’t know how to deal with $x^i$ since it is a multi-valued function. I don't know what type of branch cut that would require. For instance, $i^i$ is equivalent to $e^\frac{\pi}{2}$, $e^\frac{3\pi}{2}$, $e^\frac{5\pi}{2}$, and so on.

I am willing to accept any type of answer, complex analysis or not.

ADDENDUM

I think the best way to go about this is to evaluate the following considering only real values for $a$
$$I(a)=\int_0^\infty\frac{x^ne^{ix}}{x^2+1}dx$$$$I=\Re[I(i)]$$$$J=\Im[I(i)]$$
I tried integrating $$f(z)=\frac{z^ae^{iz}}{z^2+1}$$ along a semicircle contour in the upper half with a dent around zero. I managed to find the following:
$$\int_0^\infty\frac{z^a}{z^2+1}(e^{iz}+e^{a\pi i}e^{-iz})dz=\frac{\pi}{e}e^{a\pi i/2}$$
I assumed $a$ was real in my calculation, but if we plug in $i$
$$\int_0^\infty\frac{z^ie^{iz}}{z^2+1}+e^{-\pi}\int_0^\infty\frac{z^{i}e^{-iz}}{z^2+1}dz=\pi*e^{-\pi/2-1}$$
Just like in the comments. I don't know how to use this

Best Answer

Using a CAS, I did not get any result for $I$ or $J$ but the surprise came when I tried to compute $(I+iJ)$. The produced result is

$$I+i J=\frac{\text{csch}\left(\frac{\pi }{2}\right)-\text{sech}\left(\frac{\pi }{2}\right)}{4 e}\, K$$

$$K=e^{\pi } \pi -e \left(e \pi +2 i \sinh (\pi )\, \Gamma (-1+i) \,\, _1F_2\left(1;\frac{2-i}{2},\frac{3-i}{2};\frac{1}{4}\right)\right)$$

So, $$\Re(K)=\left(e^{\pi }-e^2\right) \pi-2e \sinh(\pi)\,\Re\Bigg[i \Gamma (-1+i) \, _1F_2\left(1;\frac{2-i}{2},\frac{3-i}{2};\frac{1}{4}\right) \Bigg]$$ $$\Im(K)=-2e \sinh(\pi)\,\Re\Bigg[i \Gamma (-1+i) \, _1F_2\left(1;\frac{2-i}{2},\frac{3-i}{2};\frac{1}{4}\right) \Bigg]$$

$$I=\int_0^\infty\frac{\cos(x+\ln{x})}{x^2+1}dx=\frac{\text{csch}\left(\frac{\pi }{2}\right)-\text{sech}\left(\frac{\pi }{2}\right)}{4 e}\,\Re(K)$$ $$J=\int_0^\infty\frac{\sin(x+\ln{x})}{x^2+1}dx=\frac{\text{csch}\left(\frac{\pi }{2}\right)-\text{sech}\left(\frac{\pi }{2}\right)}{4 e}\,\Im(K)$$