Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Error function
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Properties== {{multiple image | header = Plots in the complex plane | direction = vertical | width = 250 | image1 = ComplexExp2.png | caption1 = Integrand {{math|exp(−''z''<sup>2</sup>)}} | image2 = ComplexErfz.png | caption2 = {{math|erf ''z''}} }} The property {{math|1=erf (−''z'') = −erf ''z''}} means that the error function is an [[even and odd functions|odd function]]. This directly results from the fact that the integrand {{math|''e''<sup>−''t''<sup>2</sup></sup>}} is an [[even function]] (the antiderivative of an even function which is zero at the origin is an odd function and vice versa). Since the error function is an [[entire function]] which takes real numbers to real numbers, for any [[complex number]] {{mvar|z}}: <math display="block">\operatorname{erf} \overline{z} = \overline{\operatorname{erf} z} </math> where <math>\overline{z} </math> denotes the [[complex conjugate]] of <math>z</math>. The integrand {{math|1=''f'' = exp(−''z''<sup>2</sup>)}} and {{math|1=''f'' = erf ''z''}} are shown in the complex {{mvar|z}}-plane in the figures at right with [[domain coloring]]. The error function at {{math|+∞}} is exactly 1 (see [[Gaussian integral]]). At the real axis, {{math|erf ''z''}} approaches unity at {{math|''z'' → +∞}} and −1 at {{math|''z'' → −∞}}. At the imaginary axis, it tends to {{math|±''i''∞}}. <!-- ; the relation {{math|1=erf(−''z'') = −erf ''z''}} holds.!--> ===Taylor series=== The error function is an [[entire function]]; it has no singularities (except that at infinity) and its [[Taylor expansion]] always converges. For {{math|''x'' >> 1}}, however, cancellation of leading terms makes the Taylor expansion unpractical. The defining integral cannot be evaluated in [[Closed-form expression|closed form]] in terms of [[Elementary function (differential algebra)|elementary functions]] (see [[Liouville's theorem (differential algebra)|Liouville's theorem]]), but by expanding the [[integrand]] {{math|''e''<sup>−''z''<sup>2</sup></sup>}} into its [[Maclaurin series]] and integrating term by term, one obtains the error function's Maclaurin series as: <math display="block">\begin{align} \operatorname{erf} z &= \frac{2}{\sqrt\pi}\sum_{n=0}^\infty\frac{(-1)^n z^{2n+1}}{n! (2n+1)} \\[6pt] &= \frac{2}{\sqrt\pi} \left(z-\frac{z^3}{3}+\frac{z^5}{10}-\frac{z^7}{42}+\frac{z^9}{216}-\cdots\right) \end{align}</math> which holds for every [[complex number]] {{mvar|z}}. The denominator terms are sequence [[oeis:A007680|A007680]] in the [[OEIS]]. For iterative calculation of the above series, the following alternative formulation may be useful: <math display="block">\begin{align} \operatorname{erf} z &= \frac{2}{\sqrt\pi}\sum_{n=0}^\infty\left(z \prod_{k=1}^n {\frac{-(2k-1) z^2}{k (2k+1)}}\right) \\[6pt] &= \frac{2}{\sqrt\pi} \sum_{n=0}^\infty \frac{z}{2n+1} \prod_{k=1}^n \frac{-z^2}{k} \end{align}</math> because {{math|{{sfrac|−(2''k'' − 1)''z''<sup>2</sup>|''k''(2''k'' + 1)}}}} expresses the multiplier to turn the {{mvar|k}}th term into the {{math|(''k'' + 1)}}th term (considering {{mvar|z}} as the first term). The imaginary error function has a very similar Maclaurin series, which is: <math display="block">\begin{align} \operatorname{erfi} z &= \frac{2}{\sqrt\pi}\sum_{n=0}^\infty\frac{z^{2n+1}}{n! (2n+1)} \\[6pt] &=\frac{2}{\sqrt\pi} \left(z+\frac{z^3}{3}+\frac{z^5}{10}+\frac{z^7}{42}+\frac{z^9}{216}+\cdots\right) \end{align}</math> which holds for every [[complex number]] {{mvar|z}}. ===Derivative and integral=== The derivative of the error function follows immediately from its definition: <math display="block">\frac{\mathrm d}{\mathrm dz}\operatorname{erf} z =\frac{2}{\sqrt\pi} e^{-z^2}.</math> From this, the derivative of the imaginary error function is also immediate: <math display="block">\frac{d}{dz}\operatorname{erfi} z =\frac{2}{\sqrt\pi} e^{z^2}.</math> An [[antiderivative]] of the error function, obtainable by [[integration by parts]], is <math display="block">z\operatorname{erf}z + \frac{e^{-z^2}}{\sqrt\pi}+C.</math> An antiderivative of the imaginary error function, also obtainable by integration by parts, is <math display="block">z\operatorname{erfi}z - \frac{e^{z^2}}{\sqrt\pi}+C.</math> Higher order derivatives are given by <math display="block">\operatorname{erf}^{(k)}z = \frac{2 (-1)^{k-1}}{\sqrt\pi} \mathit{H}_{k-1}(z) e^{-z^2} = \frac{2}{\sqrt\pi} \frac{\mathrm d^{k-1}}{\mathrm dz^{k-1}} \left(e^{-z^2}\right),\qquad k=1, 2, \dots</math> where {{mvar|H}} are the physicists' [[Hermite polynomials]].<ref>{{mathworld|title=Erf|urlname=Erf}}</ref> ===Bürmann series=== An expansion,<ref>{{cite journal|first1=H. M. |last1=Schöpf |first2=P. H. |last2=Supancic |title=On Bürmann's Theorem and Its Application to Problems of Linear and Nonlinear Heat Transfer and Diffusion |journal=The Mathematica Journal |year=2014 |volume=16 |doi=10.3888/tmj.16-11 |url=http://www.mathematica-journal.com/2014/11/on-burmanns-theorem-and-its-application-to-problems-of-linear-and-nonlinear-heat-transfer-and-diffusion/#more-39602/|doi-access=free }}</ref> which converges more rapidly for all real values of {{mvar|x}} than a Taylor expansion, is obtained by using [[Hans Heinrich Bürmann]]'s theorem:<ref>{{mathworld|urlname=BuermannsTheorem | title = Bürmann's Theorem }}</ref> <math display="block">\begin{align} \operatorname{erf} x &= \frac{2}{\sqrt\pi} \sgn x \cdot \sqrt{1-e^{-x^2}} \left( 1-\frac{1}{12} \left (1-e^{-x^2} \right ) -\frac{7}{480} \left (1-e^{-x^2} \right )^2 -\frac{5}{896} \left (1-e^{-x^2} \right )^3-\frac{787}{276 480} \left (1-e^{-x^2} \right )^4 - \cdots \right) \\[10pt] &= \frac{2}{\sqrt\pi} \sgn x \cdot \sqrt{1-e^{-x^2}} \left(\frac{\sqrt\pi}{2} + \sum_{k=1}^\infty c_k e^{-kx^2} \right). \end{align}</math> where {{math|sgn}} is the [[sign function]]. By keeping only the first two coefficients and choosing {{math|1=''c''<sub>1</sub> = {{sfrac|31|200}}}} and {{math|1=''c''<sub>2</sub> = −{{sfrac|341|8000}}}}, the resulting approximation shows its largest relative error at {{math|1=''x'' = ±1.40587}}, where it is less than 0.0034361: <math display="block">\operatorname{erf} x \approx \frac{2}{\sqrt\pi}\sgn x \cdot \sqrt{1-e^{-x^2}} \left(\frac{\sqrt{\pi}}{2} + \frac{31}{200}e^{-x^2}-\frac{341}{8000} e^{-2x^2}\right). </math> ===Inverse functions=== [[File:Mplwp erf inv.svg|thumb|300px|Inverse error function]] Given a complex number {{mvar|z}}, there is not a ''unique'' complex number {{mvar|w}} satisfying {{math|1=erf ''w'' = ''z''}}, so a true inverse function would be multivalued. However, for {{math|−1 < ''x'' < 1}}, there is a unique ''real'' number denoted {{math|erf<sup>−1</sup> ''x''}} satisfying <math display="block">\operatorname{erf}\left(\operatorname{erf}^{-1} x\right) = x.</math> The '''inverse error function''' is usually defined with domain {{open-open|−1,1}}, and it is restricted to this domain in many computer algebra systems. However, it can be extended to the disk {{math|{{abs|''z''}} < 1}} of the complex plane, using the Maclaurin series<ref>{{cite arXiv | last1 = Dominici | first1 = Diego | title = Asymptotic analysis of the derivatives of the inverse error function | eprint = math/0607230 | year = 2006}}</ref> <math display="block">\operatorname{erf}^{-1} z=\sum_{k=0}^\infty\frac{c_k}{2k+1}\left (\frac{\sqrt\pi}{2}z\right )^{2k+1},</math> where {{math|1=''c''<sub>0</sub> = 1}} and <math display="block">\begin{align} c_k & =\sum_{m=0}^{k-1}\frac{c_m c_{k-1-m}}{(m+1)(2m+1)} \\[1ex] &= \left\{1,1,\frac{7}{6},\frac{127}{90},\frac{4369}{2520},\frac{34807}{16200},\ldots\right\}. \end{align}</math> So we have the series expansion (common factors have been canceled from numerators and denominators): <math display="block">\operatorname{erf}^{-1} z = \frac{\sqrt{\pi}}{2} \left (z + \frac{\pi}{12}z^3 + \frac{7\pi^2}{480}z^5 + \frac{127\pi^3}{40320}z^7 + \frac{4369\pi^4}{5806080} z^9 + \frac{34807\pi^5}{182476800}z^{11} + \cdots\right ).</math> (After cancellation the numerator and denominator values in {{oeis|A092676}} and {{oeis|A092677}} respectively; without cancellation the numerator terms are values in {{oeis|A002067}}.) The error function's value at {{math|±∞}} is equal to {{math|±1}}. For {{math|{{abs|''z''}} < 1}}, we have {{math|1=erf(erf<sup>−1</sup> ''z'') = ''z''}}. The '''inverse complementary error function''' is defined as <math display="block">\operatorname{erfc}^{-1}(1-z) = \operatorname{erf}^{-1} z.</math> For real {{mvar|x}}, there is a unique ''real'' number {{math|erfi<sup>−1</sup> ''x''}} satisfying {{math|1=erfi(erfi<sup>−1</sup> ''x'') = ''x''}}. The '''inverse imaginary error function''' is defined as {{math|erfi<sup>−1</sup> ''x''}}.<ref>{{cite arXiv | last1 = Bergsma | first1 = Wicher | title = On a new correlation coefficient, its orthogonal decomposition and associated tests of independence | eprint = math/0604627 | year = 2006}}</ref> For any real ''x'', [[Newton's method]] can be used to compute {{math|erfi<sup>−1</sup> ''x''}}, and for {{math|−1 ≤ ''x'' ≤ 1}}, the following Maclaurin series converges: <math display="block">\operatorname{erfi}^{-1} z =\sum_{k=0}^\infty\frac{(-1)^k c_k}{2k+1} \left( \frac{\sqrt\pi}{2} z \right)^{2k+1},</math> where {{math|''c''<sub>''k''</sub>}} is defined as above. ===Asymptotic expansion=== A useful [[asymptotic expansion]] of the complementary error function (and therefore also of the error function) for large real {{mvar|x}} is <math display="block">\begin{align} \operatorname{erfc} x &= \frac{e^{-x^2}}{x\sqrt{\pi}}\left(1 + \sum_{n=1}^\infty (-1)^n \frac{1\cdot3\cdot5\cdots(2n - 1)}{\left(2x^2\right)^n}\right) \\[6pt] &= \frac{e^{-x^2}}{x\sqrt{\pi}}\sum_{n=0}^\infty (-1)^n \frac{(2n - 1)!!}{\left(2x^2\right)^n}, \end{align}</math> where {{math|(2''n'' − 1)!!}} is the [[double factorial]] of {{math|(2''n'' − 1)}}, which is the product of all odd numbers up to {{math|(2''n'' − 1)}}. This series diverges for every finite {{mvar|x}}, and its meaning as asymptotic expansion is that for any integer {{math|''N'' ≥ 1}} one has <math display="block">\operatorname{erfc} x = \frac{e^{-x^2}}{x\sqrt{\pi}}\sum_{n=0}^{N-1} (-1)^n \frac{(2n - 1)!!}{\left(2x^2\right)^n} + R_N(x)</math> where the remainder is <math display="block">R_N(x) := \frac{(-1)^N \, (2 N - 1)!!}{\sqrt{\pi} \cdot 2^{N - 1}} \int_x^\infty t^{-2N}e^{-t^2}\,\mathrm dt,</math> which follows easily by induction, writing <math display="block">e^{-t^2} = -\frac{1}{2 t} \, \frac{\mathrm{d}}{\mathrm{d}t} e^{-t^2}</math> and integrating by parts. The asymptotic behavior of the remainder term, in [[Landau notation]], is <math display="block">R_N(x) = O\left(x^{- (1 + 2N)} e^{-x^2}\right)</math> as {{math|''x'' → ∞}}. This can be found by <math display="block">R_N(x) \propto \int_x^\infty t^{-2N}e^{-t^2}\,\mathrm dt = e^{-x^2} \int_0^\infty (t+x)^{-2N}e^{-t^2-2tx}\,\mathrm dt\leq e^{-x^2} \int_0^\infty x^{-2N} e^{-2tx}\,\mathrm dt \propto x^{-(1+2N)}e^{-x^2}.</math> For large enough values of {{mvar|x}}, only the first few terms of this asymptotic expansion are needed to obtain a good approximation of {{math|erfc ''x''}} (while for not too large values of {{mvar|x}}, the above Taylor expansion at 0 provides a very fast convergence). ===Continued fraction expansion=== A [[continued fraction]] expansion of the complementary error function was found by [[Pierre-Simon Laplace|Laplace]]:<ref>[[Pierre-Simon Laplace]], [[Traité de mécanique céleste]], tome 4 (1805), livre X, page 255.</ref><ref>{{cite book| last1 = Cuyt | first1 = Annie A. M.|author1-link= Annie Cuyt | last2 = Petersen | first2 = Vigdis B. | last3 = Verdonk | first3 = Brigitte | last4 = Waadeland | first4 = Haakon | last5 = Jones | first5 = William B. | title = Handbook of Continued Fractions for Special Functions | publisher = Springer-Verlag | year = 2008 | isbn = 978-1-4020-6948-2 }}</ref> <math display="block">\operatorname{erfc} z = \frac{z}{\sqrt\pi}e^{-z^2} \cfrac{1}{z^2+ \cfrac{a_1}{1+\cfrac{a_2}{z^2+ \cfrac{a_3}{1+\dotsb}}}},\qquad a_m = \frac{m}{2}.</math> ===Factorial series=== The inverse [[factorial series]]: <math display="block">\begin{align} \operatorname{erfc} z &= \frac{e^{-z^2}}{\sqrt{\pi}\,z} \sum_{n=0}^\infty \frac{\left(-1\right)^n Q_n}{{\left(z^2+1\right)}^{\bar{n}}} \\[1ex] &= \frac{e^{-z^2}}{\sqrt{\pi}\,z} \left[1 -\frac{1}{2}\frac{1}{(z^2+1)} + \frac{1}{4}\frac{1}{\left(z^2+1\right) \left(z^2+2\right)} - \cdots \right] \end{align}</math> converges for {{math|Re(''z''<sup>2</sup>) > 0}}. Here <math display="block">\begin{align} Q_n &\overset{\text{def}}{{}={}} \frac{1}{\Gamma{\left(\frac{1}{2}\right)}} \int_0^\infty \tau(\tau-1)\cdots(\tau-n+1)\tau^{-\frac{1}{2}} e^{-\tau} \,d\tau \\[1ex] &= \sum_{k=0}^n \left(\frac{1}{2}\right)^{\bar{k}} s(n,k), \end{align}</math> {{math|''z''<sup>{{overline|''n''}}</sup>}} denotes the [[rising factorial]], and {{math|''s''(''n'',''k'')}} denotes a signed [[Stirling number of the first kind]].<ref>{{cite journal|last=Schlömilch|first=Oskar Xavier | author-link=Oscar Schlömilch|year=1859|title=Ueber facultätenreihen|url=https://archive.org/details/zeitschriftfrma09runggoog | journal=[[:de:Zeitschrift für Mathematik und Physik|Zeitschrift für Mathematik und Physik]] | language=de | volume=4 | pages=390–415}}</ref><ref>{{cite book | last=Nielson | first=Niels | url=https://archive.org/details/handbuchgamma00nielrich | title=Handbuch der Theorie der Gammafunktion | date=1906 | publisher=B. G. Teubner | location=Leipzig|language=de|access-date=2017-12-04|at=p. 283 Eq. 3}}</ref> There also exists a representation by an infinite sum containing the [[double factorial]]: <math display="block">\operatorname{erf} z = \frac{2}{\sqrt\pi} \sum_{n=0}^\infty \frac{(-2)^n(2n-1)!!}{(2n+1)!}z^{2n+1}</math>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Error function
(section)
Add topic