Tutorials › Real Analysis › Applications of Stone-Weierstrass

Approximation Theory · Tutorial 645 of 1000

Applications of Stone-Weierstrass

Learn how Stone-Weierstrass applies to transformed coordinates, rational expressions, and reciprocal functions.

Advanced 10 min read

What You'll Learn

  • Use a continuous injective coordinate to approximate functions by polynomials in that coordinate.
  • Apply Stone-Weierstrass to powers and other transformations of the identity.
  • Build dense rational-function algebras from coordinates with poles outside the compact set.
  • Prove that a closed unital subalgebra contains the reciprocal of each of its nowhere-zero functions.
  • Distinguish an existence result for approximation from an explicit error estimate.

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.

Theorem (Approximation in an Injective Coordinate): Let \(K\subseteq\mathbb{R}\) be nonempty and compact, and let \(\phi:K\to\mathbb{R}\) be continuous and injective. For every \(f\in C(K)\) and every \(\varepsilon>0\), there is a real polynomial \(p\) such that $$ \sup_{x\in K}|f(x)-p(\phi(x))|<\varepsilon. $$

Proof. Define

$$ A_\phi=\{p\circ\phi:p\in\mathbb{R}[t]\}\subseteq C(K), $$

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

$$ \bigl(p(\phi(x))\bigr)\bigl(q(\phi(x))\bigr)=(pq)(\phi(x)). $$

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

$$ \sup_{-1\leq x\leq1}|f(x)-p(x^3)|<\varepsilon. $$

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

$$ |F(t)-p(t)|<\varepsilon \qquad(-1\leq t\leq1). $$

Substituting \(t=x^3\), which lies in \([-1,1]\), gives

$$ \bigl||x|-p(x^3)\bigr| =|F(x^3)-p(x^3)| <\varepsilon \qquad(-1\leq x\leq1). $$

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]\),

$$ F(e^x)=(\log(e^x))^2=x^2. $$

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

$$ |x^2-p(e^x)|=|F(e^x)-p(e^x)|<\varepsilon \qquad(0\leq x\leq1). $$

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

$$ F(t)=\sqrt{\frac{1}{t}-1} \qquad\left(\frac12\leq t\leq1\right). $$

The expression under the square root is nonnegative on this interval, and \(F\) is continuous there. Direct substitution verifies the target identity:

$$ F\left(\frac{1}{1+x}\right) =\sqrt{\frac{1}{1/(1+x)}-1} =\sqrt{1+x-1} =\sqrt{x}. $$

Given \(\varepsilon>0\), choose a polynomial \(p\) that approximates \(F\) within \(\varepsilon\) on \([1/2,1]\). Then

$$ \left|\sqrt{x}-p\left(\frac{1}{1+x}\right)\right|<\varepsilon \qquad(0\leq x\leq1). $$

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.

Theorem (Reciprocals in a Closed Unital Subalgebra): Let \(B\) be a closed unital subalgebra of \(C(K)\). If \(f\in B\) and \(f(x)\ne0\) for every \(x\in K\), then \(1/f\in B\).

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

$$ \sup_{t\in f(K)}\left|q_n(t)-\frac1t\right|\longrightarrow0. $$

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

$$ \left|q_n(f(x))-\frac1{f(x)}\right| \leq \sup_{t\in f(K)}\left|q_n(t)-\frac1t\right|. $$

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

$$ \frac1{2+x} =\frac13\frac1{1-\frac{1-x}{3}}. $$

This identity holds because \(1-(1-x)/3=(2+x)/3\). For each integer \(N\geq0\), define the polynomial

$$ p_N(x)=\frac13\sum_{n=0}^{N}\left(\frac{1-x}{3}\right)^n. $$

The finite geometric-sum identity, with \(r=(1-x)/3\), gives

$$ \frac1{2+x}-p_N(x) =\frac13\frac{r^{N+1}}{1-r} =\frac{r^{N+1}}{2+x}. $$

For \(x\in[0,1]\), \(0\leq r\leq1/3\) and \(2+x\geq2\). Therefore

$$ \left|\frac1{2+x}-p_N(x)\right| \leq\frac{(1/3)^{N+1}}{2} =\frac{1}{2\cdot3^{N+1}}. $$

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.

Takeaway: Stone-Weierstrass applies to any unital algebra that separates points, including polynomial algebras in injective coordinates. In addition, closed unital subalgebras of \(C(K)\) contain reciprocals of their nowhere-zero functions.

Check Your Understanding

Use the results and examples in this tutorial to answer the following questions.

  1. Why does a continuous injective function \(\phi:K\to\mathbb{R}\) ensure that the algebra of polynomials in \(\phi\) separates points?
  2. For the coordinate \(\phi(x)=x^3\) on \([-1,1]\), what continuous function of \(t\) corresponds to the target \(f(x)=|x|\)?
  3. Why does \(1/(1+x)\) define a valid approximation coordinate on \([0,1]\), even though its formula has a potential pole at \(x=-1\)?
  4. In the reciprocal theorem, where is compactness used to approximate \(1/t\) by polynomials?
  5. Why must the function \(f\) in that theorem have no zeros on \(K\)?
  6. What additional information does the geometric-series example provide that Stone-Weierstrass alone does not?