Math Help - Calculus MacLaurin series

1. Calculus MacLaurin series

Using the MacLaurin Series for e^x, find the Integral of ((e^-x^2)-1))/x dx from 0 to 1/5 to within 0.000001.

Can anyone help me solve this, or a problem similiar to this one so I can attempt to solve it on my own?

The answer to the above question is -0.019802

2. Let $\displaystyle f(x)=\frac{e^{-x^2}-1}{x}$. We have $\displaystyle e^x=1+x+\frac{x^2}{2!}+\frac{x^3}{3!}+\dots$, so $\displaystyle e^{-x^2}=1-x^2+\frac{x^4}{2!}-\frac{x^6}{3!}+\dots$ and $\displaystyle f(x)=-x+\frac{x^3}{2!}-\frac{x^5}{3!}+\frac{x^7}{4!}-\dots$. The terms of this series have alternating signs and decreasing absolute values (when $|x|\le1$); therefore, the sum from the $n$th term to infinity is bounded by the $n$th term. For example, let $\displaystyle g(x)=-x+\frac{x^3}{2!}-\frac{x^5}{3!}$. Then $\displaystyle |f(x)-g(x)|=\left|\frac{x^7}{4!}+\dots\right|\le\frac{x^ 7}{4!}$.

Now, suppose $\displaystyle\varepsilon=\sup_{x\in[0,1/5]}|f(x)-g(x)|$. Then $|\int_0^{1/5} f(x)\,dx-\int_0^{1/5} g(x)\,dx|\le\int_0^{1/5}|f(x)-g(x)|\,dx\le\varepsilon/5$. Our goal is to make $\varepsilon/5<10^{-6}$. One can check that $\displaystyle\frac{(1/5)^7}{5\cdot 4!}<10^{-6}$, but $\displaystyle\frac{(1/5)^5}{5\cdot 3!}>10^{-6}$, so we have to approximate f(x) with a partial sum of three terms, i.e., with g(x).

Calculating $\int_0^{1/5}g(x)\,dx$ gives −0.019801778, which is −0.019802 when rounded to the 6th digit.

3. I understand why e^-x^2 = 1 + x^2... but why does f(x) = -x + x^3/2!-...?

4. $e^{-x^2} = 1 - x^2+\dots$, not $1+x^2+\dots$. When we subtract 1 and divide by x, we get $f(x) = -x + x^3/2!-\dots$. Recall that $f(x)=(e^{-x^2}-1)/x$.