Tom K. answered 07/25/20
Knowledgeable and Friendly Math and Statistics Tutor
In this explanation, ∑ stands for the sum from n = 0 to infinity
The Maclaurin series for ex is ∑ xn/n!
Then, the Maclaurin series for e-x^2 is ∑ (-1)nx2n/n!
Using I[a,b] for the integral from a to b and E[a,b] for the evaluation from a to b,
I[0,1] x2n dx is x2n+1 /(2n+1) E[0,1] = 1/(2n+1)
Thus, the integral from 0 to 1 of ∑(-1)nx2n/n! is ∑ (-1)n/((2n+1)n!)
Then, as this is an alternating series, we only need to consider the next term (disregarding (-1)n) . When we find the n such that the term is less than 10-6, we need one less term; however, since we start with n = 0, that end up being the number of terms in the summation.
1/((2n+1)(n!)) < 10-6
(2n+1)(n!) > 106
17*8! = 685440, and 19*9! = 6894720
We need to add, from n = 0 to 8, (-1)n/((2n+1)n!) =
1 - 1/(3*1!) + 1/(5*2!) - 1/(7*3!) + 1/(9*4!) - 1/(11*5!) + 1/(13*6!) - 1/(15*7!) + 1/(17*8!) =
1 - 1/3 + 1/10 - 1/42 + 1/216 - 1/1320 + 1/9360 - 1/75600 + 1/685440 =
.746824