An Integration problem with $e^{-x^{2}}$ How do I do this:
$$\int_0^1 (1 + e^{-x^{2}})\, dx$$
My instructor told me that this function is non integratable but then this question exists in my book's exercise problems. I have tried applying parts over the whole thing but didn't lead me anywhere.
 A: The $e^{-x^2}$ term makes the function non-integrable in elementary functions. However, its integral arises so often in the study of the normal distribution that a scaled variant is called the error function:
$$\frac{\sqrt\pi}2\operatorname{erf}(x)=\int_0^xe^{-t^2}\,dt$$
Thus the given integral may be written as $1+\frac{\sqrt\pi}2\operatorname{erf}(1)$.
A: $e^{-x^2}$ has no elementary antiderivative, but that does not mean that $e^{-x^2}$ is not integrable. Actually $e^{-x^2}$ is an entire and non-negative function in the Schwartz space $\mathcal{S}(\mathbb{R})$, so it is very, very integrable over any measurable subset of the real line. The numerical computation of 
$$ E=\int_{0}^{1}e^{-x^2}\,dx $$
is an interesting task. A straightfoward approach is to exploit the entire-ness of the integrand function:
$$ E=\int_{0}^{1}\sum_{n\geq 0}\frac{(-1)^n x^{2n}}{n!}\,dx = \sum_{n\geq 0}\frac{(-1)^n}{n!(2n+1)}.$$
The series in the RHS is both rapidly convergent and with alternating signs, so
accurate lower and upper bounds for $E$ can be derived from the partial sums. As an alternative, it is possible to check that
$$ \int_{0}^{1}x^3(1-x)^3 e^{-x^2}\,dx = -16+\frac{93}{16e}+\frac{297}{16}E $$
holds by integration by parts. Since the LHS is bounded between $0$ and $\frac{1}{4^3}$, the absolute error the following approximation
$$ E\approx \frac{1}{297}\left(256-\frac{93}{e}\right)$$
is less than $10^{-3}$. More accurate approximations in $\mathbb{Q}(e)$ can be derived by replacing $x^3(1-x)^3$ with $x^n(1-x)^n$ or $P_n(2x-1)$.
