2

Example in Notes:

Consider the error function defined in terms of the integral:

$$erf\left( x\right) =\dfrac {2} {\sqrt {\pi }}\int _{0}^{x}e^{-t^{2}}dt. \tag1$$

The Taylor expansion for $e^{-t^{2}}$ is given by

$$e^{-t^{2}}=\sum _{n=0}^{\infty }\dfrac {\left( -t^{2}\right) ^{n}} {n!}, \tag2$$

Quoting:

"which converges for all $t$ i.e. it has an infinite radius of convergence. Thus, we can simply substitute $(1)$ into $(2)$ and integrate term-by-term to obtain a series that converges for all values of $x$. This is given by $$erf\left( x\right) =\dfrac {2} {\sqrt {\pi }}\sum _{n=0}^{\infty }\dfrac {\left( -1\right) ^{n}x^{2n+1}} {\left( 2n+1\right) n!}"$$

My Question:

How do you do the step in the quotation marks in full?

UniStuffz
  • 932

1 Answers1

1

Well replacing $\int e^{-t^2} dt$ into the definition of $erf$ gives us $$ erf(x) = \frac{2}{\sqrt{\pi}} \int_0^x \left(\sum_{n=0}^\infty \frac{(-t^2)^n}{n!}\right) dt $$ Now swapping $\sum$ and $\int$ gives $$ erf(x) = \frac{2}{\sqrt{\pi}} \sum_{n=0}^\infty \left(\int_0^x \frac{(-t^2)^n}{n!} dt\right) \tag{1} $$ Now the integral is easy to compute : $$ \int_0^x \frac{(-t^2)^n}{n!} dt = \frac{(-1)^n}{n!} \int_0^x t^{2n} dt = \frac{(-1)^n}{n!} \left[ \frac{t^{2n+1}}{2n + 1}\right]_0^x = \frac{(-1)^n}{n!} \frac{x^{2n+1}}{2n+1} \tag{2} $$ Putting back $(2)$ in $(1)$ gives you the result.

Zubzub
  • 4,143
  • 1
  • 17
  • 25