Looking at the expansion:

Series[Erfi[x], {x, Infinity, 1}]

I obtain

-I+E^x^2 (1/(Sqrt[\[Pi]] x)+O[1/x]^2)

(note the imaginary argument in front). This looks wrong as I don't think there should be an imaginary number out front; I had thought that this was due to some branch cut about the positive x axis, but this doesn't look like the case. Looking at the output of Mupad (in Matlab), I obtain the correct expansion listed in the response here.

Is this a bug?

  • 1
    $\begingroup$ The basis of the expansion about infinity can be found here: mathworld.wolfram.com/Erfi.html $\endgroup$
    – ubpdqn
    Commented Jul 29, 2013 at 10:03
  • $\begingroup$ The basis of expansion can be found here doublemath $\endgroup$
    – Azhar Ali
    Commented Dec 25, 2021 at 7:23

1 Answer 1


The problem is subtle, and relies on the fact that Mathematica and Maple seem to define the erfi(z) function differently. Mathematica defines erfi(z) as

erfi(z) = -i erf(iz)

whereas Maple defines it according to


So I think what is happening is that Mathematica expands -i erf(iz). The expansion for erf(iz) is

1 + exp(z^2)/(sqrt(Pi)*z) + ...

so multiply by -i to obtain the strange answer in the original post. However, if you look at the integral definition, you see that the answer should be real if z is real. I believe Maple and Mupad are expanding the integral, and thus obtaining the 'correct' expansion at z real and infinity.

Mathematica is using an expansion for the erf(iz) function at z = infinity, and so making an expansion about the imaginary axis. Because of the way complex functions work, this may not be exactly the same thing.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.