[proofplan]
We apply the [Stone--Weierstrass Theorem (Real Version)](/theorems/1217) to the subalgebra of trigonometric polynomials inside $C(\mathbb{T}; \mathbb{R})$, where $\mathbb{T}$ is the unit circle in $\mathbb{C}$ (a compact Hausdorff space). The identification $\theta \mapsto e^{i\theta}$ converts $2\pi$-periodic continuous functions on $\mathbb{R}$ to continuous functions on $\mathbb{T}$, and trigonometric polynomials in $\theta$ correspond to elements of the algebra generated by $\operatorname{Re}(e^{i\theta}) = \cos\theta$ and $\operatorname{Im}(e^{i\theta}) = \sin\theta$. We verify that this algebra separates points and vanishes at no point.
[/proofplan]
[step:Identify $C(\mathbb{T}; \mathbb{R})$ with continuous $2\pi$-periodic functions]
Let $\mathbb{T} := \{z \in \mathbb{C} : |z| = 1\}$ denote the unit circle, equipped with the subspace topology from $\mathbb{C}$. The map
\begin{align*}
\Phi: \mathbb{R} &\to \mathbb{T} \\
\theta &\mapsto e^{i\theta}
\end{align*}
is continuous, surjective, and $2\pi$-periodic. If $f: \mathbb{R} \to \mathbb{R}$ is continuous and $2\pi$-periodic, there is a unique continuous function $\tilde{f}: \mathbb{T} \to \mathbb{R}$ satisfying $f = \tilde{f} \circ \Phi$, and the correspondence $f \leftrightarrow \tilde{f}$ is an isometric isomorphism of Banach spaces $(C_{2\pi}(\mathbb{R}; \mathbb{R}), \|\cdot\|_\infty) \cong (C(\mathbb{T}; \mathbb{R}), \|\cdot\|_\infty)$. It therefore suffices to prove that the trigonometric polynomials are dense in $C(\mathbb{T}; \mathbb{R})$.
[/step]
[step:Define the subalgebra of trigonometric polynomials on $\mathbb{T}$]
A trigonometric polynomial on $\mathbb{T}$ is a function of the form
\begin{align*}
T: \mathbb{T} &\to \mathbb{R} \\
e^{i\theta} &\mapsto a_0 + \sum_{k=1}^{N} (a_k \cos k\theta + b_k \sin k\theta)
\end{align*}
for some $N \in \mathbb{N}$ and coefficients $a_0, a_1, \ldots, a_N, b_1, \ldots, b_N \in \mathbb{R}$. Let $\mathcal{A}$ denote the set of all such functions. Since $\cos\theta$ and $\sin\theta$ are well-defined continuous functions on $\mathbb{T}$ (they depend only on the point $e^{i\theta} \in \mathbb{T}$, not on the choice of $\theta$), and products and sums of trigonometric polynomials are trigonometric polynomials (by the product-to-sum identities $\cos\alpha\cos\beta = \frac{1}{2}[\cos(\alpha-\beta) + \cos(\alpha+\beta)]$, $\sin\alpha\sin\beta = \frac{1}{2}[\cos(\alpha-\beta) - \cos(\alpha+\beta)]$, $\sin\alpha\cos\beta = \frac{1}{2}[\sin(\alpha+\beta) + \sin(\alpha-\beta)]$), the set $\mathcal{A}$ is a subalgebra of $C(\mathbb{T}; \mathbb{R})$.
[/step]
[step:Verify that $\mathcal{A}$ separates points on $\mathbb{T}$]
Let $z_1, z_2 \in \mathbb{T}$ with $z_1 \neq z_2$. Write $z_j = e^{i\theta_j}$ for $\theta_j \in [0, 2\pi)$, $j = 1, 2$. Since $z_1 \neq z_2$, we have $\theta_1 \neq \theta_2 \pmod{2\pi}$. Consider the functions
\begin{align*}
c: \mathbb{T} \to \mathbb{R}, \quad e^{i\theta} \mapsto \cos\theta, \qquad s: \mathbb{T} \to \mathbb{R}, \quad e^{i\theta} \mapsto \sin\theta.
\end{align*}
Both belong to $\mathcal{A}$. If $\cos\theta_1 = \cos\theta_2$, then $\theta_1 = \pm\theta_2 + 2\pi m$ for some $m \in \mathbb{Z}$. Since $\theta_1 \neq \theta_2 \pmod{2\pi}$, we must have $\theta_1 = -\theta_2 + 2\pi m$, which gives $\sin\theta_1 = -\sin\theta_2 \neq \sin\theta_2$ (since $\sin\theta_2 \neq 0$ when $\theta_2 \neq 0, \pi$; if $\theta_2 = 0$ or $\pi$, then $\cos\theta_1 = \cos\theta_2$ and $\theta_1 = -\theta_2 + 2\pi m$ implies $\theta_1 = \theta_2 \pmod{2\pi}$, contradicting $z_1 \neq z_2$). Therefore either $c$ or $s$ separates $z_1$ and $z_2$.
[guided]
The pair $(\cos\theta, \sin\theta)$ jointly determines the point $e^{i\theta}$ on the unit circle, since $e^{i\theta} = \cos\theta + i\sin\theta$. Two distinct points on $\mathbb{T}$ must differ in at least one coordinate. The argument above makes this precise: if $\cos\theta_1 = \cos\theta_2$, then the two angles are symmetric about the real axis ($\theta_1 = -\theta_2 \bmod 2\pi$), and in that case $\sin\theta_1 = -\sin\theta_2$. Both sines being equal would then force $\sin\theta_2 = 0$, which (combined with $\cos\theta_1 = \cos\theta_2$) would force $z_1 = z_2$.
[/guided]
[/step]
[step:Verify that $\mathcal{A}$ vanishes at no point and apply Stone--Weierstrass]
The constant function $1$ is a trigonometric polynomial (take $N = 0$, $a_0 = 1$), so $1 \in \mathcal{A}$. In particular, for every $z \in \mathbb{T}$, there exists $T \in \mathcal{A}$ with $T(z) = 1 \neq 0$. Thus $\mathcal{A}$ vanishes at no point of $\mathbb{T}$.
We have verified that $\mathcal{A}$ is a subalgebra of $C(\mathbb{T}; \mathbb{R})$ that separates points and vanishes at no point of the compact Hausdorff space $\mathbb{T}$. By the [Stone--Weierstrass Theorem (Real Version)](/theorems/1217), $\overline{\mathcal{A}} = C(\mathbb{T}; \mathbb{R})$.
Translating back through the isometric isomorphism $C(\mathbb{T}; \mathbb{R}) \cong C_{2\pi}(\mathbb{R}; \mathbb{R})$: for every continuous $2\pi$-periodic function $f: \mathbb{R} \to \mathbb{R}$ and every $\varepsilon > 0$, there exists a trigonometric polynomial $T$ with $\|f - T\|_\infty < \varepsilon$.
[/step]