Fourier transform of $\operatorname{erfc}^2\left|x\right|$ Could you please help me to find the Fourier transform of
$$f(x)=\operatorname{erfc}^2\left|x\right|,$$
where $\operatorname{erfc}z$ denotes the the complementary error function.

We have

$$ \int_{-\infty}^{\infty} \operatorname{erfc}^{2}(|x|) e^{-i\xi x} \, dx = \frac{4}{\xi}e^{-\xi^{2}/4} \left\{ \operatorname{erfi}\left( \frac{\xi}{2} \right) - \operatorname{erfi}\left( \frac{\xi}{2\sqrt{2}} \right) \right\}, \tag{1} $$

where $\operatorname{erfi}$ is the imaginary error function defined by
$$\operatorname{erfi}(x) = \frac{2}{\sqrt{\pi}} \int_{0}^{x} e^{t^{2}} \, dt. $$
So here goes my solution. Notice that we can write
$$ \operatorname{erfc}(|t|) = \frac{2}{\sqrt{\pi}} \int_{1}^{\infty} \left| t \right| e^{-t^{2}x^{2}} \, dx. $$
Using this, we can write
\begin{align*}
\int_{-\infty}^{\infty} \operatorname{erfc}^{2}(|t|) e^{-i\xi t} \, dt
&= \frac{4}{\pi} \int_{-\infty}^{\infty} \int_{1}^{\infty} \int_{1}^{\infty} t^{2} e^{-(x^{2}+y^{2})t^{2}} e^{-i\xi t} \, dxdydt \\
{\scriptsize(\because \text{ Fubini})}
&= \frac{4}{\pi} \int_{1}^{\infty} \int_{1}^{\infty} \left( \int_{-\infty}^{\infty} t^{2} e^{-r^{2}t^{2}} e^{-i\xi t} \, dt \right) \, dxdy. \tag{2}
\end{align*}
Using some standard complex analysis technique, we can show that
$$ \int_{-\infty}^{\infty} t^{2} e^{-r^{2}t^{2}} e^{-i\xi t} \, dt = \frac{\sqrt{\pi}}{4} \frac{2r^{2} - \xi^{2}}{r^{5}} e^{-\xi^{2} / 4r^{2}}. \tag{3} $$
Indeed, we have
\begin{align*}
\int_{-\infty}^{\infty} t^{2} e^{-r^{2}t^{2}} e^{-i\xi t} \, dt
&= e^{-\xi^{2}/4r^{2}} \int_{-\infty}^{\infty} t^{2} \exp \left\{ - r^{2} \left( t + \frac{i\xi}{2r^{2}} \right)^{2} \right\} \, dt \\
{\scriptsize(\because \text{ contour shift})}
&= e^{-\xi^{2}/4r^{2}} \int_{-\infty}^{\infty} \left( t - \frac{i\xi}{2r^{2}} \right)^{2} e^{-r^{2}t^{2}} \, dt \\
&= e^{-\xi^{2}/4r^{2}} \int_{0}^{\infty} \frac{4r^{4}t^{2} - \xi^{2}}{2r^{4}} e^{-r^{2}t^{2}} \, dt,
\end{align*}
which immediately yields $\text{(3)}$ by exploiting the gamma function. Plugging $\text{(3)}$ back to our calculation $\text{(2)}$, we get
\begin{align*}
\int_{-\infty}^{\infty} \operatorname{erfc}^{2}(|t|) e^{-i\xi t} \, dt
&= \frac{1}{\sqrt{\pi}} \int_{1}^{\infty} \int_{1}^{\infty} \frac{2r^{2} - \xi^{2}}{r^{5}} e^{-\xi^{2} / 4r^{2}} \, dxdy \\
{\scriptsize(\because \text{ symmetry})}
&= \frac{2}{\sqrt{\pi}} \iint_{1\leq y\leq x} \frac{2r^{2} - \xi^{2}}{r^{5}} e^{-\xi^{2} / 4r^{2}} \, dxdy \\
{\scriptsize(\because \text{ polar coordinate})}
&= \frac{2}{\sqrt{\pi}} \int_{0}^{\frac{\pi}{4}} \int_{\csc\theta}^{\infty} \frac{2r^{2} - \xi^{2}}{r^{4}} e^{-\xi^{2} / 4r^{2}} \, drd\theta.
\end{align*}
Using the substitution $u = \xi / 2r$, we get
\begin{align*}
\int_{-\infty}^{\infty} \operatorname{erfc}^{2}(|t|) e^{-i\xi t} \, dt
&= \frac{8}{\xi\sqrt{\pi}} \int_{0}^{\frac{\pi}{4}} \int_{0}^{\frac{\xi}{2}\sin\theta} (1 - 2u^{2}) e^{-u^{2}} \, dud\theta \\
&= \frac{8}{\xi\sqrt{\pi}} \int_{0}^{\frac{\pi}{4}} \left[ u e^{-u^{2}} \right]_{0}^{\frac{\xi}{2}\sin\theta} \, d\theta \\
&= \frac{4}{\sqrt{\pi}} \int_{0}^{\frac{\pi}{4}} \sin \theta \exp\left( -\frac{\xi^{2}}{4} \sin^{2}\theta \right) \, d\theta.
\end{align*}
Finally, using the substitution $v = \frac{1}{2}\xi \cos\theta$, we get
\begin{align*}
\int_{-\infty}^{\infty} \operatorname{erfc}^{2}(|t|) e^{-i\xi t} \, dt
&= \frac{8}{\xi \sqrt{\pi}} e^{-\frac{1}{4}\xi^{2}} \int_{\xi/2\sqrt{2}}^{\xi/2} e^{v^{2}} \, dv
 = \frac{4}{\xi} e^{-\frac{1}{4}\xi^{2}} \left[ \operatorname{erfi}(v) \right]_{\xi/2\sqrt{2}}^{\xi/2}.
\end{align*}
This proves $\text{(1)}$ as desired.
