Fourier cosine transform of $\arctan(1/x)/x$ Consider
$$
\int_{-\infty}^{\infty}\cos(\omega x)\frac{\arctan\left(\frac{1}{x}\right)}{x} dx, \quad \text{for } \omega > 0,
$$
although for $\omega \in \mathbb{C}$ would be interesting. What is the above cosine transform? Does it exist?

My attempt so far: for $x \in \mathbb{R}$ we know that
$$
\arctan(x) + \arctan(1/x) = \text{sign}(x)\pi/2,
$$
and we know that
$$
\int_{-\infty}^{\infty}\cos(\omega x)\frac{\arctan(x)}{x} dx = \pi \Gamma(0,|\omega|),
$$
where $\Gamma$ is the upper incomplete Gamma function. Using this, then
$$
\begin{align}
\int_{-\infty}^{\infty}\cos(\omega x)\frac{\arctan\left(\frac{1}{x}\right)}{x} dx 
&= \int_{0}^{\infty}\cos(\omega x)\frac{\arctan\left(\frac{1}{x}\right)}{x} dx + \int_{-\infty}^{0}\cos(\omega x)\frac{\arctan\left(\frac{1}{x}\right)}{x} dx \\
&= -\int_{-\infty}^{\infty}\cos(\omega x)\frac{\arctan\left(x\right)}{x} dx -\frac{\pi}{2}\int_{-\infty}^{0}\cos(\omega x)\frac{1}{x} dx + \frac{\pi}{2}\int_{0}^{\infty}\cos(\omega x)\frac{1}{x} dx \\
&= -\pi\Gamma(0,|\omega|) - \pi\int_{0}^{\infty}\cos(\omega x)\frac{1}{x} dx.
\end{align}
$$
But the integral on the right does not make sense. I assume this is not the correct approach.
 A: If I am not running completely nuts, we can attack this via fantasy and brute force. First of all notice that the integral is even, hence we can write it as
$$2\int_0^{+\infty} \cos(\omega x) \dfrac{\arctan(1/x)}{x}\ \text{d}x$$
Now we call this integral $F(\omega, x)$.
Let's now differentiate wrt $\omega$:
$$\dfrac{\partial F}{\partial\omega} = -2\int_0^{+\infty} \sin(\omega x) \arctan\left(\dfrac{1}{x}\right)\ \text{d}x$$
This integral can be computed (there are lots of ways to do this, also it is absolutely convergent), and we have:
$$\dfrac{\partial F}{\partial \omega} = -2\left(\frac{\pi  e^{-\frac{\omega}{2}} \sinh \left(\frac{\omega}{2}\right)}{\omega}\right)$$
This result holds iff $\omega > 0$ if $\omega\in\mathbb{R}$, or as I wrote in the comment, for $\Im(\omega)\leq 0$ but we can manage to extend it for every $\omega \in \mathbb{C}$.
If you master a bit of elementary calculus techniques, you can easily find that
$$\left(\frac{\pi  e^{-\frac{\omega}{2}} \sinh \left(\frac{\omega}{2}\right)}{\omega}\right) = \frac{\pi -\pi  e^{-\omega}}{2 \omega}$$
To get $F(\omega)$ we now integrate this with respect to $\omega$:
$$F(\omega) = -2\int \frac{\pi -\pi  e^{-\omega}}{2 \omega}\ \text{d}\omega$$
The integration is rather easy, and it does make a Special Function to pop out: the Exponential Integral Special Function:
$$-2\int \frac{\pi -\pi  e^{-\omega}}{2 \omega} = -\pi  (\log (\omega)-\text{Ei}(-\omega))$$
You can find more on the Exponential Integral here: https://en.wikipedia.org/wiki/Exponential_integral
P.s. In a more rigorous way, we should attack the first part with the principal value method, just to be sure. But eventually it leads to the same result.
A: I fact the initial integral $g(\omega)=\frac{1}{2}\int_{-\infty}^{\infty}\cos(\omega x)\frac{\arctan\left(\frac{1}{x}\right)}{x} dx=\int_{0}^{\infty}\cos(\omega x)\frac{\arctan\left(\frac{1}{x}\right)}{x} dx$ diverges at a point $х=0$ logarithmically - even in a principal value sense.
Indeed, the integrand is even, and at $x\to0$ behaves as $\sim 1*\frac{\pi}{2}*\frac{1}{x}$. To investigate the integral in more details let's make a regularisation at $x\to0$, for example by adding the second term.
Let's consider $$f(\omega) =g(\omega)-\frac{\pi}{2}\int_{0}^{\infty}\cos(\omega x)\frac{\exp(-ax)}{x} dx$$ This integrand does not have a singularity at $x=0$ and, as soon as $a\to{\infty}$ $f(\omega)\to{g(\omega)}$.
Differentiating by $\omega$  we get:
$\frac{df}{d\omega}=-\int_{0}^{\infty}\sin(\omega x)\arctan(\frac{1}{x}) dx+\frac{\pi}{2}\int_{0}^{\infty}\cos(\omega x)\exp(-ax) dx$.$$\frac{df}{d\omega}=\frac{\pi}{2}\left(\frac{\exp(-\omega)-1}{\omega}+\frac{\omega}{a^2+\omega^2}\right)$$
$f(\omega=0)=\frac{\pi}{2}\int_{0}^{\infty}\frac{\arctan(\frac{1}{x})}{x}dx-\frac{\pi}{2}\int_{0}^{\infty}\frac{\exp(-ax)}{x}dx$.
Integrating by parts we get: $f(0)=\int_{0}^{\infty}\frac{\log(x)}{1+x^2}dx-\frac{\pi}{2}a\int_{0}^{\infty}\log(x)\exp(-ax)dx=\frac{\pi}{2}\log(a)-\frac{\pi}{2}\int_{0}^{\infty}\log(x)\exp(-x)dx$
$$f(0)=\frac{\pi}{2}\log(a)+\frac{\pi}{2}\gamma$$ where  $\gamma=-\int_{0}^{\infty}\log(x)\exp(-x)dx$ - Euler constant.
$f(\omega)=f(0)+\int_{0}^{\omega}\frac{df}{dx}dx=\frac{\pi}{2}\log(a)+\frac{\pi}{2}\gamma+\frac{\pi}{2}\int_{0}^{\omega}\left(\frac{\exp(-x)-1}{x}+\frac{x}{a^2+x^2}\right)dx$.
Finally we get:
$$f(\omega)=\frac{\pi}{2}\left(\log(\omega)(\exp(-\omega)-1)+\frac{1}{2}\log(a^2+\omega^2)-\int_{\omega}^{\infty}\log(x)\exp(-x)dx\right)$$

*

*$a\to{\infty}$ (we get the initial integral without regularisation):
$$f(\omega)\to{g(\omega)}\to\frac{\pi}{2}\log(a)\to\infty$$ as expected


*$\omega\to{\infty}$ and $ (a\lt{\infty})$ $$f(\omega)\to-\frac{\pi}{2}\frac{\exp(-\omega)}{\omega}\to{0}$$
A: The function $f(x)=\frac{\arctan(1/x)}{x}$ is not locally integrable and is, therefore, not a tempered distribution.  We can define, however, a distribution that permits our defining the Fourier Transform.
We define the distribution $\psi(x)$ such that for any $\phi\in \mathbb{S}$ (i.e., $\phi$ is a Schwarz Space function)
$$\langle \psi, \phi\rangle = \int_{|x|\le 1}\left(\phi(x)-\phi(0)\right)\frac{\arctan(1/x)}{x}\,dx+\int_{|x|\ge 1}\phi(x)\frac{\arctan(1/x)}{x}\,dx\tag1$$
Equipped with the distribution defined in $(1)$, we proceed to determine the Fourier Transform of $\psi(x)$.

Applying $(1)$, we see that the Fourier transform, $\mathscr{F}\{\psi\}$ is defined as
$$\begin{align}
\langle \mathscr{F}\{\psi\},\phi\rangle &=\langle \psi,\mathscr{F}\{\phi\}\rangle\\\\
&=\int_{-\infty}^\infty \frac{\arctan(1/x)}{x}\int_{-\infty}^\infty \phi(k)\left(e^{ikx}-\xi_{[-1,1]}(x)\right)\,dk\,dx\\\\
&=\int_{-\infty}^\infty \phi(k)\int_{-\infty}^\infty \arctan(1/x)\frac{e^{ikx}-\xi_{[-1,1]}(x)}{x}\,dx\,dk\\\\
&=\int_{-\infty}^\infty \phi(k)\int_{-\infty}^\infty \arctan(1/x)\frac{\cos(kx)-\xi_{[-1,1]}(x)}{x}\,dx\,dk\\\\
&=2\int_{-\infty}^\infty \phi(k)\int_0^\infty (\pi/2-\arctan(x))\frac{\cos(kx)-\xi_{[-1,1]}(x)}{x}\,dx\,dk\\\\
&=\pi \int_{-\infty}^\infty \phi(k) \int_0^\infty \frac{\cos(|k|x)-\xi_{[0,1]}(x)}{x}\,dx\,dk\\\\
&-2\int_{-\infty}^\infty \phi(k) \int_0^\infty \arctan(x) \frac{\cos(|k|x)-\xi_{[0,1]}(x)}{x}\,dx\,dk\\\\
&=-\pi  \int_{-\infty}^\infty \phi(k) (\gamma +\log(|k|))\,dk\\\\
&-2\int_{-\infty}^\infty \phi(k) \int_0^\infty \arctan(x) \frac{\cos(|k|x)}{x}\,dx\,dk\\\\
&+2\int_{-\infty}^\infty \phi(k) \int_0^1 \frac{\arctan(x)}{x}\,dx\,dk\\\\
&=-\pi  \int_{-\infty}^\infty \phi(k) (\gamma +\log(|k|))\,dk\\\\
&-\pi \int_{-\infty}^\infty \phi(k) \Gamma(0,|k|)\,dk\\\\
&+2G\int_{-\infty}^\infty \phi(k)\,dk
\end{align}$$
where $G$ is Catalan's Constant, from which we conclude that in distribution,
$$\bbox[5px,border:2px solid #C0A000]{\mathscr{F}\{\psi\}(k)=2G-\pi (\Gamma(0,|k|)+\gamma+\log(|k|))}$$
