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 \displaystyle f(x)=\frac{e^{-x^2}-1}{x}$. We have $\displaystyle \displaystyle e^x=1+x+\frac{x^2}{2!}+\frac{x^3}{3!}+\dots$, so $\displaystyle \displaystyle e^{-x^2}=1-x^2+\frac{x^4}{2!}-\frac{x^6}{3!}+\dots$ and $\displaystyle \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 $\displaystyle |x|\le1$); therefore, the sum from the $\displaystyle n$th term to infinity is bounded by the $\displaystyle n$th term. For example, let $\displaystyle \displaystyle g(x)=-x+\frac{x^3}{2!}-\frac{x^5}{3!}$. Then $\displaystyle \displaystyle |f(x)-g(x)|=\left|\frac{x^7}{4!}+\dots\right|\le\frac{x^ 7}{4!}$.

Now, suppose $\displaystyle \displaystyle\varepsilon=\sup_{x\in[0,1/5]}|f(x)-g(x)|$. Then $\displaystyle |\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 $\displaystyle \varepsilon/5<10^{-6}$. One can check that $\displaystyle \displaystyle\frac{(1/5)^7}{5\cdot 4!}<10^{-6}$, but $\displaystyle \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 $\displaystyle \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. $\displaystyle e^{-x^2} = 1 - x^2+\dots$, not $\displaystyle 1+x^2+\dots$. When we subtract 1 and divide by x, we get $\displaystyle f(x) = -x + x^3/2!-\dots$. Recall that $\displaystyle f(x)=(e^{-x^2}-1)/x$.