TITLE: Taylor polynomial: the higher the degree, the better the approximation?
QUESTION [8 upvotes]: Let $f$ be an infinite times differentiable function. Is it true that:
  the higher the degree $n$ of the Taylor polynomial $T_{n,f,x_0}$ of $f$ around $x_0$, the better the approximation?

Some thoughts. Given $n$, polynomial $T_{n,f,x_0}$ is the best approximation of $f$ near $x_0$ that fulfils the requirement of equal derivatives with $f$ at $x_0$. So regarding polynomials of degree  at most $n$, $T_{n,f,x_0}$ is the winner. 
On the other hand, although one would like $T_{n,f,x_0}$ to fit better function $f$, as $n$ grows larger, it seems to me that there is no reason for this to happen. Of course, one should define what "fit better" means. In our case, it would be something like:
$$\sup_{x\in I}|T_{n+1,f,x_0}(x)-f(x)|\leqslant \sup_{x\in I}|T_{n,f,x_0}(x)-f(x)|$$
in a neighborhood $I$ of $x_0$.
Of course, I must admit that the cases I see graphically most of the times, fulfill the last requirement, by fitting better and better the graph of $f.$ 
Thank in advance for the help.

REPLY [2 votes]: I thought I would contribute another answer. This is on the problem of showing that even for an analytic function, there may be no $r>0$ such that $|f-T_{n}|\le|f-T_{n-1}|$ holds in $(-r,r)$ for all $n.$
Let $E=\{2,4,6,\dots\}.$ For $n\in E,$ define the polynmials
$$p_n(x) = \frac{x^n}{n^n}-\frac{x^{n+1}}{n^{n-1}}.$$
Now set $f(x)= \sum_{n\in E} p_n(x).$ This $f$ equals a power series convergent everywhere in $\mathbb R.$
Claim: For $n\in E,$ $|f(1/n)-T_{n-1}(1/n)| < |f(1/n)-T_{n}(1/n)|.$
Corollary: If $r>0,$ then $|f-T_{n}|\le|f-T_{n-1}|$ fails somewhere in $(-r,r)$ for all even $n>1/r.$
Lemma: For $n\in E,$
$$\tag 1\sum_{k=1}^{\infty}|p_{n+2k}(1/n)|<\frac{2}{n^{2n}}\frac{1}{n^4}\frac{1}{1-1/n^4}$$
Proof: For each $k$ we have
$$|p_{n+2k}(1/n)| \le \frac{(1/n)^{n+2k}}{(n+2k)^{n+2k}} + \frac{(1/n)^{n+2k+1}}{(n+2k)^{n+2k-1}} $$ $$< \frac{1}{n^{n+2k}}\frac{1}{n^{n+2k}} + \frac{1}{n^{n+2k+1}}\frac{1}{n^{n+2k-1}} = \frac{2}{n^{2n+4k}}.$$
Now sum over $k$ and recognize the geometric series to get the right side of $(1).$
Proof of claim: Note that
$$f(1/n)-T_{n-1}(1/n) = p_n(1/n) +p_{n+2}(1/n) + \cdots.$$
Now $p_n(1/n)=0.$ (That's why I chose the power series the way I did!) From the Lemma we then see
$$\tag 2 |f(1/n)-T_{n-1}(1/n)| < \frac{2}{n^{2n}}\frac{1}{n^4}\frac{1}{1-1/n^4} < \frac{2}{n^{2n}}\frac{1}{16}\frac{16}{15} = \frac{2}{15}\frac{1}{n^{2n}}.$$
On the other hand,
$$f(1/n)-T_{n}(1/n) = -\frac{(1/n)^{n+1}}{n^{n-1}} +p_{n+2}(1/n) + \cdots.$$
Thus, using the Lemma again,
$$ |f(1/n)-T_{n}(1/n)| \ge \left|\frac{(1/n)^{n+1}}{n^{n-1}}\right| -|p_{n+2}(1/n)| - |p_{n+4}(1/n)| - \cdots $$ $$\ge \frac{1}{n^{2n}} -\frac{2}{n^{2n}}\frac{1}{n^4}\frac{1}{1-1/n^4}$$ $$\tag 3\ge\frac{1}{n^{2n}} -\frac{2}{15}\frac{1}{n^{2n}}=\frac{13}{15}\frac{1}{n^{2n}}.$$
Thus $(2)<(3)$ and the claim is proved.