From the Fundamental lemma of calculus of variations we know the following:
Let $u \in L_{loc}(a,b)$ and for every $\phi \in C_0^\infty$, $$\int_a^b u(x) \phi(x) dx = 0$$ holds, then $u(x) = 0$ almost everywhere.
From that I need to prove the following Corollary:
Let $u \in L_{loc}(a,b)$ and for every $\phi \in C_0^\infty$, $$\int_a^b u(x) \phi'(x) dx = 0$$ holds, then $u(x) = C$ almost everywhere, for a constant $C$.
My start was to performe integration by parts, $$0 = \int_a^b u(x) \phi'(x) dx = \int_a^b u'(x) \phi(x) dx \ \forall \phi \in C_0^\infty \ .$$ Now the Fundamental lemma gives that $u'(x) = 0$ almost everywhere and therefore $u(x)$ is constant almost everywhere. But this idea has two shortcommings:
First, $u(x)$ doesn't even need to have a weak derivative, nor a normal derivative, therefore it is unclear why an integration by parts should be possible at all.
Second, it only shows that $u(x)$ is constant almost everywhere, not that it is equal to (the same) constant almost everywehre.
So I think I am on the wrong track, anyone got a hint?