Integrating $\exp(-x^2)$ using power series

integrationpower series

I am aware of the technique to evaluate $\displaystyle\int_{-\infty}^{+\infty} \exp(-x^2)dx$ using polar coordinates.

I recently wondered, why is it not possible to evaluate this integral using power series representation? If you express the integral using a power series, its interval of convergence is $(-\infty,+\infty)$. Why cannot we get a value closer and closer to $\sqrt{\pi}$ by using a power series?

Other functions can be integrated using a power series solution, with good approximation and precision (depending on the number of terms), in the absence of a closed form solution. Why is this integral different?

Best Answer

$$e^z=\sum_{n=0}^\infty \frac{z^n}{n!}\qquad\forall z\in\mathbb{C}$$ and so: $$e^{-x^2}=\sum_{n=0}^\infty(-1)^n\frac{x^{2n}}{n!}$$ the problem is that the terms alternate between positive and negative, so if you cut the series off at any arbitrary point (which is going to be small compared to the infinite number of terms). To demonstrate this point look at the graph below: graph of series The red line represents the actual $\exp(-x^2)$ function whilst blue is $n\in[0,5]$ and green is $n\in[0,10]$ and for your integral you want to integrate this series and then take the limit for $n\to\infty$ whilst will just accentuate any "small" error you see here

Related Question