Let $f$ be a continuous function over $[0,1]$ and $\displaystyle \int_0^1 f(x)\,dx=0$. If for any positive integer $n$, $\displaystyle \int_0^1 x^{12+3n}f(x)\,dx=0$ then using Stone-Weiersterass Theorem prove that $f\equiv 0$ in $[0,1]$.
Since $f$ is contnuous on $[0,1]$ so by Stone-Weierstrass Theorem there exists a sequence of polynomials $\{p_n(x)\}_n$ which converges uniformly to $f$ on $[0,1]$. That is , $p_n\to f$ , implies $p_n(x)f(x)\to f^2(x)$ as $n\to \infty$, which implies that $\displaystyle \int_0^1p_n(x)f(x)\,dx \to \int_0^1 f^2(x)\,dx$. But from the given condition I can't say that $\displaystyle \int_0^1 f^2(x)\,dx =0$. So how to proceed to solve this problem ? Any hint. please.
The span of the monomials $\{1\} \cup \{x^{3n+12} : n\in\Bbb{N}\}$ is dense in $C[0,1]$ because $$\sum_{n=1}^\infty \frac1{3n+12} = \frac13 \sum_{n=1}^\infty \frac1{n+4} = \frac13 \sum_{n=5}^\infty \frac1n = +\infty$$
so the Müntz–Szász theorem gives the conclusion.
Now approximate $f$ by polynomials from $\operatorname{span}(\{1\} \cup \{x^{3n+12} : n\in\Bbb{N}\})$.