An interpolating polynomial of degree 20 is to be used to approximate e−x on the interval [0, 2]. How accurate will it be? (Use 21 uniform nodes, including the endpoints of the interval. Compare results, using Theorems 1 and 2.)

The solutions from the textbook would be $4.105 × 10^−14 (Thm 1), 1.1905 × 10^−23 (Thm 2)$

theorem 2 theorem 1 First pic is thm 2 second pic is thm 1. Theorem 2 is not too hard to compute since e^-x to the 20th derivative is still e^-x so M the upper bound for that would be 1 for [0,2] interval as can be seen if plotted. Then i plug in n=20 to get the answer. How do i use the first theorem? I am confused about how to find ξ?

  • $\begingroup$ You don't find $\xi$, but find the value such that $|f^{(n+1)}(x)|$ is maximal for $x \in (a,b)$, e.g. you could say $|f^{(n+1)}(\xi)|< 1$ for this example. $\endgroup$
    – videlity
    Feb 12, 2018 at 4:44
  • $\begingroup$ alright got it! what about the capital pi product part eith (x-xi)? what values can i possibly plug in for x to xn? $\endgroup$ Feb 12, 2018 at 4:50
  • $\begingroup$ A bad estimate is $|\prod_{i=0}^n (x-x_i)|< 2^n$ since $x\in [0,2]$ and $x_i\in [0,2]$. Not sure if that would give you the answer though. $\endgroup$
    – videlity
    Feb 12, 2018 at 5:02
  • $\begingroup$ @jamesblack: It is looking like they got an incorrect result for Thm $1$. $\endgroup$
    – Moo
    Feb 12, 2018 at 5:33

1 Answer 1


Continuing from my comments. I actually made a mistake and should have said $|\prod_{i=0}^n (x-x_i)| < 2^{n+1}$. We want to find the maximum error for $n=20$, that is,

$$|f(x)-p(x)| <\frac{1}{(20+1)!}|e^{-x}|.2^{21}= \frac{2^{21}}{21!} = 4.105 \times 10^{-14}$$

  • $\begingroup$ That certainly agrees with the answer, but using the theorem, one can do much better as $$4.573568175141131 \times10^{-24}$$ $\endgroup$
    – Moo
    Feb 12, 2018 at 6:12
  • $\begingroup$ also, why is it absolute value instead of just -1? $\endgroup$ Feb 12, 2018 at 8:26
  • $\begingroup$ i got 1.19*10^-23 please explain how you got a even more precise answer? $\endgroup$ Feb 12, 2018 at 8:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .