Let $f:(a,b) \rightarrow \mathbb{R}$ be locally integrable and such that \int_a^ b f(x) \phi'(x)dx=0 \textrm{ for each } \phi \in C_0^\infty(a,b). How to show, without help of distribution theory, that $f=const$ a.e.?
I noticed that every constant functions $f=c$ satisfies this condition, because for $\phi \in C_0^\infty(a,b)$ we have $\phi(a)=\phi(b)=0$ and \int_a^b c\phi'(x)dx=c\phi(b)-c\phi(a)=0.
I know also that similar condition $\int_a^ b f(x) \phi(x)dx=0 \textrm{ for each } \phi \in C_0^\infty(a,b)$ implies that $f=0$ a.e.
Thanks.