If $f,g_j\in\mathcal{C}(U)$ and $\frac{\partial f}{\partial x_j}=g_j$ weakly $\Rightarrow$ $f\in\mathcal{C}^1(U)$ Let $U$ be an open subset of $\mathbb{R}^n$ and let $f,g\in \mathcal{C}(U)$. If $$\frac{\partial f}{\partial x_j}=g$$ for some $j$ $(j=1,\ldots,n)$ in the sense of distributions, how to prove that $$\frac{\partial f}{\partial x_j}=g$$ in the classical sense.
Any hint would be appreciated.
 A: We know that $L^1_{loc}(\Omega) \subset \mathcal{D}'(\Omega)$ in the sense that every function $f \in L^1_{loc}(\Omega)$ determine a distribution $T_f(\varphi) := \int_{\Omega} f(x) \varphi(x)dx$ for every $\varphi \in \mathcal{D}(\Omega)$.
In this sense we have the weak derivative is by definition the restriction $\partial_j : L_{loc}^1(\Omega) \rightarrow \mathcal{D}'(\Omega)$ of the distributional derivative $\partial_j : \mathcal{D}'(\Omega) \rightarrow \mathcal{D}'(\Omega)$. Now, your problem is a result known as equivalence between classical and distributional derivatives:
"Let $T \in \mathcal{D}'(\Omega)$ and let $G_j$ the distributional derivative $\partial_j T$ for $j \in \lbrace 1,...,n \rbrace$. Then the following conditions are equivalent:


*

*$T$ is a function $f \in C^1(\Omega)$

*$G_j$ is a function $g_j \in C(\Omega)$


In each case $g_j= \partial_j f$ is the classical derivative of $f$." 
See "Analysis" of Lieb and Loss, proof of 2. implies 1. it's not immediate.
A: HINT:
Let's do first the $1$-dimensional case. Let $f$, $g$ be continuous functions on the open interval $I$ so that $f'=g$ in the distributional sense, that is, for every $\phi$ smooth on $I$, with compact support, we have 
$$-\int_I f \cdot \phi' = \int_I g \cdot \phi$$
Let $f_1$ an antiderivative of $g$, calculated as $f_1(t) = c + \int_{t_0}^t g(s) ds$. $f_1$ is $C^1$ and $f_1'= g$ in the classical sense, therefore, also in the distributional sense ( by Leibniz-Newton)
$$-\int_I f_1 \cdot \phi' = \int_I g \cdot \phi$$
We conclude that 
$$\int_I (f-f_1) \cdot \phi' =0$$
for all $\phi \in C^{\infty}_0(I)$. 
We want to show that the above implies that the function $h \colon = f - f_1$ is constant.
Now, it is not hard to see that for every $\psi  \in C^{\infty}_0(I)$ such that $\int_I \psi = 0$ there exists (a unique ) $\phi\in C^{\infty}_0(I)$ so that 
$$\phi' = \psi $$.
Fix now a function $\chi_0 \in C^{\infty}_0(I)$ so that $\int_I \chi_0 = 1$ ( say a bump function). Now  for every $\phi\in C^{\infty}_0(I)$ there exists $\phi\in C^{\infty}_0(I)$ so that
$$\psi = \left( \int_I \psi \right )\cdot \chi_0 + \phi'$$
Integrating against $h$ we get 
$$\int_I h \psi = \int_I h \chi_0 \cdot \int_I \psi$$
Denoting by $c \colon = \int_I h \chi_0$
we get from the above 
$$\int_I ( h - c \cdot 1) \psi = 0$$
for all $\psi\in C^{\infty}_0(I)$. We conclude that $h \equiv c$, a constant.
