TITLE: Is it true that $\int_{a}^b h^2=0\implies h=0$?
QUESTION [5 upvotes]: I am working on a few examples where my author said this is true if $h$ is continuous. Can someone explain why? Just because the integral is $0$ doesn't mean the integrand is zero as well. 
$\int_{a}^b h^2=0\implies h=0$?

REPLY [9 votes]: If $h$ is a continuous, real-valued function and takes on a non-zero value in the interval $[a,b],$ then there is some interval $(c,d)\subset[a,b]$ in which $h$ is non-zero, so $h^2$ is positive. In particular, by choosing the interval $(c,d)$ with a little care, we can show that there is some $K>0$ such that $h^2>K$ on $(c,d),$ so that $$0<(d-c)K\le\int_c^dh^2\le\int_a^bh^2.$$ That last inequality is due to the fact that $h^2$ is a nonnegative function.

REPLY [3 votes]: Assuming $h$ is real, suppose that $h(x_0) \neq 0$ for some $x_0 \in (a,b)$. Then $h^2(x) > 0$. But if $h^2$ integrates to zero, and $h^2(x)$ is positive somewhere and continuous, then we must have $h^2(x) < 0$ for some $x$. Can you see the problem with it now?