What is the right way to approximate $e^{-1/x^2}$ by polynomials? It's well known that $f(x) = e^{-1/x^2}$ (with zero added) is a smooth function that's not analytic at $x=0$, because every derivative at zero is zero, and so all of its Taylor polynomials are zero. For the sake of simplicity fix the center at zero for the rest of the question.
This function isn't all that pathological and it seems like there should still be a principled way to approximate it by polynomials by using some other natural data about $f$.
More concretely, what is a method for approximating a smooth function $f(x)$ by polynomials that has the following properties:


*

*Optimal by some natural criterion (analogous to how the degree-$k$ Taylor polynomial is optimal among degree $k$ polynomials on a sufficiently small interval)

*Graded, i.e. there is a parameter $n$ so that larger values of $n$ use higher-degree polynomials and improve the approximation.

*Efficiently computable, i.e., there is a $\text{poly}(n)$-time algorithm which constructs the polynomial representation from the input parameter of $n$

*Nontriviality for $e^{-1/x^2}$

 A: $$f(x) = e^{-\frac1{x^2}}$$ is in fact quite pathological at $x=0$:  If you look at the values of $f(it)$ (for real $t$) near $it=0$ you see not only an approach to infinity but an essential singularity.  By restricting your vision to the real line you can put on blinders to this singularity, but it is still there and it still affects any attempt to expand in series that demand analyticity. 
If you insist on a series of approximations that are good near $x=0$, then consider 
$$f_n(x) = \sum_{k=0}^n\frac1{k!}\left.\frac{d^k\left(e^{-\frac1{y^2}}\right)}{dx}\right|_{y=x}\left(x-\frac1n\right)^k
$$
This meets all your criteria.
A: Notice that as $x$ approaches $0$ along the imaginary axis, this function approaches $\infty$, so its bad behavior is close to home even if not on the real axis.
For every polynomial function $p(x)$ that is not identically $0$, there exists $\varepsilon>0$ such that for every $x$ within the neighborhood $(-\varepsilon,+\varepsilon)$ with the possible exception of $x=0$, the value of $p(x)$ is farther from $f(x)$ than $0$ is from $f(x)$.
Thus for any polynomial approximation to be better than the identically $0$ function, you'd have to have some other criterion of what is "better".
A: I think that the polynomial of best approximation fits your requirements.
If you fix an interval and a degree $n$, the polynomial you get is the polynomial of degree $n $ that minimizes $$\{\|f-p\|_\infty:\ p \ \text{ has degree } n \} .$$
