I'm curious about the following argument in Morrey ("Multiple integrals in the calculus of variations", Lemma 2.3.1). Suppose $f\in L^1[0,1]$ and $$\int\_0^1 fg\,dx=0$$ for every test function $g\in C^\infty\_c[0,1]$. Then, "by approximations," the same is true if $g$ is merely bounded and measurable, in which case we may take $g=\mathrm{sign}(f)f,$ which implies $f=0$ almost everywhere. 


How exactly is one supposed to approximate? Certainly not in the $L^\infty$ norm because the closure of $C^\infty\_c[0,1]$ in this norm is not $L^\infty$ itself. Furthermore, $\mathrm{sign}(f)f$ need not be in $L^\infty$, so how does this argument work?



Proof of the du Bois-Reymond lemma "by approximation"
One way to run this argument is to note that you can approximate a bounded measurable function by $C^\infty\_c$ functions, almost everywhere and boundedly. That is, given a bounded measurable $h$, you can find a uniformly bounded sequence $g\_n \in C^\infty\_c([0,1])$ with $g\_n \to h$ almost everywhere. 


There are many ways to see this. For example, look up your favorite proof that $C^\infty\_c([0,1])$ is dense in $L^1([0,1])$. So you can find a sequence $g\_n \to h$ in $L^1$. Passing to a subsequence, you can get it to converge almost everywhere. Truncating smoothly at a level higher than $\sup |h|$, you can get the $g\_n$ to be uniformly bounded.


So then by the dominated convergence theorem, under the given assumptions, you can conclude that $\int f h = 0$ for all bounded measurable $h$. Now take $h = \operatorname{sign} f$, so that $fh=|f|$.


I suspect the reference to $\operatorname{sign}(f) f$ is a typo.


