# How do I approximate the integral

1. Apr 24, 2005

### Icebreaker

How do I approximate the intergral of $$e^{-x^2}$$ over some interval?

2. Apr 24, 2005

### Hippo

$$e^{r} = \sum_{n=0}^\infty \frac{r^n}{n!}$$

Substitute r = -(x^2).

$$e^{-x^2} = \sum_{n=0}^\infty \frac{(-1)^{n}x^{2n}}{n!}$$

Antidifferentiate series over x.

$$\int {e^{-x^2}}dx = \sum_{n=0}^\infty \frac{(-1)^{n}x^{2n+1}}{(2n+1)n!} = \sum_{n=0}^\infty \frac{(-1)^{n}x^{2n+1}}{(2n+1)n!}$$

You can use the last expression with some finite upper value. In other words,

$$\sum_{i=0}^k \frac{(-1)^{i}x^{2i+1}}{(2i+1)i!}$$

will yield an estimate of the desired antiderivative, with (k+1) being the number of terms involved.

[Edit: Sorry! Initially, I differentiated the series, instead of antidifferentiating.]

Last edited by a moderator: Apr 25, 2005
3. Apr 25, 2005

### dextercioby

U differentiated the series,u should have integrated it.

$$\int e^{-x^{2}} \ dx=\frac{\sqrt{\pi}}{2}\mbox{erf}\left(x\right) + C$$

and the error function is tabulated...

Daniel.

4. Apr 25, 2005

### Hippo

Yeah, I realized that this morning.

Sorry, it was kind of late.

5. Apr 25, 2005

### Icebreaker

Thanks to both