I know thats the following statement is true.
$f,g$ are continuous function $[a,b]$.Suppose $\int\limits_a^bf(t)h(t)+g(t)h'(t) \, dt=0$ for every $h$ belonging to $C_0^{\infty}[a,b]$, then $g$ is differentiable and $\dot{g}(t)=f(t),\text{ }t\in[a,b] \text{ a.e.}$
Is the theorem also true for functions $f,g \in L^1[a,b]$ and can you give me a reference for it?