I'm going through a question checking that an inner product satisfies the inner product axioms. I have a Hilbert space $H=C[-1,1]$ and for $f,g\in H$ the inner product is defined as
$\langle f,g\rangle =\int_{-1}^{1}f(x)g(x)x^2dx$
To check that $\langle f,f\rangle=0$ if and only if $f(x)=0$ for all $x$ the solution says
"If $\int_{-1}^{1}|f(x)|^2x^2dx=0$ it follows that $|f(x)|^2x^2=0$ everywhere on $[-1,1]\backslash \{0\}$, as $|f(x)|^2x^2$ is a continuous function."
Then by continuity $f(0)=0$ and $f$ vanishes everywhere.
I don't understand why "$|f(x)|^2x^2=0$ everywhere on $[-1,1]\backslash \{0\}$". Could someone explain this to me? Thanks