From Density to Useful Approximations
Stone-Weierstrass is more than a statement that a particular collection of polynomials is dense. Its practical value is that a suitable algebra of functions can be dense even when its elements are written in coordinates different from the identity function. This lets us choose expressions that fit a problem: powers of a transformed variable, exponentials, or rational functions with denominators that stay away from zero.
Throughout, let \(K\) be a nonempty compact subset of \(\mathbb{R}\), and let \(C(K)\) carry the supremum norm. We use the Real Stone-Weierstrass Theorem established earlier: a unital subalgebra of \(C(K)\) that separates points is dense in \(C(K)\). We also use the polynomial approximation corollary for compact subsets of \(\mathbb{R}\), and the result that the uniform closure of a unital subalgebra is itself a unital subalgebra.
Approximation in a Transformed Coordinate
Suppose a continuous function \(\phi:K\to\mathbb{R}\) assigns a distinct real coordinate to each point of \(K\). Instead of using polynomials in \(x\), consider polynomials in \(\phi(x)\). These functions form an algebra: sums and products of \(p(\phi(x))\) and \(q(\phi(x))\) are still polynomials in \(\phi(x)\), and the constant function \(1\) is included.
Proof. Define
where \(t\) denotes the polynomial variable. Since \(\phi\) is continuous, each \(p\circ\phi\) is continuous. The set \(A_\phi\) contains the constant functions. It is closed under addition and scalar multiplication because sums and scalar multiples of polynomials are polynomials. It is closed under multiplication because
Thus \(A_\phi\) is a unital subalgebra of \(C(K)\). If \(x,y\in K\) and \(x\ne y\), injectivity gives \(\phi(x)\ne\phi(y)\). The function \(\phi\), which belongs to \(A_\phi\) by taking \(p(t)=t\), therefore has different values at \(x\) and \(y\). So \(A_\phi\) separates points. The Real Stone-Weierstrass Theorem implies that \(A_\phi\) is dense in \(C(K)\). Applying density to \(f\) and \(\varepsilon\) gives the required polynomial \(p\). \(\square\)
The theorem is useful when the desired approximation is naturally expressed in a particular coordinate. Its hypothesis is not that \(\phi\) has a simple inverse formula, but that \(\phi\) is continuous and injective on the compact set in question. Injectivity ensures that the new coordinate does not identify two points that a target function might need to distinguish.
Worked Examples
Worked Example: Polynomials in a Cube Approximate Continuous Functions
Take \(K=[-1,1]\) and \(\phi(x)=x^3\). This function is continuous and injective on \(K\). The theorem says that for every \(f\in C[-1,1]\) and every \(\varepsilon>0\), some polynomial \(p\) satisfies
For the particular target \(f(x)=|x|\), define \(F(t)=|t|^{1/3}\) on \([-1,1]\). This is continuous, and \(F(x^3)=|x|\): indeed, \(|x^3|^{1/3}=|x|\). By polynomial approximation on \([-1,1]\), for any chosen \(\varepsilon>0\) there is a polynomial \(p\) such that
Substituting \(t=x^3\), which lies in \([-1,1]\), gives
Thus polynomials in \(x^3\) can approximate this target uniformly, even though \(p(x^3)\) has only powers of \(x\) whose exponents are multiples of three.
Worked Example: Approximating a Function Using Exponentials
On \(K=[0,1]\), let \(\phi(x)=e^x\). This function is continuous and strictly increasing, hence injective. The approximation theorem shows that every continuous \(f\) on \([0,1]\) can be uniformly approximated by expressions \(p(e^x)\), where \(p\) is a polynomial.
For example, take \(f(x)=x^2\). The range of \(\phi\) is \([1,e]\). On this range define \(F(t)=(\log t)^2\), which is continuous. For each \(x\in[0,1]\),
Polynomial approximation on \([1,e]\) gives, for each \(\varepsilon>0\), a polynomial \(p\) such that \(|F(t)-p(t)|<\varepsilon\) for all \(t\in[1,e]\). Since \(e^x\in[1,e]\) for \(x\in[0,1]\), substitution yields
The conclusion is an existence statement; it does not specify the coefficients of \(p\). It does show that exponentials can serve as an approximation coordinate just as the identity function can.
Worked Example: Rational Expressions with a Pole Outside the Set
Let \(K=[0,1]\) and take \(\phi(x)=1/(1+x)\). This is continuous on \(K\) because \(1+x\geq1\), and it is injective: if \(1/(1+x)=1/(1+y)\), multiplication by the positive denominators gives \(1+y=1+x\), so \(x=y\). Consequently, polynomials in \(1/(1+x)\) are dense in \(C[0,1]\).
For the target \(f(x)=\sqrt{x}\), the range of \(\phi\) is \([1/2,1]\). Define
The expression under the square root is nonnegative on this interval, and \(F\) is continuous there. Direct substitution verifies the target identity:
Given \(\varepsilon>0\), choose a polynomial \(p\) that approximates \(F\) within \(\varepsilon\) on \([1/2,1]\). Then
Each approximant is a rational expression whose denominator is a power of \(1+x\), so it has no pole on \([0,1]\). This illustrates how a coordinate with a pole outside the domain can generate a dense approximation algebra.
Reciprocals in Closed Algebras
A second useful application concerns division. An algebra is closed under sums and products, but it need not contain the reciprocal of each of its nonzero elements. Uniform closure changes this: a closed unital subalgebra of \(C(K)\) contains the reciprocal of each of its functions that never vanish.
Proof. Since \(f\) is continuous and \(K\) is compact, \(f(K)\) is compact. The assumption that \(f\) never vanishes means \(0\notin f(K)\). The function \(t\mapsto1/t\) is continuous on \(f(K)\), so the polynomial approximation corollary gives polynomials \(q_n\) such that
Because \(B\) is a unital algebra and \(f\in B\), each \(q_n(f)\) belongs to \(B\): if \(q_n(t)=\sum_{j=0}^{m}c_jt^j\), then \(q_n(f)=\sum_{j=0}^{m}c_j f^j\), with the constant term represented using the unit of \(B\). For every \(x\in K\), \(f(x)\in f(K)\), and hence
Taking the supremum over \(x\in K\) shows that \(q_n(f)\) converges uniformly to \(1/f\). Since \(B\) is closed in the supremum norm and each \(q_n(f)\) belongs to \(B\), its limit \(1/f\) also belongs to \(B\). \(\square\)
Worked Example: Polynomial Approximation of a Reciprocal
On \([0,1]\), the function \(f(x)=2+x\) is a polynomial and is bounded away from zero, since \(2+x\geq2\). Its reciprocal can be approximated directly by polynomials. Rewrite it as
This identity holds because \(1-(1-x)/3=(2+x)/3\). For each integer \(N\geq0\), define the polynomial
The finite geometric-sum identity, with \(r=(1-x)/3\), gives
For \(x\in[0,1]\), \(0\leq r\leq1/3\) and \(2+x\geq2\). Therefore
This explicit sequence not only confirms that the reciprocal lies in the uniform closure of the polynomial algebra, but also gives a concrete error bound for this particular function.
What These Applications Do—and Do Not—Give
The transformed-coordinate theorem provides a simple test for density: if a continuous coordinate is injective, its polynomial algebra separates points, so Stone-Weierstrass applies. This can make an approximation family easier to use or better suited to the structure of a problem. The reciprocal theorem gives a related structural consequence: uniform limits in a closed unital algebra can support division whenever the denominator has no zeros on the compact domain.
A common pitfall is to confuse density with an error estimate. Stone-Weierstrass guarantees that an approximant exists for each positive tolerance; by itself, it does not give a degree bound or a formula for the polynomial. The geometric-series example supplies such a bound because its special algebraic structure allows a direct calculation. In other situations, rates require additional information about the target function and a separate approximation theorem.
The no-zero condition in the reciprocal result is essential. If \(f(x_0)=0\) at some point \(x_0\), then \(1/f\) is not a real-valued continuous function on all of \(K\), so it cannot belong to \(C(K)\). Compactness helps ensure that a continuous function with no zeros stays a positive distance from zero, which is precisely what makes reciprocal approximation possible on its range.
Check Your Understanding
Use the results and examples in this tutorial to answer the following questions.
- Why does a continuous injective function \(\phi:K\to\mathbb{R}\) ensure that the algebra of polynomials in \(\phi\) separates points?
- For the coordinate \(\phi(x)=x^3\) on \([-1,1]\), what continuous function of \(t\) corresponds to the target \(f(x)=|x|\)?
- Why does \(1/(1+x)\) define a valid approximation coordinate on \([0,1]\), even though its formula has a potential pole at \(x=-1\)?
- In the reciprocal theorem, where is compactness used to approximate \(1/t\) by polynomials?
- Why must the function \(f\) in that theorem have no zeros on \(K\)?
- What additional information does the geometric-series example provide that Stone-Weierstrass alone does not?