I have that for any smooth (infinitely differentiable) function $f$ defined in $[a,b]$ and for a particular function $h \in L^2[a,b]$ the above equality holds:
$$\int_a^b h(x)f(x)=0$$
I get that intuitively, since this is true for any $f$, it must be the case that $h=0$ (almost everywhere). But how do I prove this more formally? Maybe supposing that there is some function $h$ which is not 0 almost everywhere and then getting to a contradicition.
I guess this is more or less trivial but I am not sure how to really convince myself of this. Thanks!
Here's a proof using Fourier series.
If the property is true of all indefinitely differentiable functions $f$, then it's true for the Fourier basis. That means, for all $n\in\mathbb Z$, $$c_n=\frac 1 {b-a} \int_{a}^be^{\frac {2i\pi}{b-a}nx}h(x)dx=0$$ In other words, the Fourier coefficients of $h$ are all $0$, which means, by Parseval's theorem that $$\int_a^b|h(x)|^2dx = \sum_{n\in\mathbb Z}|c_n|^2=0$$ Thus $h$ is zero almost everywhere.