2
$\begingroup$

Estimate $\int^1_0 e^{-x^2}\, dx$

This is in a section on Taylor series so I would assume that is how it should be solved.

I started by using the Taylor series formula for $e^x$ replacing $x$ with $x^2$. I ended up with this:

$1+(-x^2)+\frac{(-x^2)^2}{2!}+\frac{(-x^2)^3}{3!}+\frac{(-x^2)^4}{4!}+...$

It looks to me like from here I should get some Fundamental Theorem of Calculus going, but I'm not sure how. The integral evaluated at $0$ is just $1$, however the integral evaluated at $1$ is not so easy. Is there some summation formula that would apply here that I could use?

$\endgroup$
  • 5
    $\begingroup$ Have you tried integrating $1-x^2 + \frac{x^4}{2}-\frac{x^6}{6}$ between $0$ and $1$? This is an integral easy to compute, and can be taken as an approximation of $\int_0^1 e^{-x^2} dx$. (The more polynomial terms you get, the better the approximation will be) $\endgroup$ – Clement C. Apr 27 '15 at 2:10
  • $\begingroup$ That's what I figure you have to do, I thought there would be a way to sum up all the terms though so it is a really good estimate. $\endgroup$ – Señor Sandia Apr 27 '15 at 2:13
  • 1
    $\begingroup$ Given the function itself, it is equal to the sum of all the terms of the series, as $e^y = \sum_{n=0}^\infty \frac{y^n}{n!}$ (for all $y\in\mathbb{R}$). Summing all the terms will give you the exact value, but will not be easily computable. $\endgroup$ – Clement C. Apr 27 '15 at 2:15
  • $\begingroup$ Ah, well since this is a homework question I guess I will just do a few values and maybe make a note about more values giving a better estimate. Thanks for the help! $\endgroup$ – Señor Sandia Apr 27 '15 at 2:25
  • $\begingroup$ You are not evaluating the integral, you are evaluating the function itself. $\endgroup$ – Yves Daoust Apr 27 '15 at 9:48
5
$\begingroup$

The exponential function is an entire function, hence: $$ e^x = \sum_{n\geq 0}\frac{x^n}{n!} \tag{1} $$ leads to: $$ \forall x\in[0,1],\quad e^{-x^2}=\sum_{n\geq 0}\frac{(-1)^n}{n!}\,x^{2n}\tag{2} $$ and by integrating termwise $(2)$ over $[0,1]$ we get: $$ \int_{0}^{1}e^{-x^2}\,dx = \sum_{n\geq 0}\frac{(-1)^n}{(2n+1)\,n!}\tag{3} $$ where the RHS of $(3)$ is a series that converges pretty fast; for instance: $$ \left|\sum_{n\geq N}\frac{(-1)^n}{(2n+1)n!}\right|\leq\frac{1}{(2N+1)N!}\tag{4} $$ and: $$ \int_{0}^{1}e^{-x^2}\,dx = \sum_{n=0}^{6}\frac{(-1)^n}{(2n+1)n!}+\theta = \frac{1614779}{2162160}+\theta = 0.7468360\ldots+\theta\tag{5}$$ where $|\theta|\leq\frac{1}{15\cdot 7!}$ gives: $$ \int_{0}^{1}e^{-x^2}\,dx = \color{red}{0.7468\ldots}\tag{6}$$ Other (tight) approximations are possible by using continued fractions, since $$ \int_{0}^{1}e^{-x^2}\,dx = \frac{\sqrt{\pi}}{2}\,\operatorname{Erf}(1)\approx\color{blue}{\frac{3969}{1955 e}}\tag{7}$$ where the Gauss continued fraction (look for "error function" here) provides good bounds.

$\endgroup$
3
$\begingroup$

$\bf{My\; Solution}$ We Know that in $$x\in (0,1)\;\;, x^2<x\Rightarrow -x^2>-x\Rightarrow e^{-x^2}>e^{-x}$$

So $$\displaystyle \int_{0}^{1}e^{-x^2}dx > \int_{0}^{1}e^{-x}dx = \left(1-\frac{1}{e}\right)$$

and in $$\displaystyle x\in (0,1)\;, x^2>0\Rightarrow e^{-x^2}<e^{-0}$$

So $$\displaystyle \int_{0}^{1}e^{-x^2}dx<\int_{0}^{1}e^{-0}dx = 1$$

So $$\displaystyle \left(1-\frac{1}{e}\right)< \int_{0}^{1}e^{-x^2}dx < 1$$

$\endgroup$
  • 1
    $\begingroup$ That's an interesting way to think about it, but it seems like it leaves a large window for the result. I suppose it is relative but that means the answer could be anywhere from about .63 to 1. $\endgroup$ – Señor Sandia Apr 27 '15 at 3:35
2
$\begingroup$

Why not use a numerical method such as Simpson's, Trapezoidal or Midpoint?

Using Taylor or a Series also work as you see above.

A very crude option is to realise that you can calculate

$$\int_0^1e^{-ax}\,dx,$$

for a constant $a$. Therefore approximate $x^2$ by some $a$ on $[0,1]$. I found the minimum of

$$\int_0^1(x^2-ax)^2\,dx$$

at $a=\frac34$ and this yields

$$\int_0^1e^{-x^2}\,dx\approx\int_0^1e^{-\frac{3}{4}x}\,dx=\frac43\left(1-e^{-3/4}\right)$$

$\endgroup$
2
$\begingroup$

Use the standard normal distribution table.

Consider $$\frac{1}{\sqrt{2π}}\int e^{-x^2/2}\,dx$$

Let $u=\frac{x}{\sqrt{2}}$. Then $\frac{du}{dx}=\frac{1}{\sqrt{2}}$.

Then $$\frac{1}{\sqrt{2π}}\int e^{-x^2/2}\,dx=\frac{1}{\sqrt{2π}}\int e^{-u^2}\,\sqrt{2}du=\frac{1}{\sqrt{π}}\int e^{-u^2}\,du$$

So

$$\frac{1}{\sqrt{π}}\int_{0}^1 e^{-u^2}\,du=\frac{1}{\sqrt{2π}}\int_{0}^\sqrt{2} e^{-x^2/2}\,dx$$

$$\int_{0}^1 e^{-u^2}\,du=\sqrt{π}*\frac{1}{\sqrt{2π}}\int_{0}^\sqrt{2} e^{-x^2/2}\,dx\approx\sqrt{π}*0.4207\approx0.7457$$

$\endgroup$
1
$\begingroup$

By integrating term-wise the Taylor polynomial $$\sum_{k=0}^\infty\frac{(-1)^kx^{2k+1}}{(2k+1)k!}$$and evaluating in $(0,1)$: $$\color{green}{\sum_{k=0}^\infty\frac{(-1)^k}{(2k+1)k!}}.$$

Also, integrating by parts,

$$\begin{align} \int e^{-x^2}\,dx&=xe^{-x^2}+2\int x^2e^{-x^2}\,dx\\ &=xe^{-x^2}+\frac23x^3e^{-x^2}+\frac{2^2}3\int x^4e^{-x^2}\,dx\\ &=xe^{-x^2}+\frac23x^3e^{-x^2}+\frac{2^2}{3\cdot5}x^5e^{-x^2}+\frac{2^3}{3\cdot5}\int x^6e^{-x^2}\,dx\\ &=\cdots\\ &=\sum_{k=0}^\infty\frac{2^kx^{2k+1}}{(2k+1)!!}e^{-x^2}. \end{align}$$ So in the range $(0,1)$,

$$\color{green}{\sum_{k=0}^\infty\frac{2^k}{(2k+1)!!}e^{-1}}. $$

Here are the $16$ first approximations, using both formulas $$\begin{align} & 0.666666666667 & 0.613132401952 \\ & 0.766666666667 & 0.711233586265 \\ & 0.742857142857 & 0.739262496068 \\ & 0.747486772487 & 0.745491142691 \\ & 0.746729196729 & 0.746623623896 \\ & 0.746836034336 & 0.746797851773 \\ & 0.746822806823 & 0.746821082157 \\ & 0.74682426574 & 0.746823815143 \\ & 0.746824120701 & 0.746824102826 \\ & 0.746824133824 & 0.746824130224 \\ & 0.746824132734 & 0.746824132607 \\ & 0.746824132818 & 0.746824132797 \\ & 0.746824132812 & 0.746824132811 \\ & 0.746824132812 & 0.746824132812 \\ & 0.746824132812 & 0.746824132812 \\ \end{align}$$

Simpson's rule requires to compute more costly terms $$\begin{align} \frac16\left(1+4e^{-1/4}+e^{-1}\right)&=0.747180\\ \frac1{12}\left(1+4e^{-1/16}+2e^{-1/4}+4e^{-9/4}+e^{-1}\right)&=0.746855\\ \frac1{18}\left(1+4e^{-1/36}+2e^{-1/9}+4e^{-1/4}+2e^{-4/9}+4e^{-25/36}+e^{-1}\right)&=0.746830 \end{align}$$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.