My Question
Let $\{g_k\}$ be a sequence of continuous real-valued functions on $[0,1]$. Assume that there is a number $M$ such that $|g_{k}(x)|\leq M$ for every integer $k$ and every $x\in [0,1]$ and also that there is continuous real-valued funtion $g$ on $[0,1]$ such that
$\int_0^1 g_k(x)p(x) \ dx \rightarrow \int_0^1 g(x)p(x) \ dx$ as $k \rightarrow \infty$ for every polynomial $p$. Proved that $|g(x)|\leq M$ for every $x\in[0,1]$.
Remarks
(Note that the two bounds are the same and is $M$)
This is what I have done so far.
Suppose it is not true, that is there exists a $x_0 \in [0,1]$ such that $|g(x_0)|>M$, then by the continuity of $g$ at $x_0$, there will be an interval $(x_0-\delta, x_0+\delta)$ such that $|g(x)|>M$ for all $x\in (x_0-\delta, x_0+\delta)$. Then take note that it is possible to have a non-negative continuous function $\phi$ such that it is zero outside the interval $(x_0-\delta, x_0+\delta)$ and the integral $\int_{x_0-\delta}^{x_0+\delta} \phi(x)\ dx$ is one.
Then by Weierstrass Approximation Theorem, we know that
$\int_0^1 g_k(x)\phi(x) \ dx \rightarrow \int_0^1 g(x)\phi(x) \ dx$ as $k \rightarrow \infty$ and I managed to obtained a contradiction by assuming $g(x_0)>0$, but I am lost with all the inequalities for the other case. I hope someone can help me with this, perhaps we do not need any Weierstrass approximation theorem, for that I am not sure.
Thanks