# Fourier transform of DawsonF not recovered by using Erfi

Bug introduced in 8 or earlier and fixed in 12.2

I wish to compute the Fourier transform related to the Dawson function:

FourierTransform[1/u DawsonF[1/u], u, x]


This gives Hypergeometric functions.

(1/2 \[Pi]^(3/2)
HypergeometricPFQ[{}, {1/2, 1}, x^2/4] - \[Pi] Abs[
x] HypergeometricPFQ[{}, {3/2, 3/2}, x^2/4])/Sqrt[2 \[Pi]]


However, the Dawson integral can also be written using Erfi:

$$D(x) = \frac{\sqrt{\pi}}{2}e^{-x^2}Erfi(x)$$

So the same solution should be obtained using

FourierTransform[1/u Sqrt[Pi]/2 Exp[-1/u^2] Erfi[1/u], u, x]


This gives a MeijerG function, which has the same real part, but an additional imaginary part.

MeijerG[{{1/2}, {}}, {{0, 1/2, 1/2}, {0}}, -(x^2/4)]/(2 Sqrt[2 \[Pi]])


So am I missing something or is this a bug? And which of the two is correct, if any?

Update: So this was a bug, but it is fixed now in version 12.2

• It's not a bug. Both results are correct. May 18, 2021 at 18:32

Clear["Global*"]

ft1 = FourierTransform[1/u DawsonF[1/u], u, x]

(* (1/Sqrt[2 π])(1/2 π^(3/2)
HypergeometricPFQ[{}, {1/2, 1}, x^2/4] - π Abs[
x] HypergeometricPFQ[{}, {3/2, 3/2}, x^2/4]) *)

ft2 = FourierTransform[FunctionExpand[1/u DawsonF[1/u]], u, x]

(* (1/(4 Sqrt[
2 π]))(MeijerG[{{1/2}, {}}, {{0, 1/2, 1/2}, {0}}, -((I x)/2), 1/2] +
MeijerG[{{1/2}, {}}, {{0, 1/2, 1/2}, {0}}, (I x)/2, 1/2]) *)

{ft1, ft2} /. x -> 1.050

(* {0.2941039674327754399621322037300034824681806340199,
0.2941039674327754399621322037300034824681806340199 + 0.*10^-50 I} *)


The negligible imaginary part of ft2 is an artifact of using finite precision.

Graphically,

Plot[{ft1, ft2}, {x, -5, 5},
PlotStyle -> {Automatic, Dashed}]


• Hmm, then this is a bug, I copy pasted your exact code and I get a considerable imaginary part:{0.2941039674327754399621322037300034824681806340199, 0.2941039674327754399621322037300034824681806340199 - 0.4984547807213288898936289331650438998049671460906 I}, for the final result. Which version of Mathematica is that? I am using 12.1.0.0. May 18, 2021 at 20:26
• Must be version specific. I am using 12.2.0 for Mac OS X x86 (64-bit) (December 12, 2020) May 18, 2021 at 20:28
• I guess this was an old bug (in my Mathematica 8.0.4 I see exactly the same result as of Mike Jordan who uses 12.1.0), and this bug has been fixed at last, in 12.2.0 (as reported by Bob Hanlon). May 19, 2021 at 11:33