TITLE: Let $f : \mathbb{R} \to \mathbb{R}$ be approximated arbitrarily well by polynomials of bounded degree. Prove $f$ is a polynomial.
QUESTION [7 upvotes]: I am trying to prove that if a function $f : \mathbb{R} \to \mathbb{R}$ can be approximated arbitrarily well by polynomials of bounded degree, then $f$ itself must be a polynomial.
For starters, let $\{ g_m \mid g_m : \mathbb{R} \to \mathbb{R}\}_{m=1}^\infty$ be a sequence of polynomials with degree at most $d$ which uniformly converges to $f$. And let the coefficients of the $m$'th approximator be $a_{mn}$ so that $$
g_m(x) = \sum_{n=0}^d a_{mn} \, x^n.
$$
By "uniform convergence", I mean that given $\epsilon > 0$, there exists an $M_\epsilon$ such that for all $m \ge M_\epsilon$ we have $$
\sup_{x \in \mathbb{R}} |f(x) - g_m(x)| < \epsilon.
$$
Clearly, proving the claim is equivalent to proving that for each $n$ between 0 and $d$, the sequence of coefficients $a_{1n}, a_{2n}, \ldots$ converges to a some limiting value $a_n^*$.
However, it's not clear to me how to prove this statement. Any hints or guidance is greatly appreciated.

REPLY [2 votes]: Since $f$ is a uniform limit of polynomials (contiunous functions), in particular it is continuous.
Consider the space $C(\mathbb{R})$ of continuous functions $\mathbb{R} \to  \mathbb{R}$ and equip it with a family of seminorms $\|\cdot\|_{\infty, [a,b]}$ given by
$$\|g\|_{\infty, [a,b]} = \sup_{x\in[a,b]}|g(x)|$$
for all segments $[a,b] \subseteq \mathbb{R}$.
This turns $C(\mathbb{R})$ into a locally convex topological vector space.
Assume that $f$ can be uniformly approximated by polynomials $(p_k)_k$ of degree $\le n$.
The subspace $\mathbb{R}_{\le n}[x]$ of real polynomials of degree $\le n$ is a finite dimensional subspace of $C(\mathbb{R})$ and hence it is closed in $C(\mathbb{R})$. Since $p_k \to f$ uniformly on $\mathbb{R}$, in particular $\|f -p_k\|_{\infty, [a,b]} \to 0$ for all segments $[a,b] \subseteq \mathbb{R}$.
Hence $p_k \to f$ in the above topology so $f$ is in the closure of $\mathbb{R}_{\le n}[x]$. Since the subspace is closed, we conclude $f \in \mathbb{R}_{\le n}[x]$.