🧮 Brain Teaser

The Stone–Weierstrass Shortcut: When Does a Subalgebra Separate Points?

Let AA be the set of all continuous functions f:[0,1]→Rf : [0,1] \to \mathbb{R} of the form

f(x)=∑k=0Nakx2kf(x) = \sum_{k=0}^{N} a_k x^{2k}

for some N≥0N \geq 0 and real coefficients aka_k. That is, AA is the algebra of all polynomials in x2x^2.

Question: Is AA dense in C([0,1])C([0,1]) (with the sup-norm)?

Now consider instead

B={f∈C([0,1]):f(x)=∑k=0Nakx2k+1}B = \left\{ f \in C([0,1]) : f(x) = \sum_{k=0}^{N} a_k x^{2k+1} \right\}

the algebra generated by xx (all polynomials in xx with only odd powers, plus the zero function).

Which of AA and BB is dense in C([0,1])C([0,1]), and which is not? Identify the precise obstruction for the one that fails.

Stone-Weierstrassapproximation theorysubalgebrasC([0,1])density

Answer: Stone–Weierstrass: Even vs Odd Power Subalgebras

Key Idea / Intuition

The Stone–Weierstrass theorem says a subalgebra of C(K)C(K) is dense if and only if it separates points and contains a nonzero constant. The algebra AA (even powers) contains the constant function 11 (take k=0k=0, a0=1a_0 = 1) and separates points on [0,1][0,1], so it is dense. The algebra BB (odd powers only) contains no nonzero constants — every function in BB vanishes at x=0x=0 — and therefore cannot approximate, say, f≡1f \equiv 1.


Formal Proof / Solution

AA is dense in C([0,1])C([0,1])

AA consists of all polynomials in the variable u=x2u = x^2. Since x∈[0,1]x \in [0,1], we have u∈[0,1]u \in [0,1] as well, and the map x↦x2x \mapsto x^2 is a bijection from [0,1][0,1] onto [0,1][0,1].

More precisely, define φ:[0,1]→[0,1]\varphi : [0,1] \to [0,1] by φ(x)=x2\varphi(x) = x^2. Any f∈C([0,1])f \in C([0,1]) defines g=f∘φ−1∈C([0,1])g = f \circ \varphi^{-1} \in C([0,1]) (since φ−1(u)=u\varphi^{-1}(u) = \sqrt{u} is continuous on [0,1][0,1]). By the classical Weierstrass approximation theorem, polynomials in uu are dense in C([0,1])C([0,1]), so gg can be approximated by some p(u)=∑akukp(u) = \sum a_k u^k. Then

f(x)=g(x2)≈p(x2)=∑akx2k∈A.f(x) = g(x^2) \approx p(x^2) = \sum a_k x^{2k} \in A.

Hence AA is dense. Equivalently, by the Stone–Weierstrass theorem: AA is a subalgebra of C([0,1])C([0,1]) that

  1. contains constants: f≡1∈Af \equiv 1 \in A (set a0=1a_0 = 1, N=0N=0),
  2. separates points: for x≠yx \neq y in [0,1][0,1], x2≠y2x^2 \neq y^2 (since both are nonnegative and distinct implies their squares are distinct on [0,1][0,1]).

So AA is dense by Stone–Weierstrass. ✓\checkmark


BB is not dense in C([0,1])C([0,1])

Every function f∈Bf \in B has the form f(x)=a1x+a3x3+⋯+a2N+1x2N+1f(x) = a_1 x + a_3 x^3 + \cdots + a_{2N+1} x^{2N+1}, so in particular

f(0)=0for every f∈B.f(0) = 0 \quad \text{for every } f \in B.

The closure of BB in the sup-norm therefore satisfies: every g∈B‾g \in \overline{B} must also satisfy g(0)=0g(0) = 0 (since uniform limits preserve pointwise values). But the constant function f≡1f \equiv 1 satisfies f(0)=1≠0f(0) = 1 \neq 0, so

1∉B‾.1 \notin \overline{B}.

Hence BB is not dense in C([0,1])C([0,1]).

The precise obstruction: BB is contained in the proper closed subspace

{f∈C([0,1]):f(0)=0},\{ f \in C([0,1]) : f(0) = 0 \},

so its closure can be at most this proper subspace—far from all of C([0,1])C([0,1]).


Summary

| Algebra | Contains constants? | Separates points? | Dense in C([0,1])C([0,1])? | |---------|-------------------|-------------------|----------------------| | AA (even powers x2kx^{2k}) | ✓ (constant 1) | ✓ | Yes | | BB (odd powers x2k+1x^{2k+1}) | ✗ (all vanish at 0) | ✓ | No |

The Stone–Weierstrass theorem makes the failure of BB structural and inevitable: lacking constants is a fatal obstruction when the base point is in the domain.

Type: analysisEdit on GitHub ↗