# Taylor series for error function

Jump to: navigation, search

## Theorem

The following formula holds: $$\mathrm{erf}(z) = \dfrac{2}{\sqrt{\pi}} \displaystyle\sum_{k=0}^{\infty} \dfrac{(-1)^kz^{2k+1}}{k!(2k+1)},$$ where $\mathrm{erf}$ denotes the error function and $\pi$ denotes pi, and $k!$ denotes the factorial.

## Proof

From the Taylor series of the exponential function, $$e^{-\tau^2}=\displaystyle\sum_{k=0}^{\infty} \dfrac{(-\tau^2)^k}{k!} = \displaystyle\sum_{k=0}^{\infty} \dfrac{(-1)^k \tau^{2k}}{k!}.$$ So, integrating term by term (justify this), $$\displaystyle\int_0^x e^{-\tau^2} \mathrm{d}\tau = \displaystyle\sum_{k=0}^{\infty} \dfrac{(-1)^k \tau^{2k+1}}{k! (2k+1)}.$$ Therefore multiplying by $\dfrac{2}{\sqrt{\pi}}$ and comparing to the definition of the error function, we get $$\mathrm{erf}(z)=\dfrac{2}{\sqrt{\pi}} \displaystyle\sum_{k=0}^{\infty} \dfrac{(-1)^k \tau^{2k+1}}{k! (2k+1)},$$ as was to be shown.