Contradiction in two ways to derive Fourier transformation of error function

In the question, Fourier transformation of error function is derived as follows: $$\int_{-\infty}^\infty \operatorname{erf}(x)e^{-ixk}dx=\frac{2}{ik} \exp \left(\frac{-k^{2}}{4}\right).$$ However, in the paper, following equation holds for any $$a,b\in\mathbb{C}$$: $$\int \operatorname{erf}(a z) e^{b z} d z=\frac{1}{b} e^{b z} \operatorname{erf}(a z)-\frac{1}{b} \exp \left(\frac{b^{2}}{4 a^{2}}\right) \operatorname{erf}\left(a z-\frac{b}{2 a}\right).$$ According this formula, Fourier transformation of error function is not well-defined because $$\int_{-\infty}^\infty \operatorname{erf}(x)e^{-ixk}dx=-\frac{1}{ik} e^{-ik \infty}-\frac{1}{ik} e^{ik \infty}+\frac{2}{ik} \exp \left(\frac{-k^{2}}{4}\right).$$ Which part of the above discussion is wrong?

• The Fourier transform of $\operatorname{erf}x$ is not defined in the usual sense since the defining integral diverges. But it is well-defined in the distributional sense. Jan 24 '21 at 14:31

The first equation gives a correct formula for the Fourier transform of the error function. As metamorphy writes, the integral on the left hand side is not defined, but the Fourier transform in a distributional sense is defined and equals $$\frac{2}{i} \exp\left(-\frac{k^2}{4}\right) \operatorname{pv}\frac{1}{k}$$ where $$\operatorname{pv}\frac{1}{k}$$ is the principal value distribution.

The second equation gives a primitive function of the error function, but since the integral over all the reals is not defined, this formula cannot be used to determine the Fourier transform.