How would you integrate? I'm thinking maybe by parts.
$\displaystyle \int{e^{-x^2}}dx$
The 'error function' ...
$\displaystyle \displaystyle erf (x) = \frac{2}{\sqrt{\pi}} \int_{0}^{x} e^{-t^{2}}\ dt $ (1)
... and the 'complementary error functions' ...
$\displaystyle erfc (x) = 1 - erf (x)$ (2)
... play a central role in comminication and informatic technologies. In most cases (2) is more important than (1) because it supplies a direct indication of the 'error rate' of a process. Sometime is required an 'error rate' not greater that $\displaystyle 10^{-12} - 10^{-15}$ and that explains the criticity of the accurate computation of the erf (x) for x 'large enough'. The most 'natural' approach to the computation of erf(x) is based on the Taylor expansion...
$\displaystyle \displaystyle e^{-t^{2}} = \sum_{n=0}^{\infty} (-1)^{n} \frac{t^{2n}}{n!}$ (3)
... from which, integrating 'term by term', You derive...
$\displaystyle \displaystyle erf(x) = \frac{2}{\sqrt{\pi}} \sum_{n=0}^{\infty} (-1)^{n} \frac{x^{2n+1}}{(2n+1)\ n!}$ (4)
At first it seems that we can be 'optimist' because the (4) is an 'alternate sigh series' and the absolute value of the error is less that the absolute value of the last term 'discharged'. Example: how many terms You need to have four correct digits?... Because is...
$\displaystyle \displaystyle |a_{n}| = \frac{2}{\sqrt{\pi}} \frac{x^{2n+1}}{(2n+1)\ n!}$ (5)
... is $\displaystyle |a_{n}|< 10^{-4}$ if...
$\displaystyle \displaystyle x^{2n+1} < 10^{-4}\ \frac{\sqrt{\pi}}{2}\ (2n+1)\ n!$ (6)
If x=1 You need 8 terms to meet the result. For x=2 the terms are 15 and for x=2.5 the terms are 20. For larger value of x the number of terms that have to be added produces a 'rounding error' that is comparable or superior to the desired accuracy ... it is evident that at this point a more efficient approach has to be found ...
Kind regards
$\displaystyle \chi$ $\displaystyle \sigma$
There is a fairly standard way of finding $\displaystyle \int_{-\infty}^\infty e^{-x^2}dx$ or $\displaystyle \int_0^\infty e^{-x^2}dx$
Let $\displaystyle A= \int_0^\infty e^{-x^2} dx$. Then it is also true that $\displaystyle A= \int_0^\infty e^{-y^2} dy$ since that is only a change in the "dummy" variable.
Then, by Fubini's theorem, $\displaystyle A^2= \int_0^\infty e^{-x^2}dx\int_0^\infty e^{-y^2} dy$$\displaystyle = \int_0^\infty\int_0^\infty e^{-x^2} e^{-y^2}dy dx= \int_0^\infty \int_0^\infty e^{-(x^2+ y^2)}dydx$
That integral is over the first quadrant. If we change to polar coordinates, r runs from 0 to $\displaystyle \infty$ while $\displaystyle \theta$ runs from 0 to $\displaystyle \pi/2$. Since $\displaystyle x^2+ y^2= r^2$ and $\displaystyle dy dx= r drd\theta$, we have
$\displaystyle \int_0^{\pi/2}\int_0^\infty e^{-r^2} rdr d\theta= \frac{\pi}{2}\int_0^\infty e^{-r^2} rdr$
With that additional "r" in the integrand, we can let $\displaystyle u= r^2$ so that $\displaystyle du= 2r dr$ and that integral becomes
$\displaystyle A^2= \frac{\pi}{2}\int_0^\infty e^{-u}du= \frac{\pi}{2}(-e^{-u})_0^\infty= \frac{\pi}{2}$.
Thus, $\displaystyle \int_0^\infty e^{-x^2}dx= A= \sqrt{\pi/2}$ and, because $\displaystyle e^{(-x)^2}= e^{-x^2}$, $\displaystyle \int_{-\infty}\infty e^{-x^2}dx= 2\sqrt{\pi/2}= \sqrt{2\pi}$.
The fact that the integral exist on the entire real line implies that it exists on any subinterval.
One thing you need to learn and understand is that mathematical topics are not islands that exist independently of each other. There are rich links between topics (sometimes unexpectedly). Failure to understand this has been the downfall of many a student (who, for example, think that s/he can forget all that they learn in a previous year because they are starting a new topic).