Is $\{\phi \in \mathcal C ([0,1], \mathbb R) \mid \forall k \in\mathbb N^+:\int^1_0 x^k\phi(x) =0\}$ a singleton? Let $$A=\{\phi \in \mathcal C ([0,1], \mathbb R) \mid \forall k \in\mathbb N^+:\int^1_0 x^k\phi(x) =0\}$$
Clearly, the function $[0,1] \to \mathbb R, \, x \mapsto 0$ belongs to $A$. I would like to ask if $A$ contains any other element.
Thank you so much for your help!
 A: Let $g(x)=x\phi(x)$. Then $\int_0^{1} x^{k} g(x)dx=0$ for $k=0,1,2...$. Using Wierstrass approximation it follows that $\int_0^{1} g(x)^{2} dx=0$ so $g(x)=0$ for all $x$. Hence $x\phi(x)=0$ for all $x$. This gives $\phi (x)=0$ for $x \neq 0$ but continuity gives $\phi(0)=0$. 
A: Suppose $\phi\in A$. Let $K>0$ be such that $|\phi(x)|\leq K$ for each $x\in[0,1]$ (Weierstrass). Fix $\varepsilon>0$ and find a polynomial $$p(x)=a_0+a_1 x+\cdots+a_n x^n\quad\text{for each $x\in[0,1]$},$$ where $n$ is a non-negative integer, such that $$|\phi(x)-p(x)|<\frac{\varepsilon}{K}\quad\text{for each $x\in[0,1]$}$$ (another Weierstrass). Then,
\begin{align*}
\int_0^1\phi(x)^2\,\mathrm dx&=\int_0^1\phi(x)[\phi(x)-p(x)]\,\mathrm dx+\underbrace{\int_0^1\phi(x)p(x)\,\mathrm dx}_{=0}\\
&\leq\left|\int_0^1\phi(x)[\phi(x)-p(x)]\,\mathrm dx\right|\\
&\leq\int_0^1|\phi(x)||\phi(x)-p(x)|\,\mathrm dx\leq K\frac{\varepsilon}K=\varepsilon.
\end{align*}
Since $\varepsilon>0$ can be arbitrarily small, it follows that $$\int_0^1\phi(x)^2\,\mathrm dx=0.$$ Exploit continuity and you’re done.

UPDATE: If it is not assumed that $\int_0^1\phi(x)\,\mathrm dx=0$ (that is, if $\mathbb N^+$ is taken to be $\{1,2,3,\ldots\}$, excluding $0$), then replace $\phi$ with $\widehat\phi$ in the proof above, where $\widehat\phi(x)=x\phi(x)$ for $x\in[0,1]$. The conclusion is that $\widehat\phi$ is identically zero and the proof can be finished as suggested in Kavi Rama Murthy’s answer.
