# What locally integrable function $f$ satisfies $\int_a^ b f(x) \phi'(x)dx=0$ for each $\phi \in C_0^\infty(a,b)$

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.

-
Let $\mathcal{H}$ be the class of locally integrable functions satisfying given property. Then show that $C^{\infty} \cap \mathcal{H} \subset \mathcal{H}$ is dense in some sense. For instance, the metric $$\rho( f, g) = \sum_{j} 2^{-j} \frac{\| f - g \|_{L^1 (I_j)}}{1 + \| f - g \|_{L^1 (I_j)}},$$ where $\{ I_j \}$ is a countable family of closed subintervals of $(a, b)$ whose union is equal to $(a, b)$, will be an appropriate choice. Since $C^{\infty} \cap \mathcal{H}$ only consists of constant functions, the result follows. –  Sangchul Lee Feb 7 '12 at 11:25
@sos440 You can put your comment as an answer since it solves the problem. –  Davide Giraudo Feb 7 '12 at 12:04

Let $\theta\in C_0^{\infty}(a,b)$ such that $\int_{(a,b)}\theta(t)dt=1$. Then for a fixed $\varphi\in C_0^{\infty}(a,b)$, we put $A\varphi(x)=\int_a^x\varphi(t)dt-\int_a^x\theta(s)ds\int_a^b\varphi(t)dt$. Then $A\varphi\in C_0^{\infty}(a,b)$ and $(A\varphi)'=\varphi(x)-\theta(x)\int_a^b\varphi(t)dt$ so $$0=\int_{(a,b)}f(x)(A\varphi)'(x)dx=\int_{(a,b)}f(x)\varphi(x)dx-\int_{(a,b)}\int_a^b\varphi(t)dt\theta(x)f(x)dx,$$ hence $$\forall \varphi\in C_0^{\infty}\quad \int_{(a,b)}f(x)\varphi(x)dx=C\int_a^b\varphi(x)dx,$$ where $C=\int_{(a,b)}f(x)\theta(x)dx$. Hence $f$ is almost everywhere constant.