While it is not possible to approximate any function with polynomials on the entire real line, I am wondering if there are modified conditions under which the approximation is possible. Consider $f \in C([0, \infty))$ such that $ f(x) \rightarrow 0$ as $x\to\infty$. Is it true that for any $\epsilon >0$ we can find a polynomial $p(x)$ such that $$\left\vert f(x) - e^{-x}p(x) \right\vert < \epsilon \quad \forall x \in [0, \infty)$$
I suspect the answer is no, because $p$ effectively approximates $f$ on any compact interval but $e^{-x}p(x)$ doesn't have to be small outside said interval. However, I can't find a counter example.