In order to evaluate its Fourier transform, I want to determine whether $f(x)=\arctan(\frac{1}{x})$ belongs in $L^1(\mathbb{R})$, $L^2(\mathbb{R})$ or both. Therefore, we have to check the continuity at $x=0$.
One solution I have seen is showing that $f\not\in L^1(\mathbb{R})$ because $\arctan(\frac{1}{x})$ is discontinuous at that point :
\begin{equation} \lim_{x\to0^-} \arctan(\frac{1}{x}) = \frac{-\pi}{2} \not = \frac{\pi}{2} = \lim_{x\to 0^+} \arctan(\frac{1}{x}) \end{equation}
However, I recall from my classes that
\begin{equation} f\in L^1(\mathbb{R}) \iff \int_{\mathbb{R}} |f(x)| dx \text{ exists and is finite} \end{equation}
Thus, my question is the following : Shouldn't we check the continuity of $|f|$ as opposed to $f$, i.e :
\begin{equation} \lim_{x\to0^-} |f(x)| = \lim_{x\to0^+} |f(x)| \end{equation}
since we're trying to determine the integrability of $|f|$ and not $f$ ? In this example, the result would differ, as $|\arctan(\frac{1}{x})|$ is continuous at $x=0$:
\begin{equation} \lim_{x\to0^-} |\arctan(\frac{1}{x})| = |\frac{-\pi}{2}| = \frac{\pi}{2} = |\frac{\pi}{2}| = \lim_{x\to 0^+} |\arctan(\frac{1}{x})| \end{equation}
Since $\{x=0\}$ is a null set, you don't really need the fact that $\arctan(\frac{1}{x})$ is continuous thanks to the properties of the integral.