0
$\begingroup$

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?

$\endgroup$
2
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ Thank you for your answer. As I'm new to the idea of Lagrange error, don't we have to use the fourth degree to estimate error in this case because of the fact that the fourth derivative could be bigger than 0 for all x > 0? $\endgroup$ – rb612 Apr 9 '17 at 1:04
  • $\begingroup$ Edited my answer to hopefully address this question. $\endgroup$ – user433011 Apr 9 '17 at 1:28
1
$\begingroup$

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)|)$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.