# How do I determine the interval over which my error calculation should be conducted?

I've been instructed to find the values of x for which the function $$f(x) = e^{-2x}$$ may be approximated by the Maclaurin series $$1-2x+2x^2-\frac{4}{3}x^3$$ with an error of less than 0.001, but no interval is given.

How should I choose my interval so as to appropriately calculate $$\max|f^{(4)}|$$?

You have to work backwards essentially, of course you can find an expression for $$f^{(4)}$$. Once this is done, you should find the requirement on $$x$$ such that so that the error term $$\frac{f^{(4)}(\xi)x^4}{4!}$$ is less than $$0.001$$ in absolute value. It will be of the form $$|x|<\delta$$ for some $$\delta>0$$.

So what is $$f^{(4)}(x)$$?

$$f^{(4)}(x) = 16 e^{-2x}$$.

How do we bound this? We will have some negative $$x$$, so we are forced to say that $$\max f^{(4)}(x) = 16e^{2\delta}$$ on our symmetric interval $$|x|<\delta$$.

So whenever $$|x|<\delta$$, $$\frac{|f^{(4)}(\xi)||x^4|}{4!} < \frac{16e^{2\delta}\delta^4}{24}$$. For this to be less than $$0.001$$, that's the same as asking for $$e^{2\delta}\delta^4 \leq 0.0015$$. We know it will be increasing, so we can just solve $$e^{2\delta}\delta^4 = 0.0015$$, which gives $$\delta>0.17$$, so $$\delta = 0.17$$ will do the trick.

• But in the Lagrange error bound, to maximize error it is $\max |f^{(4)}|$ which is what I think OP is asking about – Andrew Li Apr 22 at 1:06
• In this case, $f^{(4)}(0)=16$, which gives a $\delta$ that's a little too narrow – HandsomeGorilla Apr 22 at 1:06
• Yeah good point I will put some stuff on this. – George Dewhirst Apr 22 at 1:10
• @GeorgeDewhirst I don't think that's quite right. Here's a plot I developed in desmos that shows an interval which is substantially larger. I'm not sure what to make of this. – HandsomeGorilla Apr 22 at 12:56
• So your interval is $\delta = 0.2$ that's not that different – George Dewhirst Apr 22 at 15:55