I am asked to Find the first four terms of the Maclaurin series for f(x)= $$e^{-x^{2}}$$ and use this information to approximate $$\int_{-1}^{1} (e^{-x^{2}})dx$$ Then compare with the “actual” value (also obtained numerically).
I am unsure about the approach I have taken on the last half of the question... I found the first 4 terms of the Maclaurin series to be $$1-x^2$$ (2nd and 3rd term for n=1 and n=3 went to 0). I used that to find the power series representation from comparing it to $e^x$ and subbing in $-x^2$ and got this to be $$\sum_{n=0}^\infty\frac{(-1)^n}{n!}(x^{2n})$$ It is from here which I am unsure of... I calculated the integral $$\int_{-1}^{1}\frac{(-1)^n}{n!}(x^{2n})dx$$ to get $$\sum_{n=0}^\infty\frac{(-1)^n-(-1)^{3n+1}}{n!(1+2n)}$$
I found the first few terms of this series: $2-\frac{2}{3}+\frac{1}{5}-\frac{1}{21}+\frac{1}{108}-\frac{1}{660}$=approximately 1.49
I don't know how I am meant to approximate the value of $$\int_{-1}^{1} (e^{-x^{2}})dx$$ to compare with it's "actual" value? I tried subbing in x=0,1,2,3,4,5,6 into $$e^{{-x}^{2}}$$ and got an approximation of 1.39.
Any help/explanation would be really helpful because I cant think of any other way but I am pretty sure I have done the last part wrong.