Lagrange Error with Taylor series that includes $2n$?

192 Views Asked by At

For example, if asked to approximate the Lagrange error of the third degree Maclaurin of $f(x)=\sin(x)$, I would be examining:

$$P(x) = 1 - \frac{x^3}{3!}$$

So would I be examining:

$$f^{(4)}(z)\frac{x^4}{4!}$$

Or:

$$f^{(5)}(z)\frac{x^5}{5!}$$

I thought that I should use the former, as despite it having a fourth derivative of 0 at $x=0$, it will have some maximum value greater than zero on the interval when evaluating the error.

However, this answer seems to point that we can jump right over that term with a derivative of zero and so that would be supporting using the latter. So I'm wondering which one is right, and why?

2

There are 2 best solutions below

2
On BEST ANSWER

This depends. If $x$ is close to zero, then $\frac{x^5}{5!}$ is much smaller than $\frac{x^4}{4!}$.

If on the other hand, $x$ is very large, then it might better to use the fourth order estimate. Although, when $x$ is large, it's probably just a better idea to taylor expand about a point that's close to $x$, say $x_0$. Then the error terms will look like

$f^{(n)}(z)\frac{(x-x_0)^n}{n!}$ so that the $(x-x_0)^n$ term is again "small".

So, in summary, if your x value is "close" to the point you're expanding about, it will(for practical purposes) be better to take the higher order error estimate, since you get a smaller error bound for free here.

So, to answer your question, if x is sufficiently small, the 5th order estimate is much better.

Edit: To (hopefully) address your concern. In general, you would use the fourth order estimate. But notice that in this case, the expansion $x-\frac{x^3}{3!}$ is a fourth order expansion in disguise. Notice that the fourth derivative of $sin(x)$ is again $sin(x)$. So if we evaluate this at zero,

the fourth order term:

$f^{(4)}(0)\frac{x^4}{4!}$ ends up being zero, so you are free in this case to use the much better fifth order estimate instead, since the third and fourth order expansions for $sin(x)$ are actually the same.

0
On

You can use either one, because $x-x^3/3!$ is both an order 3 approximation and an order 4 approximation of $\sin x$ about $x_0=0$. Since $z$ can be any number between $0$ and $x$, it will take on different values for each $x$ chosen AND for each remainder term chosen, but the exact error can be found for SOME $z$ given any $x$.

However, if you are using the remainder term to calculate an error bound, then you can find the minimum of the two max error estimates to use for the bound. Formally, let $E_n(z,x) = f^{(n)}(z)\frac{(x-x_0)^n}{n!}$, then the total error $E(x) \leq min(max_z|E_4(z,x)|,max_z|E_5(z,x)|)$.