# Variation of the fundamental lemma of calculus of variation

Let $$C^1_0[a,b]:=\{f \ C^1[a,b]|f(a)=f(b)=0\}.$$ Providing $C^1_0[a,b]$ is dense in $L^2[a,b]$, I want to prove the following statement:

if for $g,h\in L^2[a,b]$,

$$\int_a^b g \phi \,dx =\int_a^b h \phi \,dx$$ for all test functions $\phi\in C^1_0[a,b]$,

then $g = h$ almost everywhere.

It seems to be similar with fundamental lemma of calculus of variation, how can I extend the the result to $L^2$ functions? My guess is using density argument, along with one of convergence theorems, but I failed to construct the proof.

You can do this abstractly. Show that the orthogonal complement of $g-h$ is the whole $L^2$ space. By Hilbert space theory this implies that $g-h$ is the null vector, that is, $g=h$ almost everywhere.
Since $g-h$ is orthogonal to all $\phi \in C^1_0[a,b]$, so $g-h$ is orthogonal to $\bar{C^1_0[a,b]}=L^2[a,b]$? Is that correct? –  newbie Dec 18 '12 at 0:38