MATLAB: Does Maple return terms with a function “erfi” that cannot be understood by Symbolic Math Toolbox or MATLAB

erfifunctionimaginaryinversemaplesymbolicSymbolic Math Toolbox

I perform a symbolic calculation in MATLAB and Maple's symbolic engine returns the term erfi(x). I would like to know what this function is and why MATLAB cannot interpret it. How do I continue with my symbolic calculations?

Best Answer

The term erfi(x) is Maple's representation of the imaginary error function. There is no exact equivalent symbolic function in Symbolic Math Toolbox (the closest is the MATLAB function ERF in MATLAB).
To work with such expressions, convert the term erfi into terms that MATLAB can understand. From the Maple help this function is defined as,
erfi(x) = 2/sqrt(pi) * int(exp(t^2), t=0..x)
You can use the following expression to convert this into a MATLAB symbolic expression
syms x t
myErfi=2/sqrt(pi) * int(exp(t^2),0,x)
Additional help for Maple can be found by typing
mhelp erfi
Note that Symbolic Math Toolbox uses MuPAD as its symbolic engine as of Symbolic Math Toolbox 5.1 (R2008b). Therefore, the MHELP function will not work if MuPAD is the active symbolic engine.