-
Notifications
You must be signed in to change notification settings - Fork 0
/
chap4.tex
540 lines (492 loc) · 32 KB
/
chap4.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
\chapter{Approximation by Smooth Functions}
As it is often complicated to use the definition of weak derivatives for proving properties of Sobolev spaces, we aim to approximate functions in Sobolev spaces by smooth functions.
\section{Interior Approximation}
We prove that mollification from \ref{sec:mollifier} provides approximating functions in $\WW_{\loc}^{k,p}(\Omega)$.
\begin{thm}\label{thm:interiorApproximation}
Let $\Omega \subseteq \R^n$ be open, $k \in \N$, $p \in [1,\infty)$, and $u \in \WW^{k,p}(\Omega)$.
Then the following statements hold:
\begin{enumerate}[a)]
\item $u_\varepsilon \in \CC^\infty(\Omega)$ and $\DD^\alpha(u_\varepsilon)(x) = (\DD^\alpha u)_\varepsilon(x)$ for all $ x \in \Omega_\varepsilon$ and all $\alpha \in \N_0^n$ with $|\alpha| \leq k$.
\item $u_\varepsilon \to u$ in $\WW_{\loc}^{k,p}(\Omega)$ as $\varepsilon \downarrow 0$.
\end{enumerate}
\end{thm}
\begin{proof}
\begin{enumerate}[a)]
\item By Theorem \ref{thm:mollification}, we have $u_\varepsilon \in \CC^\infty(\Omega)$ and for $|\alpha| \leq k$
$$
\DD^\alpha (u_\varepsilon)(x) = \int_\Omega \DD^\alpha (\eta_\varepsilon)(x - y) u(y) \d y \quad\text{for all } x \in \Omega,
$$
see proof of Theorem \ref{thm:mollification} a), d).
For fixed $x \in \Omega_\varepsilon$, $\phi(y) \coloneqq \eta_\varepsilon(x - y)$ satisfies $\phi \in \CC_0^\infty(\Omega)$ since $\supp \phi = \overline{\BB_\varepsilon(x)}$ and therefore
\begin{align*}
\DD^\alpha (u_\varepsilon)(x)
&= (-1)^{|\alpha|} \int_\Omega \DD_y^\alpha (\eta_\varepsilon (x - y))\, u(y) \d y
= (-1)^{|\alpha|} \int_\Omega \DD^\alpha \phi(y) \, u(y) \d y \\
&\overset{\eqref{eq:weakPartialDerivativeDef}}{=} (-1)^{|\alpha| + |\alpha|} \int_\Omega \phi(y) \, \DD^\alpha u(y) \d y
= \int_\Omega \eta_\varepsilon(x - y)\, \DD^\alpha u(y) \d y
= (\DD^\alpha u)_\varepsilon(x).
\end{align*}
Since $x \in \Omega_\varepsilon$ was arbitrary, this proves a).
\item In view of a) and Theorem \ref{thm:mollifier} d), for fixed $V \Subset \Omega$ we have $\DD^\alpha u_\varepsilon = \eta_\varepsilon \ast \DD^\alpha u$ in $V$ for $\varepsilon \in (0,\varepsilon_0)$, as $V \subset \Omega_{\varepsilon_0} \subseteq \Omega_{\varepsilon}$ for $\varepsilon_0$ small enough so that $\DD^\alpha u_\varepsilon \to \DD^\alpha u$ in $\Ell^p(V)$ as $\varepsilon \downarrow 0$ for any $\alpha \in \N_0^n, |\alpha| \leq k$.
Then
\begin{align*}
\|u_\varepsilon - u\|^p_{\WW^{k,p}(V)} = \sum_{|\alpha| \leq k} \|\DD^\alpha u_\varepsilon - \DD^\alpha u\|_{\Ell^p(V)}^p \to 0 \quad\text{as } \varepsilon \downarrow 0. &\qedhere
\end{align*}
\end{enumerate}
\end{proof}
\section{Approximation by Smooth Functions}
In order to show that for any $u \in \WW^{k,p}(\Omega)$ there is $(u_m)_{m \in \N} \subset \CC^\infty(\Omega) \cap \WW^{k,p}(\Omega)$ such that $u_m \to u$ in $\WW^{k,p}(\Omega)$ (and not only in $\WW^{k,p}_{\loc}(\Omega)$), we need the following lemmas to construct a partition of unity.
\begin{lem}
\label{lem:cutoff}
Let $\Omega \subset \R^n$ be open and $K \subset \Omega$ compact.
If $\dist(K, \partial \Omega) \geq \delta > 0$, then there exists a cutoff function $\tau \in \CC_0^\infty(\Omega)$ w.r.t. $K, \Omega$ with $0 \leq \tau \leq 1$, $\tau = 1$ in $K$, and
$$
|\DD^\alpha \tau(x) | \leq c \delta^{-k} \quad\text{for all } x \in \Omega \setminus K, k \in \N , |\alpha| = k,
$$
where $c > 0$ depends on $k$ and $n$ but not on $\Omega$ or $K$.
\end{lem}
\begin{proof}
We may choose $\delta > 0$ since $K$ is compact.
Hence,
$$
\tilde K \coloneqq \overline{\bigcup_{x \in K} \BB_{\frac{\delta}{2}}(x)}
$$
is compact with $\dist(\partial \tilde K, \partial K) = \frac{\delta}{2} \leq \dist(\partial \tilde K, \partial \Omega)$.
As $\chi_{\tilde K} \in \Ell^1(\Omega)$ with $\supp \chi_{\tilde K} = \tilde K \Subset \Omega$, we have that $\tau \coloneqq \eta_{\frac{\delta}{4}} \ast \chi_{\tilde K}$ satisfies $\tau \in \CC_0^\infty(\Omega)$, $0 \leq \tau \leq 1$, and $\tau = 1$ in $K$ by Theorem \ref{thm:mollifier}, as
$$
\tau(x)
= \int_{\BB_{\frac{\delta}{4}}(x)}\eta_{\frac{\delta}{4}}(x - y) \underbrace{\chi_{\tilde K}(y)}_{= 1} \d y
= 1 \quad\text{for all }x \in K
$$
since $\BB_{\frac{\delta}{4}}(x) \subset \tilde K$.
Moreover, for $|\alpha| = k$
$$
\DD^\alpha \eta_{\frac{\delta}{4}}(x)
= \left( \frac{4}{\delta}\right)^n \DD^\alpha \left[ \eta \left( \frac{4 }{\delta} x \right) \right]
= \left( \frac{4}{\delta}\right)^{n+k} (\DD^\alpha \eta)\left( \frac{4}{\delta} x \right).
$$
Hence, for $x \in \Omega \setminus K$ we have
$$
|\DD^\alpha \tau (x) |
\leq \int_{\BB_{\frac{\delta}{4}}(x)}\, \left(\frac{4}{\delta}\right)^{n + k}\, \|\DD^\alpha \eta \|_{\Ell^\infty(\R^n)} \,\chi_{\tilde K}(y) \d y
\leq \tilde c(n,k) \, \delta^{-n - k} \, |\BB_{\frac{\delta}{4}}(x)| \leq c(n,k)\, \delta^{-k}
$$
which concludes the proof.
\end{proof}
\begin{lem}[Partition of unity]
\label{lem:partitionOfUnity}
Let $K \subset \R^n$ be compact and $\{\Omega_k\}_{k = 1,\dots,N}$ be an open covering of $K$.
Then, there exist $\psi_k, k=1,\dots,N$, called \emph{partition of unity} such that $\psi_k \in \CC_0^\infty(\Omega_k)$, $0 \leq \psi_k \leq 1$ in $\Omega_k$, and $\sum_{k = 1}^N \psi_k(x) = 1$ for all $x \in K$.
\end{lem}
\begin{proof}
For any $x \in K$ there is $r = r(x) > 0$ and $1\leq k \leq N$ such that $\BB_{x, k} \coloneqq \BB_r(x) \Subset \Omega_k$.
Hence,
$$
\{B_{x,k}\}_{\subalign{x &\in K \cap \Omega_k, \\ k &= 1,\dots,N}}
$$
is an open covering of $K$ and has a finite subset still covering $K$, called
\[
\{ B_i^k \}_{\subalign{i &= 1,\dots,N_k, \\ k &= 1,\dots,N}}.
\]
Then
$$
K_k \coloneqq \overline{\bigcup_{i = 1}^{N_k} B_i^k}
$$
satisfies $K_k \Subset \Omega_k$ and $\bigcup_{k = 1}^N K_k \supset K$.
Let $\tilde \psi_k$ denote the cutoff function w.r.t $K_k, \Omega_k$.
Hence, $\tilde \psi_k \in \CC_0^\infty(\Omega_k)$ satisfies $0 \leq \tilde \psi_k \leq 1$ and
$$
\psi(x) \coloneqq \sum_{k = 1}^N \tilde \psi_k(x) \geq 1 \quad\text{for all } x \in K.
$$
Furthermore, we have
$$
K \Subset \Omega \coloneqq \bigcup_{k = 1}^N \supp(\tilde \psi_k)
$$
and there is an open set $\Omega_0$ such that $K \subset \Omega_0 \Subset \Omega$.
Let $\tau$ be a cutoff function w.r.t $K, \Omega_0$ and
$$
\psi_k(x) \coloneqq \begin{cases} \frac{\tilde \psi_k(x) \tau(x)}{\psi(x)}, &\quad\text{if } x \in \Omega_0, \\ 0, &\quad \text{if } x \notin \Omega_0. \end{cases}
$$
Then $\psi_1,\dots,\psi_N$ have the claimed properties.
\end{proof}
Now we prove the announced result that $\CC^\infty(\Omega) \cap \WW^{k,p}(\Omega)$ is dense in $\WW^{k,p}(\Omega)$ without assuming any smoothness of $\partial \Omega$.
\begin{thm}[Meyers and Serrin]
\label{thm:meyersSerrin}
Let $\Omega \subset \R^n$ be open, $k \in \N$, and $p \in [1,\infty)$.
Then $\CC^\infty(\Omega) \cap \WW^{k,p}(\Omega)$ is dense in $\WW^{k,p}(\Omega)$, i.e. for any $u \in \WW^{k,p}(\Omega)$ there exists $(u_m)_{m \in \N} \subset \CC^\infty(\Omega) \cap \WW^{k,p}(\Omega)$ such that $u_m \to u$ in $\WW^{k,p}(\Omega)$ as $m \to \infty$.
\end{thm}
\begin{proof}
\begin{enumerate}[i)]
\item With
$$
U_i \coloneqq \{ x \in \Omega \colon \dist(x, \partial \Omega) > \frac{1}{i} \text{ and } |x| < i\}, \quad i \in \N,
$$
we have $\bigcup_{i = 1}^\infty U_i = \Omega$ and $U_i \subset U_{i + 1}$.
Moreover,
\begin{alignat*}{2}
V_i &\coloneqq U_{i + 4} \setminus \overline{U_{i + 1}}, i \in \N,&&\quad\text{and}\quad V_0\coloneqq U_4
\intertext{are all open with $V_i \Subset \Omega$ for all $i \in \N_0$ and $\Omega = \bigcup_{i = 0}^\infty V_i$.
Defining further}
W_i &\coloneqq \overline{U_{i + 3}} \setminus U_{i + 2}, i \in \N, &&\quad\text{and}\quad W_0 \coloneqq \overline U_3,
\end{alignat*}
all $W_i \subset V_i$ are compact and we have $\Omega = \bigcup_{i = 0}^\infty W_i$.
Let $\psi_i \in \CC_0^\infty(V_i)$ denote a cutoff function w.r.t. $W_i, V_i$ with $0 \leq \psi_i \leq 1$ and $\psi_i = 1$ in $W_i$ for $i \in \N_0$.
Since for all $j \geq i + 2$
$$W_i \cap V_j
= \left(\overline{U_{i + 3}} \cap \overline{U_{j + 1}}^{\mathrm c} \right)\cap \left( U_{i + 2}^{\mathrm c} \cap U_{j + 4} \right)
= \emptyset,$$
and for all $j \geq i + 3$, $V_i \cap V_j = \emptyset$, for any $x \in \Omega$ we have
$$
\sigma(x) \coloneqq \sum_{i = 0}^\infty \psi_i(x) > 0
$$
and only finitely many of the $\psi_i(x)$ are non-zero.
Hence, $\{\xi_i\}_{i = 0}^\infty$, defined by
$$\xi_i(x) \coloneqq \frac{\psi_i(x)}{\sigma(x)}, \quad x \in \Omega,$$
is a \emph{partition of unity subordinate to} $\{V_i\}_{i = 0}^\infty$, i.e. $\xi_i \in \CC_0^\infty(V_i)$, $0 \leq \xi_i \leq 1$, and $\sum_{i = 0}^\infty \xi_i = 1$ in $\Omega$ and for any $K \Subset \Omega$, $\xi_i|_K \not\equiv 0$ only for finitely many $i$.
\item Let $u \in \WW^{k,p}(\Omega)$ be arbitrary.
Then by Proposition \ref{prop:sobolevProperties} d) and i) we have $\xi_i u \in \WW^{k,p}(\Omega)$ and $\supp(\xi_i u) \subset V_i$ for all $i \in \N_0$.
We fix $\delta > 0$.
Then for any $i \in \N_0$ we define
$$
Z_i \coloneqq U_{i + 5} \setminus \overline{U_i} \supset V_i, i \in \N, \quad\text{and}\quad Z_0 \coloneqq U_5 \supset V_0.
$$
In view of Theorem \ref{thm:interiorApproximation}, there is $\varepsilon_i > 0$ small enough such that $u_i \coloneqq \eta_{\varepsilon_i} \ast (\xi_i u)$ satisfies $u_i \in \CC_0^\infty(Z_i)$ and
\begin{equation}
\|u_i - \xi_i u \|_{\WW^{k,p}(\Omega)} = \|u_i - \xi_i u\|_{\WW^{k,p}(Z_i)} \leq \frac{\delta}{2^{i + 1}}
\end{equation}
for $i \in \N_0$ as $u_i - \xi_i u \equiv 0$ in $\Omega \setminus Z_i$.
Define
$$
v(x) \coloneqq \sum_{i = 0}^\infty u_i(x), \quad x \in \Omega.
$$
Then for any open set $V \Subset \Omega$ only finitely many $u_i$ satisfy $u_i|_V \not\equiv 0$.
Since $u = \sum_{i = 0}^\infty \xi_i u$, we obtain $v \in \CC^\infty(\Omega)$ and
\begin{align*}
\|v - u\|_{\WW^{k,p}(V)}
&\leq \sum_{i = 0}^\infty \|u_i - \xi_i u\|_{\WW^{k,p}(V)}
\overset{(4.1)}{\leq} \delta \sum_{i = 0}^\infty \frac{1}{2^{i + 1}}
= \delta \quad\text{for all } V \Subset \Omega.
\intertext{Since $U_i \subset U_{i + 1}$ for all $i \in \N$, $U_i \Subset \Omega$, and $\Omega = \bigcup_{i = 1}^\infty U_i$, we conclude by the monotone convergence theorem }
\|v - u\|_{\WW^{k,p}(\Omega)}^p
&= \sum_{|\alpha| \leq k} \|\DD^\alpha (v - u) \|_{\Ell^p(\Omega)}^p
= \lim_{i \to \infty} \sum_{|\alpha| \leq k} \|\DD^\alpha(v - u) \|_{\Ell^p(U_i)}^p
\leq \delta^p.
\end{align*}
As $\delta > 0$ was arbitrary, the claim is proved. \qedhere
\end{enumerate}
\end{proof}
\begin{rem}
Historically, there were two definitions of Sobolev spaces.
$\WW^{k,p}(\Omega)$ was defined as in Definition \ref{defn:sobolevSpace}, while $\HH^{k,p}(\Omega)$ was defined as the closure of $\CC^\infty(\Omega) \cap \WW^{k,p}(\Omega)$ w.r.t $\|\cdot\|_{\WW^{k,p}(\Omega)}$.
Obviously $\HH^{k,p}(\Omega) \subseteq \WW^{k,p}(\Omega)$, but only after Meyers and Serrin in 1964 \cite{meyers1964} it was clear that $\HH^{k,p}(\Omega) \supseteq \WW^{k,p}(\Omega)$ without assuming any smoothness condition of $\partial \Omega$.
\end{rem}
We can now prove the chain rule for $\WW^{1,p}(\Omega)$ functions.
\begin{prop}
\label{prop:sobolevChainrule}
Let $\Omega$ be open, $p \in [1,\infty)$, and $f \in \CC^1(\R)$ such that $|f'| \leq M$ on $\R$ for some $M > 0$.
Assume further that $f(0) = 0$ or $|\Omega| < \infty$ is satisfied.
Then for any $u \in \WW^{1,p}(\Omega)$ we have $f(u)$ in $\WW^{1,p}(\Omega)$ with $$\nabla f(u) = f'(u) \nabla u.$$
\end{prop}
\begin{proof}
As $f'$ is continuous and bounded and $u$ is measurable, we have $f'(u)\in \Ell^\infty(\Omega)$ and $f'(u) \nabla u \in \Ell^p(\Omega)$.
In view of
$$
|f(x)| \leq |f(0)| + M|x| \quad\text{for all } x \in \R,
$$
the assumption $f(0)= 0$ or $|\Omega| < \infty$ implies $f(u) \in \Ell^p(\Omega)$.
By Theorem \ref{thm:meyersSerrin}, there exists $(u_m)_{m \in \N} \subset \CC^\infty(\Omega) \cap \WW^{1,p}(\Omega)$ such that $u_m \to u$ in $\WW^{1,p}(\Omega)$ and $u_m \to u$ a.e. in $\Omega$.
Hence, $u_m \to u$ and $(u_m)_{x_i} \to u_{x_i}$ in $\Ell^p(\Omega)$ for all $i \in \{1,\dots,n\}$.
We fix $i \in \{ 1, \dots, n\}$ and $\varphi \in \CC_0^\infty(\Omega)$.
In view of $f(u_m) \in \CC^1(\Omega)$, we deduce from \eqref{eq:partialIntegrationGeneral}
\begin{equation}
\label{eq:partialIntChainRule}
\int_\Omega f(u_m) \, \varphi_{x_i} \d x = -\int_\Omega f'(u_m) (u_m)_{x_i} \, \varphi \d x \quad\text{for all } m \in \N,
\end{equation}
by the classical chain rule.
On the one hand, for $q \in [1,\infty]$ with $\frac{1}{p} + \frac{1}{q} = 1$ we have by Hölder's inequality
\begin{align*}
\Big| \int_\Omega (f(u_m) - f(u))\, \varphi_{x_i} \d x \Big|
&\leq M \int_{\Omega} |u_m - u|\, |\varphi_{x_i}| \d x \\
&\leq M\, \|u_m - u\|_{\Ell^p(\Omega)} \|\varphi_{x_i}\|_{\Ell^q(\Omega)}
\to 0 \quad\text{as } m \to \infty
\end{align*}
since $f$ is Lipschitz.
On the other hand,
$$
|f'(u_m) - f'(u)|\, |u_{x_i}|\, |\varphi| \leq 2M\, |u_{x_i}| \|\varphi\|_{\Ell^\infty(\Omega)} \in \Ell^1(\supp(\varphi))
$$
as $\supp(\varphi)$ is bounded and thus
\begin{align*}
&\Big |\int_\Omega (f'(u_m) (u_m)_{x_i} - f'(u)u_{x_i})\, \varphi \d x \Big| \\
&\quad\leq \int_\Omega |f'(u_m)|\, |(u_m)_{x_i} - u_{x_i}|\,| \varphi | \d x
+ \int_\Omega |f'(u_m) - f'(u)|\, |u_{x_i}|\, |\varphi| \d x \\
&\quad\leq M\, \|(u_m)_{x_i} - u_{x_i}\|_{\Ell^p(\Omega)} \|\varphi\|_{\Ell^q(\Omega)}
+ \int_{\supp(\varphi)} |f'(u_m) - f'(u)|\, |u_{x_i}|\, |\varphi| \d x .
\\&\quad \to 0 \quad\text{as } m \to \infty
\end{align*}
by the dominated convergence theorem.
Hence, letting $m \to \infty$ in \eqref{eq:partialIntChainRule} we conclude that $(f(u))_{x_i} = f'(u)u_{x_i}$ in the weak sense.
\end{proof}
Unlike for classical derivatives, now $u \in \WW^{1,p}(\Omega)$ implies $|u| \in \WW^{1,p}(\Omega)$.
\begin{cor}
Let $\Omega \subset \R^n$ be open, $p \in [1,\infty)$, and $u \in \WW^{1,p}(\Omega)$.
Define
$$u_+(x) \coloneqq \max\{u(x),0\} \quad\text{and}\quad u_-(x) = \max\{-u(x),0\}.$$
Then $u_+, u_-,|u| \in \WW^{1,p}(\Omega)$ with
$\nabla u_+(x) = \nabla u(x) \chi_{\{ u > 0\}}(x)$, $\nabla u_-(x) = -\nabla u(x) \chi_{\{ u < 0\}}(x)$, and $\nabla|u|(x) = \nabla u(x) \left( \chi_{\{ u > 0\} } (x) - \chi_{\{u < 0\}} (x) \right)$.
\end{cor}
\begin{proof}[Proof (Exercise)]
For $\varepsilon > 0$ we define
$$
f_\varepsilon(u) \coloneqq
\begin{cases}
\sqrt{u^2 + \varepsilon^2} - \varepsilon, &\quad\text{if } u > 0,\\
0, &\quad\text{if } u \leq 0.
\end{cases}
$$
Then $f_\varepsilon \in \CC^1(\R)$ satisfies $f_\varepsilon(0) = 0$ and $f_\varepsilon'(u) = \frac{u}{\sqrt{u^2 + \varepsilon^2}} \cdot \chi_{(0,\infty)}(u)$ and hence $|f_\varepsilon'(u)| \leq 1$ for all $u \in \R$.
Hence, by Proposition \ref{prop:sobolevChainrule} we have $f_\varepsilon(u) \in \WW^{1,p}(\Omega)$ with
\begin{align}
(f_\varepsilon(u))_{x_i} &= f_\varepsilon'(u) u_{x_i} = \frac{u u_{x_i}}{\sqrt{u^2 + \varepsilon^2}} \cdot \chi_{\{ u > 0\}}\nonumber\\
\intertext{and}
\label{eq:weakDerivativeOfPositivePart}
\int_\Omega f_\varepsilon(u) \varphi_{x_i} \d x
&= - \int_\Omega f_\varepsilon'(u) u_{x_i} \varphi \d x \quad\text{for all } \varphi \in \CC_0^\infty(\Omega).
\end{align}
Since $f_\varepsilon(u(x)) \to u_+(x)$ and $(f_\varepsilon'(u) u_{x_i})(x) \to u_{x_i}(x)\chi_{\{u > 0\}}(x)$ for a.e. $x \in \Omega$ and $|f_\varepsilon(u)\varphi_{x_i}| \leq \| \varphi_{x_i}\|_{\Ell^\infty(\Omega)} |u|$ as well as $|f_\varepsilon'(u) u_{x_i} \varphi|\leq \|\varphi\|_{\Ell^\infty(\Omega)} |u_{x_i}|$ are satisfied, we may let $\varepsilon\downarrow 0$ in \eqref{eq:weakDerivativeOfPositivePart} and obtain from the dominated convergence theorem
$$
\int_\Omega u_+(x) \varphi_{x_i}(x) \d x
= - \int_\Omega u_{x_i}(x) \chi_{\{u > 0\}}(x) \varphi(x) \d x \quad\text{for all } \varphi \in \CC_0^\infty(\Omega).
$$
This proves the claim for $u_+$.
In view of $u_- = (-u)_+$ and $|u| = u_+ + u_-$, the proof is complete due to Proposition \ref{prop:sobolevProperties}.
\end{proof}
\section{Approximation by \texorpdfstring{$\CC^\infty(\overline{\Omega})$}{C\textasciicircum infty(Omega) }-Functions}
We now ask the question whether any $u \in \WW^{k,p}(\Omega)$ can also be approximated by functions $u_m \in \CC^\infty(\overline\Omega)$ instead of $u_m \in \CC^\infty(\Omega)$.
The following example shows that this is not true for all open $\Omega \subset \R^n$.
\begin{ex}[Exercise]
\label{ex:noSegmentCondition}
Let $\Omega = \{(x,y) \in \R^2 \colon 0 < |x| < 1, 0 < y < 1\}$ and $p \in [1,\infty)$.
Then $u \colon \Omega \to \R$ defined by
$$
u(x,y) \coloneqq \begin{cases} 1, \quad\text{if } x > 0,\\ 0, \quad\text{if } x < 0, \end{cases}
$$
belongs to $\WW^{1,p}(\Omega)$, but for $\varepsilon > 0$ sufficiently small, there is no function $\varphi \in \CC^1(\overline\Omega)$ such that $\|\varphi - u\|_{\WW^{1,p}(\Omega)} < \varepsilon$.
Indeed, it is obvious that $u \in \WW^{1,p}(\Omega)$ with $u_x = u_y = 0$ in $\Omega$ as $u \in \CC^1(\Omega)$.
Assume that for $\varepsilon > 0$ there exists $\varphi \in \CC^1(\overline\Omega)$ with $\| u - \varphi\|_{\WW^{1,p}(\Omega)} < \varepsilon$.
Then with
$$
L \coloneqq \{ (x,y) \in \R^2 \colon x \in [-1,0], y \in [0,1] \} \quad\text{and}\quad
R \coloneqq \{ (x,y) \in \R^2 \colon x, y \in [0,1] \}
$$
we have $\overline\Omega = L \cup R$ and $|L| = |R| = 1$.
Hence, Hölder's inequality implies
$$
\|\varphi\|_{\Ell^1(L)}
\leq \|\varphi\|_{\Ell^p(L)}
\leq \|\varphi\|_{\WW^{1,p}(\Omega)}
< \varepsilon
$$
and similarly $\|1 - \varphi\|_{\Ell^1(R)} < \varepsilon$.
The latter yields $\|\varphi\|_{\Ell^1(R)} > 1 - \varepsilon$, as $|R| = 1$.
Hence, with
$$
\psi(x) \coloneqq \int_0^1 \varphi(x,y) \d y,
$$
we have $\int_{-1}^0 \psi(x) \d x < \varepsilon$ and $\int_0^1 \psi(x) \d x > 1 - \varepsilon$ so that there exist $a \in [-1,0)$ and $b \in (0,1]$ with $\psi(a) < \varepsilon$ and $\psi(b) > 1 - \varepsilon$.
Then we get for $\varepsilon \in (0,\frac{1}{2})$ and $\frac{1}{p} + \frac{1}{q} = 1$
\begin{align*}
1 - 2\varepsilon
< \psi(b) - \psi(a)
&= \int_a^b \psi'(x) \d x
=\int_a^b \int_0^1 \varphi_x(x,y) \d y \d x \\
&\hspace{-0.7em}\overset{\text{Fubini}}{\leq} \int_{\,\overline\Omega} |\varphi_x (x,y)| \d x \d y
\overset{\text{Hölder}}{\leq} |\overline\Omega|^{\frac{1}{q}} \|\varphi_x\|_{\Ell^p(\Omega)}
< 2^{\frac{1}{q}}\varepsilon
\end{align*}
as $\|\varphi_x\|_{\Ell^p(\Omega)} = \| u_x - \varphi_x\|_{\Ell^p(\Omega)} \leq \|u - \varphi\|_{\WW^{1,p}(\Omega)} < \varepsilon$.
But then $1 < (2 + 2^{\frac{1}{q}})\, \varepsilon$ which is not possible for $\varepsilon > 0$ small enough. \qed
\end{ex}
The problem with $\Omega$ in Example \ref{ex:noSegmentCondition} is that it lies on both sides of the segment $$\Gamma = \{(0,y) \colon y \in [0,1]\}$$ with $\Gamma \subset \partial \Omega$.
The following condition excludes this situation.
Moreover, we assume from now on that $\Omega$ is a domain, i.e. open and connected.
\begin{defn}
\label{defn:segmentCond}
Let $\Omega \subset \R^n$ be a domain.
We say that $\Omega$ satisfies the \emph{segment condition} if for any $x \in \partial\Omega$ there exists a neighborhood $U_x \subset \R^n$ of $x$ and $0 \neq y_x \in \R^n$ such that $z + t y_x \in \Omega$ for any $z \in \overline\Omega \cap U_x$ and any $t \in (0,1)$.
\end{defn}
Another condition on $\Omega$ is that $\partial\Omega$ is locally the graph of a $\CC^m$-function.
\begin{defn}
\label{defn:CmBoundary}
Let $\Omega \subset \R^n$ be a bounded domain and $m \in \N$.
We say that $\Omega$ \emph{is of class} $\CC^m$ or simply $\partial\Omega \in \CC^m$ if for any $x^0 \in \partial \Omega$ there exist $r = r(x^0) > 0$ and $\gamma = \gamma_{x^0} \in \CC^m(\R^{n - 1})$ such that, upon relabelling and reorienting the coordinate axes if necessary, we have
\begin{align*}
\Omega \cap \BB_r(x^0) &= \{ x \in \BB_r(x^0) \colon x_n > \gamma(x_1,\dots,x_{n - 1}) \}, \\
\partial \Omega \cap \BB_r(x^0) &= \{ x \in \BB_r(x^0) \colon x_n = \gamma(x_1,\dots,x_{n - 1})\}.
\end{align*}
Furthermore, we say $\partial \Omega \in \CC^\infty$ if $\gamma \in \CC^\infty$ and we say $\partial \Omega$ \emph{is analytic} if $\gamma$ is analytic.
\end{defn}
\begin{rem}
Let $\Omega$ be a bounded domain with $\partial \Omega \in \CC^1$.
Then for any $x^0\in \partial\Omega$ there is a unique outward unit vector $\nu(x^0)$, i.e. $|\nu| = 1$, $\nu(x^0) \perp y$ for all $y \in \TT(x^0)$, where $\TT(x^0)$ is the tangential space on $\partial\Omega$ in $x^0$ and $x^0 + t\nu(x^0) \notin\overline\Omega$ for all $t \in (0,\varepsilon_0)$ for $\varepsilon_0 > 0$ small.
Indeed, as
$$
\def\arraystretch{0.6}
\partial\Omega \cap \BB_r(x^0) = \Bigg\{ x \in \BB_r(x^0) \colon x = \left( \begin{array}{c} x_1 \\ \vdots \\ x_{n - 1} \\ \gamma(x_1,\dots,x_{n-1}) \end{array} \right) \Bigg\}
$$
we have that
$$
\def\arraystretch{0.6}
\TT(x) = \Span \Bigg\{
\left(\begin{array}{c} 1 \\ 0 \\ \vdots \\ 0 \\ \gamma_{x_1}(x_1,\dots,x_{n - 1}) \end{array} \right),
\dots,
\left(\begin{array}{c} 0 \\ 0 \\ \vdots \\ 1 \\ \gamma_{x_{n-1}}(x_1,\dots,x_{n - 1}) \end{array} \right)\Bigg\}
$$
is $(n-1)$-dimensional so that $\TT(x)^\perp$ is one-dimensional.
Hence, $\nu(x)$ is uniquely defined and $\nu \colon \partial\Omega \to \R^n$ is continuous as $\gamma \in \CC^1(\R^{n - 1})$ and
$$
\nu(x) = \frac{1}{\sqrt{1 + |\nabla \gamma|^2}} \, (\gamma_{x_1},\dots,\gamma_{x_{n - 1}}, -1)^\TT.
$$
In particular, $\Omega$ satisfies the segment condition with $y_x = -\alpha \nu(x)$ and $U_x = \BB_\rho(x)$ with some $\rho \in (0,r)$ and $\alpha > 0$ small enough (as $\nu$ is continuous). \hfill$\square$
\end{rem}
Next we prove that in fact $\CC^\infty(\overline \Omega)$ is dense in $\WW^{k,p}(\Omega)$ if $\Omega$ satisfies the segment condition.
As a final prepariation we need the continuity of the translation in $\Ell^p(\R^n)$.
\begin{prop}\label{prop:continuousTrans}
Let $p \in [1,\infty)$ and $u \in \Ell^p(\R^n)$.
Then the translation is continuous in $\Ell^p(\R^n)$ in the sense that we have (with $h \in \R^n$)
$$
\lim_{|h| \to 0} \| u(\,\cdot + h) - u(\,\cdot\,)\|_{\Ell^p(\R^n)} = 0.
$$
\end{prop}
\begin{proof}
Given $\delta > 0$, by \ref{sec:mollifier} there is $\varphi \in \CC_0^\infty(\R^n)$ such that
$$
\|u - \varphi\|_{\Ell^p(\R^n)} < \frac{\delta}{3}.
$$
But then also
$$
\|u(\,\cdot + h) - \varphi(\,\cdot + h) \|_{\Ell^p(\R^n)} = \|u - \varphi\|_{\Ell^p(\R^n)} < \frac{\delta}{3}.
$$
Since $\varphi$ has compact support, it is uniformly continuous on $\R^n$.
Hence, there is $M > 0$ such that
$$
|\varphi(x + h) - \varphi(x)| < \frac{\delta}{3 \, |\supp(\varphi)|^{\frac{1}{p}}} \quad\text{for all } x \in \R^n\text{, } h \in \BB_M(0).
$$
Hence, for $h \in \R^n$ with $|h| < M$ we have
\begin{align*}
&\|u(\,\cdot + h) - u(\,\cdot\,)\|_{\Ell^p(\R^n)} \\
&\quad \leq \|u(\,\cdot + h) - \varphi(\,\cdot + h) \|_{\Ell^p(\R^n)} + \|\varphi(\,\cdot + h) - \varphi(\,\cdot\,) \|_{\Ell^p(\R^n)} + \|\varphi - u \|_{\Ell^p(\R^n)} \\
&\quad\leq \frac{2}{3}\,\delta + \|\varphi(\,\cdot + h) - \varphi(\,\cdot\,)\|_{\Ell^\infty(\R^n)} |\supp(\varphi)|^{\frac{1}{p}}
< \delta
\end{align*}
and the claim follows.
\end{proof}
\setcounter{equation}{3} %(Corrollary 4.7 is an exercise)
\begin{thm}
\label{thm:CinftyUpToBoundary}
Let $\Omega \subset \R^n$ be a domain satisfying the segment condition, $k \in \N$, and $p \in [1,\infty)$.
Then the set
$
\{ \varphi|_\Omega \colon \varphi \in \CC_0^\infty(\R^n) \}
$
is dense in $\WW^{k,p}(\Omega)$.
In particular, if in addition $\Omega \neq \R^n$, then for any $u \in \WW^{k,p}(\Omega)$ there is $(u_m)_{m \in \N} \subset \CC^\infty(\overline \Omega)$ such that $u_m \to u$ in $\WW^{k,p}(\Omega)$.
\end{thm}
\begin{proof}
We fix $u \in \WW^{k,p}(\Omega)$ and $\delta > 0$.
\begin{enumerate}[i)]
\item In a first step, we show that in case $\Omega$ is unbounded there exists $v \in \WW^{k,p}(\Omega)$ with $\supp(v)$ bounded and $\|u - v\|_{\WW^{k,p}(\Omega)} < \delta$.
By Lemma \ref{lem:cutoff}, there exists $\tau \in \CC_0^\infty(\BB_2(0))$ such that $0 \leq \tau \leq 1$, $\tau \equiv 1$ in $\overline{\BB_1(0)}$ and there is some $M = M(k) > 0$ such that $|\DD^\alpha \tau(x)| \leq M$ for all $x \in \R^n$ and all $|\alpha| \leq k$ (choose $K = \overline{\BB_1(0)}, \Omega= \BB_2(0), \delta = 1$ in Lemma \ref{lem:cutoff}).
For $\varepsilon \in (0,1)$, we define $\tau_\varepsilon \coloneqq \tau(\varepsilon x), x \in \R^n$.
Then $\tau_\varepsilon \equiv 1$ in $\overline{\BB_{\frac{1}{\varepsilon}}(0)}$, $\tau_\varepsilon \in \CC_0^\infty(\BB_{\frac{2}{\varepsilon}}(0))$, and
\begin{equation}
|\DD^\alpha \tau_\varepsilon(x)| \leq M \varepsilon^{|\alpha|} \leq M \quad\text{for all } |\alpha| \leq k.
\end{equation}
Hence, $v_\varepsilon \coloneqq \tau_\varepsilon u$ has bounded support and belongs to $\WW^{k,p}(\Omega)$ by Proposition \ref{prop:sobolevProperties} d).
It further satisfies for $|\alpha| \leq k$
$$
|\DD^\alpha v_\varepsilon(x)|
= \Big| \sum_{\beta \leq \alpha} \binom{\alpha}{\beta} \DD^\beta \tau_\varepsilon(x) \DD^{\alpha - \beta} u(x) \Big|
\leq M \sum_{\beta \leq \alpha} \binom{\alpha}{\beta} | \DD^{\alpha - \beta} u(x)| \quad\text{for all } x \in\Omega
$$
so that for all $\tilde\Omega \subset \Omega$ open we have
$$
\|v_\varepsilon\|_{\WW^{k,p}(\tilde\Omega)}
\leq \sum_{|\alpha|\leq k} \|\DD^\alpha v_\varepsilon\|_{\Ell^p(\tilde\Omega)}
\leq M \left( \sum_{|\alpha| \leq k} \sum_{\beta\leq\alpha} \binom{\alpha}{\beta} \right) \|u\|_{\WW^{k,p}(\tilde\Omega)}
\leq c(k)\, M\, \|u\|_{\WW^{k,p}(\tilde\Omega)}
$$
with some constant $c(k) > 0$.
Hence,
\begin{align*}
\|u - v_\varepsilon\|_{\WW^{k,p}(\Omega)}
&= \|u - v_\varepsilon\|_{\WW^{k,p}(\Omega \setminus \overline{\BB_{\frac{1}{\varepsilon}}(0)})}
\leq \|u\|_{\WW^{k,p}(\Omega \setminus \overline{\BB_{\frac{1}{\varepsilon}}(0)})} + \|v_\varepsilon\|_{\WW^{k,p}(\Omega \overline{\setminus \BB_{\frac{1}{\varepsilon}}(0)})} \\
&\leq (1 + c(k)\, M) \|u\|_{\WW^{k,p}(\Omega \setminus \overline{\BB_{\frac{1}{\varepsilon}}(0)})} \\
&\to 0 \quad\text{as } \varepsilon \to 0
\end{align*}
in view of $p < \infty$.
Hence, $\|u - v_\varepsilon\|_{\WW^{k,p}(\Omega)} < \delta$ for $\varepsilon > 0$ small enough and $v \coloneqq v_\varepsilon$ has bounded support.
\item In view of i) we may assume w.l.o.g. that $K \coloneqq \supp(u)$ is bounded and hence compact (if necessary, we replace $u$ by $v$).
For $x \in \partial\Omega$, let $U_x \subset \R^n$ be the open neighborhood of $x$ and $0 \neq y_x \in \R^n$ like in Definition \ref{defn:segmentCond}.
Then
$$
F \coloneqq K \setminus ( \bigcup_{x \in \partial\Omega} U_x )
$$
is compact with $F \subset \Omega$.
Hence, there is $U_0$ open such that $F \Subset U_0 \Subset \Omega$.
As $K$ is compact, there exist finitely many of the sets $U_x$ which we call $U_1,\dots,U_N$ such that $K \subset \bigcup_{i = 0}^N U_i$.
Moreover, we choose $V_i \Subset U_i$ open sets, $i = 0,\dots,N$, such that $K \subset \bigcup_{i = 0}^N V_i$ and $V_i$ is still a neighborhood of $x^i$ belonging to $U_i = U_{x^i}$.
By Lemma \ref{lem:partitionOfUnity} there is a partition of unity $\psi_0,\dots,\psi_N$ such that $\psi_i \in \CC_0^\infty(V_i)$, $0\leq \psi_i \leq 1$ for $i = 0,\dots,N,$ and $\sum_{i = 0}^N \psi_i(x) = 1$ for all $x \in K$.
Our aim is to find $\varphi_i \in \CC_0^\infty(\R^n)$ such that with $u_i \coloneqq \psi_i u$ we have
\begin{equation} \label{eq:diffUPhi}
\|u_i - \varphi_i\|_{\WW^{k,p}(\Omega)} < \frac{\delta}{N + 1} \quad\text{for all } i \in \{0,\dots,N\}.
\end{equation}
As $\supp(u_0) \Subset V_0 \Subset \Omega$, by Theorems \ref{thm:interiorApproximation} and \ref{thm:mollification} b) there exists $\varphi_0 \in \CC_0^\infty(\R^n)$ such that \eqref{eq:diffUPhi} holds for $i = 0$.
Next, we fix $i \in \{ 1, \dots, N\}$ and extend $u$ by $0$ outside $\Omega$.
Let $x^i \in \partial \Omega$ be the point belonging to $U_i$ ($U_i$ is a neighborhood of $x^i$) and
$$
\Gamma \coloneqq \overline{V_i} \cap \partial\Omega.
$$
As $\psi_i = 0$ on $\partial \Omega \setminus \Gamma$, $u_i = 0$ on $\R^n \setminus \overline{\Omega}$, and $u_i \in \WW^{k,p}(\Omega)$ by Proposition \ref{prop:sobolevProperties}, we get $u_i \in \WW^{k,p}(\R^n \setminus \Gamma)$.
Let $y \coloneqq y_{x_i}$ from the segment condition and
$$
\Gamma_t \coloneqq \{ x - ty \colon x \in \Gamma \},
$$
where
$$
0 < t < \min\{1, \frac{1}{|y|} \dist(\partial V_i, \partial U_i)\}.
$$
By the choice of $t$, we have $\Gamma_t \subset U_i$ and $\Gamma_t \cap \overline{\Omega} = \emptyset$.
The latter follows from the segment condition: For $z = x - sy$ with $x \in \Gamma$ and $s \in (0,1)$ we have $z + sy = x \in \Gamma \subset \partial\Omega$.
Hence, $z \notin\overline{\Omega}$ so that $\Gamma_t \cap \overline\Omega = \emptyset$.
Define
$$
w_t(x) \coloneqq u_i(x + ty) \quad\text{for all } x \in \R^n.
$$
As $u_i \in \WW^{k,p}(\R^n \setminus \Gamma)$, we have $w_t \in \WW^{k,p}(\R^n\setminus \Gamma_t)$.
Hence, Proposition \ref{prop:continuousTrans} yields that $\DD^\alpha w_t \to \DD^\alpha u_i$ in $\Ell^p(\Omega)$ as $t \downarrow 0$ for all $|\alpha| \leq k$ (since $\overline\Omega \subset \R^n \setminus \Gamma_t$) and we can choose $t$ small enough such that $\|w_t - u_i \|_{\WW^{k,p}(\Omega)} \leq \frac{\delta}{2 ( N + 1 )}$.
Moreover, since $u \in \Ell^p(\Omega)$ and $u = 0$ on $\R^n \setminus \Omega$, we have $u \in \Ell^p(\R^n)$, $u_i = \psi_i u \in \Ell^p(\R^n)$, and $w_t \in \Ell^p(\R^n)$.
Since $\supp(u_i) \subset \overline \Omega \cap V_i$, $w_t$ has compact support in $\R^n$.
Hence, by Theorem \ref{thm:mollifier} $\varphi_i \coloneqq \eta_\varepsilon \ast w_t$ belongs to $\CC_0^\infty(\R^n)$ for $\varepsilon > 0$.
As $\dist(\Gamma_t , \overline\Omega) > 0$, we may choose $\varepsilon > 0$ small enough such that $\|\varphi_i - w_t \|_{\WW^{k,p}(\Omega)} < \frac{\delta}{2(N+1)}$ (as $\Omega \cap \supp(w_t) \Subset \R^n \setminus \Gamma_t$ and $w_t \in \WW^{k,p}(\R^n \setminus \Gamma_t)$ we may apply Theorem \ref{thm:interiorApproximation}).
Altogether, $\varphi_i \in \CC_0^\infty(\R^n)$ satisfies $\|u_i - \varphi_i\| \leq \frac{\delta}{N + 1}$ and \eqref{eq:diffUPhi} holds for all $i \in \{0,\dots,N\}$.
As $u = \sum_{i = 1}^n u_i$, the function
$$\varphi \coloneqq \sum_{i = 0}^N \varphi_i \in \CC_0^\infty(\R^n)$$
satisfies $\| u - \varphi \|_{\WW^{k,p}(\Omega)} \leq \delta$.
\item Combining i) and ii), the claim is proved. \qedhere
\end{enumerate}
\end{proof}
As a Corollary, we see that $\WW_0^{k,p}(\R^n)$ and $\WW^{k,p}(\R^n)$ coincide.
\begin{cor}
\label{cor:W0andWcoincide}
For $k \in \N$ and $p \in [1,\infty)$, we have $\WW_0^{k,p}(\R^n) = \WW^{k,p}(\R^n)$.
\end{cor}
\begin{proof}
Given $u \in \WW^{k,p}(\R^n)$ by part i) of the proof of Theorem \ref{thm:CinftyUpToBoundary}, there exists $v \in\WW^{k,p}(\R^n)$ with $K\coloneqq \supp(v)$ compact and $$\|u - v\|_{\WW^{k,p}(\R^n)} \leq \frac{\delta}{2}.$$
But then there is $V_0$ open such that $K \Subset V_0 \Subset \R^n$ and by Theorems \ref{thm:interiorApproximation} and \ref{thm:mollification} b) there is $\varepsilon > 0$ small enough such that $v_\varepsilon = \eta_\varepsilon \ast v \in \CC_0^\infty(V_0)$ and
$$
\|v - v_\varepsilon\|_{\WW^{k,p}(\R^n)} = \|v - v_\varepsilon\|_{\WW^{k,p}(V_0)} < \frac{\delta}{2}.
$$
Hence, $\|u - v_\varepsilon\|_{\WW^{k,p}(\R^n)} < \delta$ and $v_\varepsilon \in \CC_0^\infty(\R^n)$.
\end{proof}