TITLE: What is the right way to approximate $e^{-1/x^2}$ by polynomials?
QUESTION [8 upvotes]: 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}$

REPLY [2 votes]: 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".