If $f$ is continuous on $[0,1]$ and if $\int_0 ^1 f(x) x^n dx = 0$ for $n=0,1,2,3,\cdots$; then prove or disprove $\int _0 ^1 f^2(x) dx = 0$
Attempt: $\int_0 ^1 f(x) x^n dx = 0$ for $n=0,1,2 \cdots \implies \int_0 ^1 f(x) dx = 0 $.
Using Bi Parts rule :
$\int _0 ^1 f^2(x) dx = \int _0 ^1 f(x) f(x) dx = |_0^1f(x) \int f(x) dx - \int [ \int f(x) dx . f'(x) ]dx$
Since, $\int_0 ^1 f(x) dx = 0 \implies $ the above expression reduces to $0$.
Is my attempt correct?
Somehow, I feel that I might be making a blunder as I haven't even used the continuous nature of $f$ given in the problem. Please help me move towards the correct solution.
Thank you.