[Math] Misunderstanding the Taylor Remainder Theorem

calculustaylor expansion

I believe I am misinterpreting the Taylor Remainder theorem somehow. The Taylor Remainder theorem is (taken from Briggs 3rd ed Calculus: Early Transcendentals)

Let $f$ have continuous derivatives up to $f^{(n+1)}$ on an open interval $I$ containing $a$. For all $x$ in $I$,
$$f(x) = p_n(x) + R_n(x)$$
where $p_n$ is the $n$th-order Taylor polynomial for $f$ centered at $a$ and the remainder is
$$R_n(x) = \frac{f^{(n+1)}(c)}{(n+1)!}(x-a)^{n+1}$$
for some point $c$ between $x$ and $a$.

Suppose that my function is $f(x)=e^x$, $a$ is set to $0$, and that I'm considering the 2nd-order Taylor polynomial for $e^x$. Namely,
$$p_2(x) = 1+x +\frac{x^2}{2}$$
Then the remainder will be
$$R_2(x) = \frac{e^c}{3!}x^3$$

Here's where I think I might be messing up. If I consider the interval $(-5,5)$, which is an open interval containing $0$, where $f(x)$ is $(n+1)$-times differentiable, I am unable to come up with a $c$ where the function $e^x$ is identical to $1+x +\frac{x^2}{2}+\frac{e^c}{3!}x^3$ in the interval $(-5,5)$. Here is a link to a Desmos page where I tried to find such a $c$.

So I guess the main question here is this: Am I supposed to specify the interval $I$ from the beginning, or is the theorem stating that there is some interval $I$ containing $a$ where $f(x)=p_n(x)+R_n(x)$ for all $x\in I$? Or perhaps there's some other key idea that I'm missing here. Please let me know where I'm going wrong.

Best Answer

You need to specify the interval $I$, the function $f$, the degree $n$, the value of $a$, and (what's most counter-intuitive because of how often we use the symbol), we have to fix a value of $x \in I$. Only after you have specified all of these, the theorem tell you there exists a $c$ between $a$ and $x$ (it may be clearer if you call it $c_x$) such that \begin{align} R_{n,a}(x) = \dfrac{f^{(n+1)}(c_x)}{(n+1)!}(x-a)^{n+1} \end{align}

But of course, everything depends on a pre-chosen value for $x$. If you change $x \in I$, you will have to choose a different value for the $c$.


Edit:

Here's how I'd phrase the theorem (just adding in a few adjectives to make it explicit what is being fixed etc)

Let $I \subset \Bbb{R}$ be a given open interval, let $n \in \Bbb{N}$ be given, and let $f: I \to \Bbb{R}$ be a given $\mathcal{C}^{n+1}$ function. Fix a number $a \in I$; now we denote $P_{n,a,f}$ and $R_{n,a,f}$ to be the $n^{th}$ order Taylor polynomial for $f$ about the point $a$, and the $n^{th}$ order Remainder about the point $a$.

Now, fix a particular number $x \in I$. Then, there exists a number $c$ between $a$ and $x$ such that \begin{align} R_{n,a,f}(x) &= \dfrac{f^{(n+1)}(c)}{(n+1)!}(x-a)^{n+1}. \end{align}

Notice that the number $c$ in the theorem depends on several things: it depends on $f,n,a,x$, but of course, we don't explicitly mention all of these in the notation. It is pretty much only with practice that you'll be able to recognize which quantities depends on which.

Here's another way of phrasing the same theorem:

Let $I \subset \Bbb{R}$ be a given open interval, let $n \in \Bbb{N}$ be given, and let $f: I \to \Bbb{R}$ be a given $\mathcal{C}^{n+1}$ function. Then, for every $a \in I$ (we let $R_{n,a,f}$ mean the $n^{th}$ order Taylor remainder) and any $x \in I$, there exists $c \in I$, lying between $a$ and $x$, such that \begin{align} R_{n,a,f}(x) &= \dfrac{f^{(n+1)}(c)}{(n+1)!}(x-a)^{n+1}. \end{align}

The number of "for all"'s and "there exists" in quick succession may be confusing, but it is very important to recognize which is a bound variable and which is not. I think part of your confusion in the theorem stems from the fact that in the quoted theorem, the author has tried to give a definition of $R_{n,a}$ (namely $R_{n,a} := f - P_{n,a}$) in the same sentence as the actual conclusion of the theorem (which is the final formula for $R_{n,a}(x)$ in terms of $f,n,a,x$ and some number $c$).


Edit 2: Some Additional Remarks

Assuming you have understood my remarks above, let me address your 2nd last paragraph

"Here's where I think I might be messing up. If I consider the interval $(−5,5)$, which is an open interval containing $0$, where $f(x)$ is $(n+1)$-times differentiable, I am unable to come up with a $c$ where the function $e^x$ is identical to $1+x+\dfrac{x^2}{2}+ \dfrac{x^3}{3!}$ in the interval $(−5,5)$. Here is a link to a Desmos page where I tried to find such a $c$."

This is in fact not a coincidence. There is actually no such value of $c$. The proof that there is no single $c$ is actually a very simple proof by contradiction. Let us suppose for simplicity that the interval $I$ is the whole real line $\Bbb{R}$. Suppose, for the sake of contradiction, there exists a $c$, such that for all $x \in \Bbb{R}$ \begin{align} e^x &= \left( 1 + x + \dfrac{x^2}{2!} + \dots + \dfrac{x^n}{n!} \right) + \dfrac{e^c}{(n+1)!}x^{n+1} \quad \text{(for all $x \in \Bbb{R}$)} \tag{$\ddot{\smile}$} \end{align} Notice that the RHS is a polynomial, while the LHS is an exponential, hence can't be a polynomial. This is a contradiction.

If you want to be more explicit about where the contradiction lies, here's one approach: Suppose as a first case, that $n$ is even. Then, the RHS is a polynomial with odd degree; therefore it has a root (this is a simple exercise using the intermediate value theorem). However, the exponential function has no roots. This is a contradiction.

If on the other hand $n$ is odd, then the RHS will be an even degree polynomial. Now, since I wish to stay within the realm of real numbers and not invoke the fundamental theorem of algebra, here's a simple trick: let's integrate both sides of $(\ddot{\smile})$. Then, you'll find that \begin{align} \text{exponential} =\text{polynomial of odd degree} \qquad \text{(everywhere on $\Bbb{R}$)} \end{align} Thus, we're back to case 1. This completes the proof that there is no hope of finding a value of $c$ as you suggested.

Related Question