[proofplan]
We compute $\partial_{x_i} u_\varepsilon$ in two ways and equate them. First, differentiation under the integral sign — justified by [Leibniz Integral Rule](/theorems/???) using the smoothness and compact support of $\eta_\varepsilon$ together with $u \in L^p_{\mathrm{loc}}$ — gives $\partial_{x_i} u_\varepsilon(x) = \int u(y)\, \partial_{x_i}\eta_\varepsilon(x-y)\, d\mathcal{L}^n(y)$. Next, the elementary identity $\partial_{x_i}\eta_\varepsilon(x-y) = -\partial_{y_i}\eta_\varepsilon(x-y)$ converts the derivative on $x$ into a derivative on $y$, allowing us to invoke the definition of the weak derivative of $u$ with test function $\eta_\varepsilon(x - \cdot)$. The smallness condition $\varepsilon < \operatorname{dist}(V, \partial\Omega)$ guarantees the test function is supported inside $\Omega$, which is the precise hypothesis needed to apply the weak derivative identity. The $W^{1,p}(V)$ convergence then follows from $L^p$ convergence of mollifications, applied to $u$ and to each weak derivative.
[/proofplan]
[step:Differentiate $u_\varepsilon$ under the integral sign]
Let $V \subset\subset \Omega$ be open with $\overline{V} \subset \Omega$, fix $\varepsilon < \operatorname{dist}(V, \partial\Omega)$, and let $\eta_\varepsilon \in C_c^\infty(\mathbb{R}^n)$ be the standard mollifier ($\operatorname{supp} \eta_\varepsilon \subseteq \overline{B}(0, \varepsilon)$, $\int_{\mathbb{R}^n} \eta_\varepsilon\, d\mathcal{L}^n = 1$). Extend $u$ by zero outside $\Omega$ if needed; for $x \in V$ and $y \in \overline{B}(x, \varepsilon)$, the assumption $\varepsilon < \operatorname{dist}(V, \partial\Omega)$ ensures $y \in \Omega$, so the convolution
\begin{align*}
u_\varepsilon: V &\to \mathbb{R} \\
x &\mapsto \int_{\mathbb{R}^n} u(y)\, \eta_\varepsilon(x - y)\, d\mathcal{L}^n(y) = \int_{B(x, \varepsilon)} u(y)\, \eta_\varepsilon(x - y)\, d\mathcal{L}^n(y)
\end{align*}
involves only the values of $u$ inside $\Omega$ and is well-defined.
To compute $\partial_{x_i} u_\varepsilon$, we apply the [Leibniz Integral Rule](/theorems/???). For each $x \in V$, choose a closed ball $\overline{B}(x, r) \subset V$ small enough that the union $\bigcup_{x' \in \overline{B}(x, r)} B(x', \varepsilon)$ is contained in a fixed compact set $K \subset \Omega$ (take $K = \overline{B}(x, r + \varepsilon) \cap \overline{\Omega}$; by hypothesis on $\varepsilon$, $K \subset \Omega$). Then for $x' \in \overline{B}(x, r)$,
\begin{align*}
u_\varepsilon(x') = \int_K u(y)\, \eta_\varepsilon(x' - y)\, d\mathcal{L}^n(y).
\end{align*}
The integrand $(x', y) \mapsto u(y)\, \eta_\varepsilon(x' - y)$ has the following properties on $\overline{B}(x, r) \times K$: (i) for each fixed $x'$ it is measurable in $y$; (ii) for $\mathcal{L}^n$-a.e. $y \in K$ it is $C^\infty$ in $x'$ since $\eta_\varepsilon$ is $C^\infty$; (iii) the partial derivative $\partial_{x'_i}[u(y)\, \eta_\varepsilon(x' - y)] = u(y)\, (\partial_{x_i}\eta_\varepsilon)(x' - y)$ is dominated by $|u(y)| \cdot \|\partial_{x_i}\eta_\varepsilon\|_{L^\infty}$, which lies in $L^1(K)$ because $u \in L^p(K) \subseteq L^1(K)$ on the compact set $K \subset \Omega$. Hence the [Leibniz Integral Rule](/theorems/???) applies and
\begin{align*}
\partial_{x_i} u_\varepsilon(x) = \int_{\mathbb{R}^n} u(y)\, (\partial_{x_i}\eta_\varepsilon)(x - y)\, d\mathcal{L}^n(y).
\end{align*}
The same argument applied iteratively to $\partial_{x_i}\eta_\varepsilon$ in place of $\eta_\varepsilon$ shows that $u_\varepsilon \in C^\infty(V)$.
[guided]
We start with the formula $u_\varepsilon(x) = \int u(y)\, \eta_\varepsilon(x - y)\, d\mathcal{L}^n(y)$ and want to compute $\partial_{x_i} u_\varepsilon$. The natural move is to push the derivative inside the integral. The issue is that "differentiating under the integral sign" requires a justification — typically domination of the partial derivative by an integrable function.
Let us first arrange the geometry. The convolution at $x \in V$ involves only $y \in B(x, \varepsilon)$ (because $\eta_\varepsilon$ is supported in $\overline{B}(0, \varepsilon)$). For $x \in V$ and $\varepsilon < \operatorname{dist}(V, \partial\Omega)$, every such $y$ lies in $\Omega$, so the integrand is well-defined and equals zero for $y$ outside the union of these balls. To get a uniform integrable dominator, restrict to a compact neighbourhood of any $x \in V$: choose a small ball $\overline{B}(x, r) \subset V$ and let $K = \overline{B}(x, r + \varepsilon) \cap \overline{\Omega}$. We have $K \subset \Omega$ because $r + \varepsilon$ can be made smaller than $\operatorname{dist}(\overline{B}(x, r) \cup V, \partial\Omega)$ by choosing $r$ small.
Now apply the [Leibniz Integral Rule](/theorems/???). Its hypotheses are:
1. The integrand $(x', y) \mapsto u(y)\, \eta_\varepsilon(x' - y)$ is measurable in $y$ for each fixed $x'$. Yes — $u$ is measurable, $\eta_\varepsilon$ is smooth.
2. The integrand is differentiable in $x'$ for a.e. $y$. Yes — $\eta_\varepsilon$ is $C^\infty$.
3. The partial derivative $\partial_{x'_i}[u(y)\, \eta_\varepsilon(x' - y)] = u(y)\, (\partial_{x_i}\eta_\varepsilon)(x' - y)$ is dominated, uniformly in $x' \in \overline{B}(x, r)$, by an integrable function of $y$. Take $g(y) := |u(y)| \cdot \|\partial_{x_i}\eta_\varepsilon\|_{L^\infty(\mathbb{R}^n)} \cdot \mathbb{1}_K(y)$. The supremum norm is finite since $\partial_{x_i}\eta_\varepsilon \in C_c^\infty$. The remaining factor $|u| \cdot \mathbb{1}_K$ is integrable because $u \in L^p_{\mathrm{loc}}(\Omega)$ and $K \subset \Omega$ is compact: by [Inclusion of $L^p$ Spaces on Finite Measure Spaces](/theorems/???), $u \in L^p(K) \subseteq L^1(K)$.
All hypotheses verified, the rule gives
\begin{align*}
\partial_{x_i} u_\varepsilon(x) = \int_{\mathbb{R}^n} u(y)\, (\partial_{x_i}\eta_\varepsilon)(x - y)\, d\mathcal{L}^n(y).
\end{align*}
To upgrade this to $u_\varepsilon \in C^\infty(V)$, repeat the argument inductively: each derivative $\partial_{x_i} u_\varepsilon$ is itself a convolution with a smooth compactly supported function $\partial_{x_i}\eta_\varepsilon$, and the same hypotheses hold, so we can differentiate again, and so on. Each iteration costs at most a factor of $\|D^\alpha \eta_\varepsilon\|_{L^\infty}$ in the dominator, so all derivatives exist and are continuous on $V$.
[/guided]
[/step]
[step:Convert the $x$-derivative on $\eta_\varepsilon$ into a $y$-derivative via the sign flip]
For any $x, y \in \mathbb{R}^n$ and $i \in \{1, \dots, n\}$, by the chain rule applied to $\eta_\varepsilon$ at the point $x - y$,
\begin{align*}
(\partial_{x_i}\eta_\varepsilon)(x - y) = -(\partial_{y_i}\eta_\varepsilon)(x - y),
\end{align*}
where $\partial_{x_i}$ denotes the $i$-th partial derivative with respect to the variable indicated. Substituting into the formula for $\partial_{x_i} u_\varepsilon$ from Step 1,
\begin{align*}
\partial_{x_i} u_\varepsilon(x) = -\int_{\mathbb{R}^n} u(y)\, (\partial_{y_i}\eta_\varepsilon)(x - y)\, d\mathcal{L}^n(y).
\end{align*}
[/step]
[step:Apply the definition of weak derivative with test function $\eta_\varepsilon(x - \cdot)$]
Fix $x \in V$. Define the test function
\begin{align*}
\phi_x: \Omega &\to \mathbb{R} \\
y &\mapsto \eta_\varepsilon(x - y).
\end{align*}
Since $\eta_\varepsilon \in C_c^\infty(\mathbb{R}^n)$ with $\operatorname{supp} \eta_\varepsilon \subseteq \overline{B}(0, \varepsilon)$, we have $\phi_x \in C^\infty(\mathbb{R}^n)$ with $\operatorname{supp} \phi_x \subseteq \overline{B}(x, \varepsilon)$. The hypothesis $\varepsilon < \operatorname{dist}(V, \partial\Omega)$ together with $x \in V$ gives $\overline{B}(x, \varepsilon) \subset \Omega$, so $\operatorname{supp} \phi_x$ is a compact subset of $\Omega$. Hence $\phi_x \in C_c^\infty(\Omega)$, qualifying as a valid test function for the weak derivative.
Applying the [Definition of Weak Derivative](/page/Weak%20Derivative) for $u \in W^{1,p}(\Omega)$ with $\phi = \phi_x$,
\begin{align*}
\int_\Omega u(y)\, (\partial_{y_i}\phi_x)(y)\, d\mathcal{L}^n(y) = -\int_\Omega (\partial_{x_i} u)(y)\, \phi_x(y)\, d\mathcal{L}^n(y).
\end{align*}
We compute $(\partial_{y_i}\phi_x)(y) = (\partial_{y_i}\eta_\varepsilon)(x - y)$ from the definition of $\phi_x$ (the chain rule gives this without a sign flip — we are differentiating $\eta_\varepsilon(x - y)$ as a function of $y$). Substituting,
\begin{align*}
\int_\Omega u(y)\, (\partial_{y_i}\eta_\varepsilon)(x - y)\, d\mathcal{L}^n(y) = -\int_\Omega (\partial_{x_i} u)(y)\, \eta_\varepsilon(x - y)\, d\mathcal{L}^n(y).
\end{align*}
The right-hand side is exactly $-(\partial_{x_i} u) * \eta_\varepsilon(x)$. Since the integrand on the left vanishes outside $\Omega$ (because $\phi_x$ is supported in $\Omega$) and $u$ has been extended by zero, we may replace the domain of integration on the left by $\mathbb{R}^n$:
\begin{align*}
\int_{\mathbb{R}^n} u(y)\, (\partial_{y_i}\eta_\varepsilon)(x - y)\, d\mathcal{L}^n(y) = -\int_{\mathbb{R}^n} (\partial_{x_i} u)(y)\, \eta_\varepsilon(x - y)\, d\mathcal{L}^n(y) = -((\partial_{x_i} u) * \eta_\varepsilon)(x).
\end{align*}
[guided]
We have $\partial_{x_i} u_\varepsilon(x) = -\int u(y)\, (\partial_{y_i}\eta_\varepsilon)(x - y)\, d\mathcal{L}^n(y)$. The integrand contains $u(y)$ multiplied by a $y$-derivative of a smooth compactly supported function — this is exactly the right side of the integration-by-parts identity that defines the weak derivative of $u$. So we want to interpret the function $y \mapsto \eta_\varepsilon(x - y)$ as a test function and apply the weak derivative formula.
Define
\begin{align*}
\phi_x: \Omega &\to \mathbb{R} \\
y &\mapsto \eta_\varepsilon(x - y).
\end{align*}
For $\phi_x$ to qualify as a [Test Function](/page/Test%20Function) on $\Omega$, two conditions must hold: $\phi_x \in C^\infty(\Omega)$ and $\operatorname{supp} \phi_x$ is compact in $\Omega$.
- Smoothness: $\eta_\varepsilon \in C^\infty(\mathbb{R}^n)$, so $\phi_x \in C^\infty(\Omega)$.
- Compact support: $\operatorname{supp} \phi_x = x - \operatorname{supp} \eta_\varepsilon \subseteq x - \overline{B}(0, \varepsilon) = \overline{B}(x, \varepsilon)$. We need $\overline{B}(x, \varepsilon) \subset \Omega$. This is exactly where the hypothesis $\varepsilon < \operatorname{dist}(V, \partial\Omega)$ is used: for any $x \in V$, $\operatorname{dist}(x, \partial\Omega) \geq \operatorname{dist}(V, \partial\Omega) > \varepsilon$, so $\overline{B}(x, \varepsilon) \subset \Omega$.
Both conditions met, $\phi_x \in C_c^\infty(\Omega)$. The [Definition of Weak Derivative](/page/Weak%20Derivative) for $u \in W^{1,p}(\Omega)$ with test function $\phi_x$ reads
\begin{align*}
\int_\Omega u(y)\, (\partial_{y_i}\phi_x)(y)\, d\mathcal{L}^n(y) = -\int_\Omega (\partial_{x_i} u)(y)\, \phi_x(y)\, d\mathcal{L}^n(y).
\end{align*}
Compute $(\partial_{y_i}\phi_x)(y) = \frac{\partial}{\partial y_i}\eta_\varepsilon(x - y) = (\partial_{y_i}\eta_\varepsilon)(x - y)$, where the chain rule for the inner map $y \mapsto x - y$ has Jacobian $-I$ — but we are looking at the derivative *as a function of $y$*, with no implicit sign flip. (Compare: in Step 2 we had $(\partial_{x_i}\eta_\varepsilon)(x-y)$ and asked how it relates to $(\partial_{y_i}\eta_\varepsilon)(x-y)$ — *those* are derivatives at the same argument with respect to *different* variables, and they differ by a sign.)
Substituting, the left side becomes $\int_\Omega u(y)\, (\partial_{y_i}\eta_\varepsilon)(x-y)\, d\mathcal{L}^n(y)$ and the right side becomes $-((\partial_{x_i} u) * \eta_\varepsilon)(x)$. Because $\phi_x$ is supported in $\Omega$ and we have extended $u$ by zero outside $\Omega$, the integrals over $\Omega$ and over $\mathbb{R}^n$ agree:
\begin{align*}
\int_{\mathbb{R}^n} u(y)\, (\partial_{y_i}\eta_\varepsilon)(x - y)\, d\mathcal{L}^n(y) = -((\partial_{x_i} u) * \eta_\varepsilon)(x).
\end{align*}
[/guided]
[/step]
[step:Combine to identify $\partial_{x_i} u_\varepsilon = (\partial_{x_i} u) * \eta_\varepsilon$ on $V$]
Substituting the result of Step 3 into the formula from Step 2,
\begin{align*}
\partial_{x_i} u_\varepsilon(x) = -\int_{\mathbb{R}^n} u(y)\, (\partial_{y_i}\eta_\varepsilon)(x - y)\, d\mathcal{L}^n(y) = -\bigl(-((\partial_{x_i} u) * \eta_\varepsilon)(x)\bigr) = ((\partial_{x_i} u) * \eta_\varepsilon)(x).
\end{align*}
This holds for every $x \in V$, establishing the identity
\begin{align*}
\partial_{x_i} u_\varepsilon = (\partial_{x_i} u) * \eta_\varepsilon \quad \text{on } V.
\end{align*}
[/step]
[step:Deduce $W^{1,p}(V)$ convergence as $\varepsilon \to 0$]
We must show $u_\varepsilon \to u$ in $L^p(V)$ and $\partial_{x_i} u_\varepsilon \to \partial_{x_i} u$ in $L^p(V)$ for each $i = 1, \dots, n$. For the function values, the [Convergence of Mollifications in $L^p$](/theorems/???) theorem states: if $f \in L^p(\Omega)$ for some $1 \leq p < \infty$ and $V \subset\subset \Omega$ is open, then $f_\varepsilon = f * \eta_\varepsilon \to f$ in $L^p(V)$ as $\varepsilon \to 0$. Applying this with $f = u \in L^p(\Omega)$ gives $u_\varepsilon \to u$ in $L^p(V)$.
For the derivatives, apply the same theorem with $f = \partial_{x_i} u \in L^p(\Omega)$ (the weak derivative, an $L^p$ function): $(\partial_{x_i} u) * \eta_\varepsilon \to \partial_{x_i} u$ in $L^p(V)$. By Step 4, $(\partial_{x_i} u) * \eta_\varepsilon = \partial_{x_i} u_\varepsilon$ on $V$, so
\begin{align*}
\partial_{x_i} u_\varepsilon \to \partial_{x_i} u \quad \text{in } L^p(V), \quad i = 1, \dots, n.
\end{align*}
Combining,
\begin{align*}
\|u_\varepsilon - u\|_{W^{1,p}(V)}^p = \|u_\varepsilon - u\|_{L^p(V)}^p + \sum_{i=1}^n \|\partial_{x_i} u_\varepsilon - \partial_{x_i} u\|_{L^p(V)}^p \xrightarrow{\varepsilon \to 0} 0,
\end{align*}
which is the claimed $W^{1,p}(V)$ convergence. The hypothesis $p < \infty$ enters precisely here: the [Convergence of Mollifications in $L^p$](/theorems/???) theorem fails for $p = \infty$ (indeed, mollifications converge only in $L^\infty_{\mathrm{loc}}$ when the function is continuous, and otherwise weakly-$*$ but not in norm).
[/step]