Evaluate $ \int^1_0 e^{-x^2}dx$ correct to three decimal places

Integral of 1/e^x
Integral of 1/e^x

I already know that: $$ e^{x} = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots $$ which gives $$e^{-x^2} = 1 – x^2 + \frac{x^4}{2!} + \cdots $$

Do I just integrate term by term? Any thoughts? I have to solve it using power series.

Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It only takes a minute to sign up.

Sign up to join this community

I already know that: $$ e^{x} = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots $$ which gives $$e^{-x^2} = 1 – x^2 + \frac{x^4}{2!} + \cdots $$

Do I just integrate term by term? Any thoughts? I have to solve it using power series.

Term by term integration gives us that $$ \int_{0}^1 \exp(-x^2)\,dx=\int_{0}^1\sum_{n=0}^\infty\frac{(-1)^nx^{2n}}{n!}\, dx=\sum_{n=0}^\infty\frac{(-1)^n}{n!}\int_{0}^1x^{2n}\, dx=\sum_{n=0}^\infty\frac{(-1)^n}{(2n+1)n!}. $$ We observe that the series is alternating. In particular for all $m\ge 1$ $$ \left\lvert\int_{0}^1 \exp(-x^2)- \sum_{n=0}^{m-1}\frac{(-1)^n}{(2n+1)n!} \right\rvert\leq\frac{1}{(2m+1)m!}. $$ Choose the smallest $m$ such that $$ \frac{1}{(2m+1)m!}<0.001. $$ to truncate the series for the desired conclusion.

Integrating term by term is probably the easiest, as the powers of $0$ and $1$ are easy to compute. It is guaranteed to work because the series is absolutely convergent. The alternating series theorem then says the error is less than the first neglected term and of the same sign so once a term is less than $0.001$ you are done. You can get an exact answer in terms of the error function and then look up the z-score table to get a figure to compare to. The answer from Alpha

Your method works but it is not the only method that works. You could also do it using the trapezoidal rule or Simpson’s Rule. Both are standard numerical methods.

Too long for a comment but added for curiosity.

In this problem, you are asked for a rather low accuracy. Suppose that you are asked for $k$ decimal places. So, using Foobaz John’s answer, you need to find $m$ such that $$\frac{1}{(2m+1)m!}<10^{-k}$$ which is almost equivalent to $$\frac{1}{(2m+2)m!}=\frac{1}{2(m+1)!}<10^{-k}\implies (m+1)! > \frac 12 10^k$$

If you look here, you will find a very nice approximation @robjohn provided; adapted to the present problem this will give $$m=\left\lceil e^{W\left(\frac{\log \left(\frac{10^k}{2 \sqrt{2 \pi }}\right)}{e}\right)+1}-\frac{3}{2}\right\rceil$$ where appears Lambert function (don’t worry, you will learn about it quite soon).

For $k=1$ to $k=20$, the corresponding values of $m$ would be $2,4,5,6,8,9,10,11,12,12,13,14,$ $15,16,17,17,18,19,20,20$.

You are watching: Evaluate $ \int^1_0 e^{-x^2}dx$ correct to three decimal places. Info created by THVinhTuy selection and synthesis along with other related topics.

Rate this post

Related Posts