# Maclaurin series of $e^{-x^2}$ Error

The task is to first estimate the second degree Maclaurin series of $e^{-x^2}$ and thus estimate the integral of the function from $0$ to $0.5$. This part is no problem.

The following task is to estimate the error for this estimation. I used the regular approach with calculating the third derivative and using it with the formulae for the reminder of Taylor polynomials which apparently is wrong. However doing the same thing with $4$-th derivative works but I have no idea why.

I know that in maclaurin formulae the term including third derivative becomes $0$ however I don't know how this is connected to the error calculation.

Also I'm aware of the method with $t=-x^2$ substitution of in $e^t$ expansion, but I don't understand why the normal method does not work.

Sorry if I'm too vague.

• The third derivative of $e^{-x^2}$ is $-4x(2x-3)e^{-x^2}$. Using the Lagrange error estimate, this means that the error in applying the second order Maclaurin expansion at a point $x>0$ is given by $\frac{-4\xi(x)(2\xi(x)-3)e^{-\xi(x)^2}}{6} x^3$ for some $\xi(x) \in (0,x)$. Derive an upper bound for this quantity and work from there. It should work fine. It would be easier to deal with it by using the substitution approach, but it should still work fine.
– Ian
Oct 24, 2015 at 21:14
• I made an error copying down the derivative, but I think you get the point.
– Ian
Oct 24, 2015 at 21:24

Let us first deal with the function itself. The MacLaurin expansion has the shape $1-\frac{x^2}{1!}+\frac{x^4}{2!}-\frac{x^6}{3!}+\cdots$. Integrating from $0$ to $x$, we find that the Maclaurin expansion for the area up to $x$ has Maclaurin expansion $x-\frac{x^3}{3\cdot 1!}+\frac{x^5}{5\cdot 2!}-\frac{x^7}{7\cdot 3!}+\cdots$.

For the function, you were asked to truncate just after the $\frac{x^2}{1!}$ term. You can estimate the error in terms of the third derivative, evaluated at some unknown place $\xi$ between, in this case, $0$ and $0.5$. Now in fact this $\xi$ is close to $0$, but you do not officially know that, and the upper bound on the error that you get is quite a bit too pessimistic.

However, as you observed, the coefficient of $x^3$ is $0$, and therefore the Maclaurin polynomial up to $x^2$ is exactly the same as the Maclaurin polynomial up to $x^3$. So the error can be expressed in terms of the fourth derivative, and this gives a nicer upper bound on the error.

There is another way of looking at things that does not use the Lagrange formula for the remainder. Note that the Maclaurin polynomial, at least for $x\le 1$, is an alternating series. So the truncation error is less, in absolute value, than the first "neglected" term. This term has absolute value $\frac{x^4}{2!}$. So the absolute value of the error when we evaluate at $x=0.5$ is less than $\frac{(0.5)^2}{2!}$.

The error estimation for the integral uses exactly the same ideas.

• Thank you very much. Some things make a lot more sense now. Could you elaborate somehow on why exactly the upper bound of the error would be "too pessimistic" and why "truncation error is less, in absolute value, than the first "neglected" term"? Oct 24, 2015 at 22:42
• Note that I only said that in the case of alternating series truncation error is less in absolute value than the first neglected term. The proof is by grouping the first two neglected terms, the next two, and so on, and separately grouping the second neglected and the third, the fourth and the fifth, and so on. That gives us inequalities that do the job. Note that alternating series means not only that the terms alternate in sign, but also that they are decreasing in absolute value, and have limit $0$. The details would be in almost any calculus book with a chapter on series. Oct 24, 2015 at 22:54
• The problem with the Lagrange version of the error term is that there is an unknown point at which have to evaluate the appropriate higher derivative. We know in principle nothing about this point except that (in our case) it is between $0$ and $0.5$. If we are forced to give a guaranteed upper bound on the error, we have to use an upper bound for the appropriate derivative. That upper bound may be a lot bigger than the value at the unknown point. Oct 24, 2015 at 22:58