[proofplan]
We prove $\mathcal{S}(\mathbb{R}^n)$ is dense in $L^p(\mathbb{R}^n)$ for $1 \le p < \infty$ by factoring the approximation through a chain: every $L^p$ function is approximable by simple functions (standard measure theory), every simple function by $C_c^\infty$ functions (mollification), and $C_c^\infty \subseteq \mathcal{S}$. The key technical ingredient is that convolution with a smooth approximate identity converges in $L^p$, proved via Minkowski's integral inequality and the continuity of translation in $L^p$.
[/proofplan]
[step:Verify the inclusion chain $C_c^\infty(\mathbb{R}^n) \subseteq \mathcal{S}(\mathbb{R}^n) \subseteq L^p(\mathbb{R}^n)$]
The first inclusion is immediate: if $f \in C_c^\infty(\mathbb{R}^n)$ is supported in $B(0, R)$, then $x^\alpha \partial^\beta f$ is continuous and supported in $B(0, R)$ for every pair of multi-indices $\alpha, \beta$, hence bounded, giving $\|f\|_{\alpha,\beta} < \infty$.
For the second inclusion, let $f \in \mathcal{S}(\mathbb{R}^n)$ and choose an integer $N > n/p$. There exists $C_N > 0$ (depending on finitely many seminorms of $f$) such that $|f(x)| \le C_N (1 + |x|)^{-2N}$ for all $x \in \mathbb{R}^n$. Then
\begin{align*}
\|f\|_{L^p}^p &\leq C_N^p \int_{\mathbb{R}^n} (1 + |x|)^{-2Np} \, d\mathcal{L}^n(x).
\end{align*}
Passing to polar coordinates, the integrand decays like $r^{n-1-2Np}$ as $r \to \infty$, and $n - 1 - 2Np < -1$ since $2Np > 2n > n$, so the integral converges.
[/step]
[step:Approximate $L^p$ functions by simple functions]
Let $f \in L^p(\mathbb{R}^n)$ and $\varepsilon > 0$. By the standard construction of the Lebesgue integral, there exists a simple function $s = \sum_{k=1}^N c_k \, \mathbb{1}_{E_k}$, where each $E_k \subseteq \mathbb{R}^n$ has $\mathcal{L}^n(E_k) < \infty$, such that $\|f - s\|_{L^p} < \varepsilon / 2$. (For $f \geq 0$, approximate from below by simple functions and apply the [Monotone Convergence Theorem](/theorems/509); the general case follows by decomposing into positive and negative parts.)
It therefore suffices to approximate each $\mathbb{1}_{E_k}$ by a $C_c^\infty$ function in $L^p$.
[/step]
[step:Approximate indicator functions by $C_c^\infty$ functions via mollification]
Let $E \subseteq \mathbb{R}^n$ with $\mathcal{L}^n(E) < \infty$ and $1 \leq p < \infty$. Fix a [standard mollifier](/page/Standard%20Mollifier) $\eta \in C_c^\infty(\mathbb{R}^n)$ with $\eta \geq 0$, $\mathrm{supp}(\eta) \subseteq B(0,1)$, and $\int_{\mathbb{R}^n} \eta \, d\mathcal{L}^n = 1$, and define the rescaled mollifier
\begin{align*}
\eta_\delta: \mathbb{R}^n &\to \mathbb{R} \\
x &\mapsto \delta^{-n} \, \eta(x/\delta).
\end{align*}
Then $\mathbb{1}_E * \eta_\delta \in C_c^\infty(\mathbb{R}^n)$ for each $\delta > 0$ (smoothness follows from differentiating under the integral; compact support follows from replacing $E$ by $E \cap B(0, R)$ for large $R$). The $L^p$ convergence $\|\mathbb{1}_E * \eta_\delta - \mathbb{1}_E\|_{L^p} \to 0$ as $\delta \to 0$ follows from the estimate
\begin{align*}
\|\mathbb{1}_E * \eta_\delta - \mathbb{1}_E\|_{L^p} &\leq \int_{\mathbb{R}^n} \eta_\delta(y) \, \|\tau_y \mathbb{1}_E - \mathbb{1}_E\|_{L^p} \, d\mathcal{L}^n(y) \le \sup_{|y| \leq \delta} \|\tau_y \mathbb{1}_E - \mathbb{1}_E\|_{L^p},
\end{align*}
obtained via Minkowski's integral inequality (with $\tau_y g(x) = g(x - y)$), and the continuity of translation in $L^p$.
[guided]
The Minkowski integral inequality step deserves explanation. We write
\begin{align*}
(\mathbb{1}_E * \eta_\delta)(x) - \mathbb{1}_E(x) &= \int_{\mathbb{R}^n} \eta_\delta(y) \left(\mathbb{1}_E(x - y) - \mathbb{1}_E(x)\right) d\mathcal{L}^n(y),
\end{align*}
which expresses the error as an average of translations. Minkowski's integral inequality (the continuous analogue of the triangle inequality for integrals) bounds the $L^p_x$ norm of this average by
\begin{align*}
\|\mathbb{1}_E * \eta_\delta - \mathbb{1}_E\|_{L^p} &\leq \int_{\mathbb{R}^n} \eta_\delta(y) \, \|\tau_y \mathbb{1}_E - \mathbb{1}_E\|_{L^p} \, d\mathcal{L}^n(y).
\end{align*}
Since $\mathrm{supp}(\eta_\delta) \subseteq B(0, \delta)$ and $\int \eta_\delta \, d\mathcal{L}^n = 1$, the right-hand side is bounded by $\sup_{|y| \le \delta} \|\tau_y \mathbb{1}_E - \mathbb{1}_E\|_{L^p}$.
Why does $\|\tau_y g - g\|_{L^p} \to 0$ as $|y| \to 0$? For $g \in C_c(\mathbb{R}^n)$, uniform continuity and compact support give $\|\tau_y g - g\|_{L^p}^p \le \mathcal{L}^n(B(0, R+1)) \cdot \sup_x |g(x-y) - g(x)|^p \to 0$. For general $g \in L^p$, approximate by $\psi \in C_c(\mathbb{R}^n)$ with $\|g - \psi\|_{L^p} < \varepsilon/3$ and use the triangle inequality $\|\tau_y g - g\|_{L^p} \le 2\|g - \psi\|_{L^p} + \|\tau_y \psi - \psi\|_{L^p}$, where the first term uses translation-invariance of $\mathcal{L}^n$.
[/guided]
[/step]
[step:Assemble the approximation]
Fix $f \in L^p(\mathbb{R}^n)$ and $\varepsilon > 0$. Choose a simple function $s = \sum_{k=1}^N c_k \, \mathbb{1}_{E_k}$ with $\|f - s\|_{L^p} < \varepsilon / 2$. By the mollification step, for each $k$ there exists $\phi_k \in C_c^\infty(\mathbb{R}^n)$ with
\begin{align*}
\|\mathbb{1}_{E_k} - \phi_k\|_{L^p} &< \frac{\varepsilon}{2N(\max_{1 \leq k \leq N} |c_k| + 1)}.
\end{align*}
Define $\phi = \sum_{k=1}^N c_k \, \phi_k \in C_c^\infty(\mathbb{R}^n) \subseteq \mathcal{S}(\mathbb{R}^n)$. The triangle inequality gives
\begin{align*}
\|f - \phi\|_{L^p} &\leq \|f - s\|_{L^p} + \sum_{k=1}^N |c_k| \cdot \|\mathbb{1}_{E_k} - \phi_k\|_{L^p} < \frac{\varepsilon}{2} + \frac{\varepsilon}{2} = \varepsilon.
\end{align*}
Since $\varepsilon > 0$ was arbitrary, $\mathcal{S}(\mathbb{R}^n)$ is dense in $L^p(\mathbb{R}^n)$.
[/step]