6
$\begingroup$

I am working on a question that involves finding the Taylor expansion of the error function. The question is stated as follows

The error function is defined by $\mathrm{erf}(x):=\frac {2}{\sqrt{\pi}} \int_{0}^{x} e^{-t^{2}}dt$. Find its Taylor expansion.

I know that the Taylor series of the function $f$ at $a$ is given by

$$f(x)=\sum_{n=0}^{\infty}\frac {f^{(n)}(a)}{n!}(x-a)^{n}.$$

However, the question doesn't give a point $a$ with which to center the Taylor series. How should I interpret this? May I use a Maclaurin series, with $a=0$? This appears to be what was done on the Wikipedia page here: http://en.wikipedia.org/wiki/Error_function

Any explanations and advice would be appreciated.

$\endgroup$
1
  • 6
    $\begingroup$ $a=0$ seems OK for me. I would expand $e^{-t^2}$ in a power series and integrate term by term. $\endgroup$ Mar 28, 2012 at 5:38

2 Answers 2

6
$\begingroup$

Elaborating a little on Marty's comment gives the following:

$f^{(n)}(a)$ can be written in terms of Hermite polynomials $H_n$:

$$ H_0(x)=1,\, H_1(x)=2x,\, H_2(x)=4x^2-2,\, H_3(x)=8x^3-12x,\, H_4(x)=16x^4-48x^2+12,\, H_5(x)=32x^5-160x^3+120x,\, H_6(x)=64x^6-480x^4+720x^2-120,\dots\, $$ You recognize that $H_{2n-1}(0)=0$, which gives the power series for $e^{-x^2}$ at $a=0$: $$ e^{-x^2} = 1 - \frac{2}{2!}x^2+\frac{12}{4!}x^4-\frac{120}{6!}x^6+\cdots $$ (see here). After multiplying by $2/\sqrt{\pi}$, this integrates to $$ \operatorname{erf}(z) =\frac{2}{\sqrt{\pi}} \left(z-\frac{z^3}{3}+\frac{z^5}{10}-\frac{z^7}{42}+\frac{z^9}{216}-\ \cdots\right) . $$


EDIT: Since $\displaystyle \frac{d^n}{dx^n}e^{-x^2}= (-1)^n e^{-x^2} H_n(x), $ one can do a Taylor Series for every $a$: $$ \text{erf}_a(x)= \text{erf}(a) + e^{-a^2} \sum_{n=1}^\infty (-1)^n \frac{H_n(a)}{n!}(x-a)^n $$

$\endgroup$
9
  • 1
    $\begingroup$ "$f^{(n)}(a)$ can be written in terms of Hermite polynomials..." - of course, since the Rodrigues formula for the Hermite polynomials involves the repeated differentiation of the Gaussian function $\exp(-x^2)$... $\endgroup$ Mar 28, 2012 at 15:19
  • 2
    $\begingroup$ Also: the odd-order Hermite polynomials are odd (and thus $H_{2n+1}(0)=0$) precisely because the Gaussian weight function is even. $\endgroup$ Mar 28, 2012 at 15:21
  • $\begingroup$ @J.M. And so, one can do a Taylor Series for every $a$: $\text{erf}_a(x)=\sum_{n=0}^{\infty}(-1)^n e^{-a^2} \frac {H_n(a)}{n!}(x-a)^{n}$, right? $\endgroup$
    – draks ...
    Mar 28, 2012 at 17:38
  • $\begingroup$ Sure, the error function is analytic... $\endgroup$ Mar 28, 2012 at 18:38
  • $\begingroup$ I would not be able to solve for $erf(a)$ if I were to expand around $a$ - would I? $\endgroup$ Mar 28, 2012 at 22:05
1
$\begingroup$

Context for using the Taylor Series of $$e^{-t^2}$$ to find the Taylor expansion of the ERF function is found at Robert Ghrist/UPenn's Calculus wiki.

$\endgroup$
1
  • 1
    $\begingroup$ The link appears to be broken. $\endgroup$ Mar 6, 2022 at 6:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .