Let $f$ be a continuous real valued function on $[0,1]$ and $\int_0^1f(x)x^ndx = 0$ for $n = 0,1,2...$ Prove that $f$ is identically zero on $[0,1]$
This question was a part of a Topology exercise, but I cannot understand what relation it has to Topology. It seems like a real analysis question, where I integrate by parts (?) and show $f=0$ is required for the question to hold. But how to solve this from a topological perspective?
Unless I am understanding the "Prove that $f$ is identically zero on $[0,1]$" part wrong (?)
It follows from your hypothesis that, for each polynomial function $P$, $\int_0^1f(x)P(x)\,\mathrm dx=0$. But, by the Weierstrass approximation theorem, there is a sequence $(P_n)_{n\in\mathbb N}$ of polynomial which converges uniformly to $f$. Therefore, $\int_0^1f^2(x)\,\mathrm dx=0$. And now it follows from the continuity of $f$ that $f$ is the null function.