# Checking axioms for inner product

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

-
The function is nonnegative and continuous. If it were positive on some point $a\in[-1,1]\setminus\{0\}$, then it would be positive on some open neighborhood of $a$, and the integral would necessarily be greater than $0$. – Arturo Magidin May 11 '12 at 20:22
Since $|f(x)|^2x^2$ is positive [ed: and continuous] on $[-1,1]$, if its integral vanishes, $f$ must be identically zero. – Neal May 11 '12 at 20:23
why is it $[-1,1]\backslash \{0\}$ rather than just $[-1,1]$? – 09867 May 11 '12 at 20:28
@09867: presumably because the equality at $0$ is obvious... – Arturo Magidin May 11 '12 at 20:40

1) The space $C([-1,1])$ is not a Hilbert space - just an inner product space.
2) Equality $x^2|f(x)|^2=0$ holds not only on $[-1,1]\setminus\{0\}$, but on whole inteval $[-1,1]$.
3) It is standard fact that for any continuous non-negative function $\varphi$ equality $\int\limits_{-1}^1\varphi(x)dx=0$ implies $\varphi(x)=0$ for all $x\in[-1,1]$. Since $x^2|f(x)|^2$ is continuous and non-negative we have the result mentioned in your question.
4) As for the proof of this standard fact it is very simple. Assume that for some $x_0\in[-1,1]$ we have $\varphi(x_0)>0$. Since $\varphi$ is continuous, there exist neighborhood $[a,b]$ containing $x$ such that $\varphi(x)>0.5\varphi(x_0)$ for all $x$ from this neighborhood. Then we have $$\int\limits_{-1}^1\varphi(x)dx\geq\int\limits_{a}^b\varphi(x)dx>\int\limits_a^b 0.5\varphi(x_0)dx=0.5\varphi(x_0)(b-a)>0$$ Contradiction, so $\varphi(x)=0$ for all $x\in[-1,1]$