Complex Error Function
Contents |
that occurs in probability, statistics, and partial differential equations describing diffusion. It is defined as:[1][2] erf ( x ) = 1 π ∫ − x x e − t 2 d t = 2 π ∫ 0 x e − t 2 d t . complex error function matlab {\displaystyle {\begin − 5\operatorname − 4 (x)&={\frac − 3{\sqrt {\pi }}}\int _{-x}^ − 2e^{-t^ − 1}\,\mathrm
Complex Gamma Function
− 0 t\\&={\frac 9{\sqrt {\pi }}}\int _ 8^ 7e^{-t^ 6}\,\mathrm 5 t.\end 4}} The complementary error function, denoted complex normal distribution erfc, is defined as erfc ( x ) = 1 − erf ( x ) = 2 π ∫ x ∞ e − t 2 d t = e − x 2 erfcx ( x ) ,
Complex Gaussian
{\displaystyle {\begin 1\operatorname 0 (x)&=1-\operatorname Φ 9 (x)\\&={\frac Φ 8{\sqrt {\pi }}}\int _ Φ 7^{\infty }e^{-t^ Φ 6}\,\mathrm Φ 5 t\\&=e^{-x^ Φ 4}\operatorname Φ 3 (x),\end Φ 2}} which also defines erfcx, the scaled complementary error function[3] (which can be used instead of erfc to avoid arithmetic underflow[3][4]). Another form of erfc ( x ) {\displaystyle \operatorname 1 (x)} for non-negative x {\displaystyle x} is known as Craig's formula:[5] erfc ( x | x ≥ 0 error function values ) = 2 π ∫ 0 π / 2 exp ( − x 2 sin 2 θ ) d θ . {\displaystyle \operatorname Φ 9 (x|x\geq 0)={\frac Φ 8{\pi }}\int _ Φ 7^{\pi /2}\exp \left(-{\frac Φ 6}{\sin ^ Φ 5\theta }}\right)d\theta \,.} The imaginary error function, denoted erfi, is defined as erfi ( x ) = − i erf ( i x ) = 2 π ∫ 0 x e t 2 d t = 2 π e x 2 D ( x ) , {\displaystyle {\begin − 9\operatorname − 8 (x)&=-i\operatorname − 7 (ix)\\&={\frac − 6{\sqrt {\pi }}}\int _ − 5^ − 4e^ − 3}\,\mathrm − 2 t\\&={\frac − 1{\sqrt {\pi }}}e^ − 0}D(x),\end − 9}} where D(x) is the Dawson function (which can be used instead of erfi to avoid arithmetic overflow[3]). Despite the name "imaginary error function", erfi ( x ) {\displaystyle \operatorname 7 (x)} is real when x is real. When the error function is evaluated for arbitrary complex arguments z, the resulting complex error function is usually discussed in scaled form as the Faddeeva function: w ( z ) = e − z 2 erfc ( − i z ) = erfcx ( − i z ) . {\displaystyle w(z)=e^{-z^ 5}\operatorname 4 (-iz)=\operatorname 3 (-iz).} Contents 1 The name "error function" 2 Properties 2.1 Taylor series 2.2 Derivative and integral 2.3 Bürmann ser
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of
Faddeeva Function
this site About Us Learn more about Stack Overflow the company Business Learn
Imaginary Error Function
more about hiring developers or posting ads with us Mathematics Questions Tags Users Badges Unanswered Ask Question _ complex error function c++ Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute: Sign up Here's https://en.wikipedia.org/wiki/Error_function how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top erf(a+ib) error function separate into real and imaginary part up vote 5 down vote favorite 3 Is there an easy way to separate erf(a+ib) into real and imaginary part? calculus integration complex-analysis contour-integration share|cite|improve this question edited Mar 14 '14 at http://math.stackexchange.com/questions/712434/erfaib-error-function-separate-into-real-and-imaginary-part 22:49 Ron Gordon 109k12130221 asked Mar 14 '14 at 19:04 Sleepyhead 1385 add a comment| 3 Answers 3 active oldest votes up vote 6 down vote I'm not sure if you are interested in an analytical answer or a computational answer; these are two different things. The analytical answer is...not really, unless you consider GEdgar's answer useful. (And one might.) The computational answer is a resounding yes. A result found in Abramowitz & Stegun claims the following: $$\operatorname*{erf}(x+i y) = \operatorname*{erf}{x} + \frac{e^{-x^2}}{2 \pi x} [(1-\cos{2 x y})+i \sin{2 x y}]\\ + \frac{2}{\pi} e^{-x^2} \sum_{k=1}^{\infty} \frac{e^{-k^2/4}}{k^2+4 x^2}[f_k(x,y)+i g_k(x,y)] + \epsilon(x,y) $$ where $$f_k(x,y) = 2 x (1-\cos{2 x y} \cosh{ k y}) + k\sin{2 x y} \sinh{k y}$$ $$g_k(x,y) = 2 x \sin{2 x y} \cosh{k y} + k\cos{2 x y} \sinh{k y}$$ Then $$\left |\epsilon(x,y) \right | \le 10^{-16} |\operatorname*{erf}{(x+i y)}| $$ This accuracy is valid for all $x$ and $y$, i.e., the complex plane. I will present a derivation of this result to show you where the error term comes from. Consider the definition of the error function in the complex plane: $$\operatorname*{erf}{
toolboxes, and other File Exchange content using Add-On Explorer in MATLAB. » Watch video Highlights from Faddeeva Package: complex error functions Faddeeva_build.m Faddeeva_Dawson.m Faddeeva_erf.m Faddeeva_erfc.m Faddeeva_erfcx.m Faddeeva_erfi.m Faddeeva_w.m View all files Join the 15-year https://www.mathworks.com/matlabcentral/fileexchange/38787-faddeeva-package--complex-error-functions community celebration. Play games and win prizes! » Learn more 4.75 4.8 | 4 ratings Rate this file 28 Downloads (last 30 days) File Size: 50.1 KB File ID: #38787 Version: 1.5 Faddeeva Package: complex error functions by Steven G. Johnson Steven G. Johnson (view profile) 1 file 28 downloads 4.75 26 Oct 2012 (Updated 17 Dec 2012) C++ MEX plugins to compute error error function functions (erf, erfc, erfi, erfcx, Faddeeva, ...) of complex args | Watch this File File Information Description C++ source code for compiled plugins (MEX files) to compute various error functions for complex arguments: ** Faddeeva_erf(z) -- the error function ** Faddeeva_erfc(z) = 1 - erf(z) -- complementary error function ** Faddeeva_erfi(z) = -i erf(iz) -- imaginary error function ** Faddeeva_erfcx(z) = exp(z^2) erfc(z) -- scaled complementary complex error function error function ** Faddeeva_w(z) = exp(-z^2) erfc(-iz) -- Faddeeva function ** Faddeeva_Dawson(z) = 0.5 sqrt(pi) exp(-z^2) erfi(z) -- Dawson function From e.g. the Faddeeva function, one can also obtain the Voigt functions and other related functions. Assuming you have a C++ compiler (and have configured it in MATLAB with mex -setup), compile by running the included Faddeeva_build.m script in MATLAB: Faddeeva_build All of the functions have usage of the form: w = Faddeeva_w(z) or optionally Faddeeva_w(z, relerr), where relerr is a desired relative error (default: machine precision). z may be an array or matrix of complex or real numbers. This code may also be downloaded from http://ab-initio.mit.edu/Faddeeva along with documentation and other versions. As described in the source code, this implementation uses a combination of algorithms for the Faddeeva function: a continued-fraction expansion for large |z| [similar to G. P. M. Poppe and C. M. J. Wijers, "More efficient computation of the complex error function," ACM Trans. Math. Soft. 16 (1), pp. 38–46 (1990)], and a completely different algorithm for smaller |z| [Mofreh R. Zaghloul and Ahmed N. Ali, "Algorithm 916: Computing the Faddeyeva and Voigt Functions," ACM Trans. Math. Soft. 38 (2), 15 (201