I am curious about the following question:
Suppose $f:\Re^n\to \Re$ is continuously differentiable (i.e., it has continuous gradient). Then for each $M>0$ and each $k=1,2,\dots, n$, we can find a sequence of polynomials $\{p^k_m\}_{m\in\mathbb N}$ such that $p^k_m$ converges to $f_k$ uniformly on $[-M,M]^n$, according to Stone-Weierstrass theorem.
I was wondering if it is possible to properly choose those polynomials such that there exists a sequence of functions $\{g^m\}_{m\in\mathbb N}$ such that $g^m:\Re^n\to\Re$, $g^m$ converges to $f$ (pointwise or uniformly), and $$\nabla g^m=(p^1_m, p^2_m, \dots, p^n_m)^T.$$
Could anyone give me some hint or reference? Many thanks!