Suppose I have some nice infinitely differentiable function $f$. Lets denote by $T_{n,a}$ Taylor polynomial of $f$ at $a$ of order $n$.
$$T_{n,a}(x) = a_0+a_1(x-a)+a_2(x-a)^2+...+a_n(x-a)^n$$ where $$a_k = \frac{f^{(k)}(a)}{k!}$$
Am I right that Taylor polynomial does good job of approximating function $f$ only in the neighborhood of $a$?
According to Weierstrass theorem any continuous function on the closed interval $[a,b] $can be approximated as closely as desired by polynomial functions.
Suppose then $f(x) = b_0+b_1x+b_2x^2+...$ where right side is infinite sum given by Weierstrass theorem.
And by theorem right side approximates function $f$ very well on the whole interval $[a,b]$
If I wanted to find the coefficients $b_k$ I would proceed just like finding Taylor coefficients and I would find that $b_k = \frac{f^{(k)}(0)}{k!} $
But polynomial with coefficients $\frac{f^{(k)}(0)}{k!} $ is Taylor polynomial of $f$ at $0$.
So I dont understand does Taylor polynomial good job of approximating function $f$ in the neighborhood of $0$ or at the whole interval $[a,b]$?