$C^1$ functions have weak derivatives How can one prove, for $\Omega \subseteq \mathbb{R}^n$ open:

$f \in C^1 \implies$ $\partial_i f$ are the weak derivatives of $f$, $i=1,...,n$?

I think one should use the divergence theorem for $C^1$ functions. However, this may not be a completely trivial thing, because the divergence theorem applies to smooth enough boundaries.
The proof I have in mind goes like this:

*

*fix $\phi \in C^\infty_0(\Omega)$, let $K \subset \subset \Omega$

*find an open set $V$ with smooth enough boundary, with $K \subseteq V \subseteq \Omega$

*apply the divergence theorem: $$\int_\Omega \phi \partial_ifd x=\int_V \phi \partial_ifd x=\int_{\partial V}\phi f \nu_id\sigma-\int_V \partial_i \phi f d x=-\int_V \partial_i \phi f d x=-\int_\Omega \partial_i\phi fd x$$
Problems: what is smooth enough? Can I, and how do I find such a $V$?
 A: How to find such $V$? Consider the function
$$
g(x) = \frac{d(x,K)}{d(x,K)+d(x,\Omega^c)},
$$
where $d(x,A)$ denotes the distance from $x$ to $A$. One could define the intermediate open set $K \subseteq V \Subset \Omega$ as $V = \{ x : g(x) < \frac 12 \}$, but it wouldn't necessarily be smooth.
To fix this, consider a smooth approximation $g_\varepsilon$ (e.g., given by convolution) and let $V_t := \{ x : g_\varepsilon(x) < t \}$. Again, $K \subseteq V_t \Subset \Omega$ for $t$ close to $\frac 12$. But now, Sard's theorem implies that $\partial V_t = g^{-1}(t)$ is smooth for almost all $t$, so one can choose the right value for $t$.
$\newcommand{\dd}{\,d}$

Why is it unnecessary?

*

*For each ball $B_r(x) \subseteq \Omega$, the classical derivatives $\partial_i f$ are also weak derivatives (the set is smooth, so there's no problem in integrating by parts). Since being a weak derivative is a local notion (which is seen by partition of unity) and $\Omega$ is covered by such balls, the same is true for the whole $\Omega$.

*If we insist on a direct argument, let us mimic the proof of the divergence formula. Pick any $\varphi \in C_c^\infty(\Omega)$. Aiming at the equality
$$
\int_\Omega \partial_i f \varphi \dd x = - \int_\Omega f \partial_i \varphi \dd x,
$$
let us denote $I(x_1,\ldots,\hat{x_i},\ldots,x_n) = \{ t \in \mathbb{R} : (x_1,\ldots,t,\ldots,x_n) \in \Omega \}$ - the slice of $\Omega$ given by fixing all coordinates except $x_i$. For simplicity, denote the vector of these $n-1$ coordinates by $x'$ and identifiy $(x_1,\ldots,x_i,\ldots,x_n)$ with $(x',x_i)$. Then by Fubini:
\begin{align*}
\int_\Omega \partial_i f \varphi \dd x + \int_\Omega f \partial_i \varphi \dd x
& = \int_\Omega \partial_i (f(x) \varphi(x)) \dd x \\
& = \int_{\mathbb{R}^{n-1}} \int_{I(x')} \partial_t (f(x',t) \varphi(x',t)) \dd t \dd x' \\
& = \int_{\mathbb{R}^{n-1}} \left[ f(x',t) \varphi(x',t) \right]_{\partial I(x')} \dd x' \\
& = \int_{\mathbb{R}^{n-1}} 0 \dd x' = 0.
\end{align*}
For each $x' \in \mathbb{R}^{n-1}$, we only deal with a $1$-dimensional slice $I(x')$, and since $\varphi$ has a compact support, the function $f \varphi$ is identically zero in a neighborhood of $I(x')$. This is why everything vanishes.

