If $\int_{\Omega} (f(x)\varphi(x) +g(x)\varphi^{\prime}(x)) dx=0$, what it can be said about $f(x)$ and $g(x)$? Let $\Omega$ be an open bounded domain and let $\varphi\in C^{\infty}_c(\Omega)$. Let $f, g:\Omega\to\mathbb{R}$ be two smooth functions. Consider the equation
$$\int_{\Omega} (f(x)\varphi(x) +g(x)\varphi^{\prime}(x)) dx=0.$$
My question is: there is relation between $f(x)$ and $g(x)$? It is true that $f(x)=g(x)=0$ a.e.?
About me the answer to the last question is no. Firstly, since $\varphi\in C^{\infty}_c(\Omega)$, thus so it is $\varphi^{\prime}$. Moreover, I think that we can only say that $f(x)=-g(x)$ a.e. and they have not to be necessarily $0$.
Could someone please tell me if am I wrong and/or help me to answer also the first question?
Thank you in advance!
 A: It follows from Green's first identity (the higher dimensional equivalent of integration by parts), that
$$ \tag{$*$}
\int_{\Omega} (f(x)\varphi(x) +g(x)\varphi^\prime(x)) dx = \int_{\Omega} (f(x) -g^\prime(x))\varphi(x) dx = 0\, .
$$
This is for example satisfied if the support of $f-g^\prime$ and the support of $\varphi$ are disjoint. So one can not conclude much about $f$ and $g$ if $(*)$ holds for some $\varphi\in C^{\infty}_c(\Omega)$.
But if $(*)$ holds for all test functions $\varphi\in C^{\infty}_c(\Omega)$ then necessarily $f-g^\prime = 0$.
Explanation of $(*)$: Choose $U \subset \Omega$ such that the support of $\varphi$ is contained in $U$. Then
$$
\int_\Omega (g(x)\varphi'(x) - g'(x) \varphi(x)) \, dx
= \int_U(g(x)\varphi'(x) - g'(x) \varphi(x)) \, dx\\
= \int_{\partial U} g(x) \varphi(x) \cdot \mathbf{n} \, dS = 0
$$
since $\varphi$ vanishes on the boundary and outside of $U$.
A: Another way to prove this would be distribution-theory.
$\int_{\Omega}g(x)\varphi'(x) \,dx =  -\int_{\Omega}g'(x)\varphi(x) \,dx\: \forall  \varphi(x) \in \mathscr{C}^{\infty}_c$
where by g' I mean the "distributional-derivative".
Then we get that
$\int_{\Omega}f(x)\varphi(x) \,dx = \int_{\Omega}g'(x)\varphi(x) \,dx$ 
This means precisely that f and g' are equal in "the distributional sense".
If we assume that $f,g' \in L^{1}_{loc}$ then we can apply the fundamental lemma of calculus of variations.
See Proof of fundamental lemma of calculus of variation.
And get $f(x) = g'(x)$ almost everywhere.
So you see that smoothness of $f,g$ is a very strong assumption that is not needed at all.
(P.S: I deleted the earlier post because I missed the prime over $\varphi$ there)
