# Math Help - Taylor Series Error Estimation

1. ## Taylor Series Error Estimation

If I approximate $e^{-x^2}$ with the first three terms of its Maclaurin series, how do I find the range of x for which the approximation is accurate to within .005?

First, I found the Maclaurin series that represents this function:

$e^{-x^2} = \sum_{n=0}^\infty\frac{(-x^2)^n}{n!} = \sum_{n=0}^\infty\frac{x^{2n}}{n!} = 1 + x^2 + \frac{x^4}{2!} + \frac{x^6}{3!} + ...$

Since we are approximating using three terms, I have to find the 4th derivative of the function, which is $e^{-x^2}(16x^4-48x^2+12)$.

Up to this point, I think that I am in good shape. Even this next step seems fairly straightforward:

$|error| = |R_3(x,z)| = |\frac{f^{(4)}(z)}{4!}x^4| \leq 0.005$

It's in executing this that get confused. I think that the next step is this:

$|\frac{e^{-x^2}(16x^4-48x^2+12)}{24}x^4| \leq 0.005$

$|4x^4e^{-x^2}(4x^4-12x^2+3)| \leq 0.12$

It's at this point where I get stuck. Assuming that I have gotten this far without error (big assumption), the idea would be to solve the inequality for x, which would tell me the range to fall within this error threshold. But the algebra here seems pretty involved, which makes me think that I have made a mistake.

Anybody see anything or have any advice? Thanks.

2. ## Re: Taylor Series Error Estimation

you have your original series incorrect, btw, it should be alternating signs.

your 4th derivative is correct, however.

so you should wind up with:

$|\frac{e^{-z^2}(16z^4 - 48z^2+12)}{24}|x^4 \leq 0.005$

there is a reason i brought |x^4| = x^4 out of the remainder term. if we can find some global maximum for the rest, then the remainder will only depend on the value of |x|.

we can simplify a bit:

$|e^{-z^2}(4z^4 - 12x^2+3)|x^4 \leq 0.03$

now, let's look at the expression inside the absolute value sign, we would like to find an upper bound for it. if

$g(z) = e^{-z^2}(4z^4 - 12z^2 + 3)$ then

$g'(z) = -e^{-z^2}(-2z)(4z^4 - 20z^2 + 15)$

note that for g'(z) = 0, either z = 0, or z is a solution to $4z^4 - 20z^2 + 15$, which is a quadratic in $z^2$.

the solutions to this quadratic are:

$z^2 = \frac{5 \pm \sqrt{10}}{2}$

as z goes to plus or minus infinity, eventually the exponential term dominates, so:

$\lim_{z \to \pm \infty} g(z) = 0$

so the global maximum for |g(z)| is one of the roots of g'(z). g(z) is an even function, so it suffices to check the 3 non-negative roots of g'(z).

g(0) = 3 (well, that was easy).

at $z = \sqrt{\frac{5-\sqrt{10}}{2}}$, we get:

$g(z) \approx (0.39898)(-4.64911) = -1.8549019078$

at $z = \sqrt{\frac{5+\sqrt{10}}{2}}$,

$g(z) \approx (0.01689)(118.596) = 2.00308644$

so |g(z)| has a global maximum of 3 at 0.

so: $|e^{-z^2}(4z^4 - 12x^2+3)|x^4 \leq 3x^4$

so in order to ensure $3x^4 \leq 0.03$ choose

$x^4 \leq 0.1 \implies |x| \leq \sqrt[4]{0.1} \approx 0.316228$

(there might be an easier way....feel free, people).

3. ## Re: Taylor Series Error Estimation

Thanks very much for the thoughtful response. I wouldn't have figured that out on my own. I have two questions for you.

First, on my work, you said that the series alternates. Since x is raised to an even power, doesn't that make the series always positive? Am I missing how to apply that minus sign? Does it stay outside of the exponential?

Second, at the very end of your reply, did you drop a decimal place? You went from $3x^4 \leq 0.03$ to $x^4 \leq 0.1$. Did you mean $x^4 \leq 0.01$ or am I overlooking something?

Thanks again!