Many posts on this site address the following problem in the affirmative:
If $f:[0,1]\to \mathbb R$ is continuous and $\int_0^1 x^n f(x)dx=0$ for all positive integers $n$ then must $f\equiv 0$?
The standard proof is to first note that the product of $f$ and any polynomial integrates to zero, so that approximating $f$ by a polynomial using Weierstrass gives $\int f^2 = 0$.
My question is: what happens if we change the domain of $f$ to the open interval $(0,1)$ while still requiring continuity? Does there then exist a counterexample to the above statement?