Tutorials › Real Analysis › Proof of the Algebra of Continuous Functions

Continuity · Tutorial 345 of 1000

Proof of the Algebra of Continuous Functions

Learn how continuity behaves under pointwise algebraic operations and how to prove continuity of a nested expression by induction.

Intermediate 10 min read

What You'll Learn

  • Define the pointwise sum, difference, scalar multiple, product, and quotient of functions
  • Use earlier continuity theorems to establish closure of continuous functions under these operations
  • Understand when continuous functions form a real algebra
  • Prove continuity of finite nested algebraic expressions by induction
  • Check a quotient’s domain before asserting that it is continuous

Algebraic Operations on Functions

Earlier tutorials established continuity results for sums, differences, products, and quotients. Here we organize those results into one statement about functions as a collection: if we start with continuous functions and combine them using the usual pointwise algebraic operations, when is the resulting function continuous? The key is to distinguish the algebraic operation from its domain. Sums and products are defined wherever both inputs are defined; a quotient also requires a nonzero denominator.

Let \(E\subseteq\mathbb{R}\). If \(f,g:E\to\mathbb{R}\), their pointwise sum, difference, and product are the functions

$$ (f+g)(x)=f(x)+g(x),\qquad (f-g)(x)=f(x)-g(x),\qquad (fg)(x)=f(x)g(x) $$

for \(x\in E\). If \(c\in\mathbb{R}\), the scalar multiple \(cf\) is defined by \((cf)(x)=cf(x)\). For a quotient, the domain must be specified:

Definition: For \(f,g:E\to\mathbb{R}\), let \(D=\{x\in E:g(x)\ne0\}\). The quotient \(f/g:D\to\mathbb{R}\) is defined by \((f/g)(x)=f(x)/g(x)\) for \(x\in D\).

The function \(f/g\) is not, in general, a function on all of \(E\). It is a function on \(E\) only when \(g(x)\ne0\) for every \(x\in E\). This domain condition remains part of the conclusion whenever a quotient appears.

The Continuous Functions Form an Algebra

Write \(C(E)\) for the set of all continuous functions from \(E\) to \(\mathbb{R}\). If \(E\) is nonempty, the pointwise operations make \(C(E)\) a real algebra: it is closed under addition, subtraction, scalar multiplication, and multiplication, and it contains the constant functions. The word “pointwise” matters. For example, the product of two functions is formed by multiplying their values at each same input \(x\).

Theorem: Let \(E\subseteq\mathbb{R}\). If \(f,g\in C(E)\) and \(c\in\mathbb{R}\), then \(f+g\), \(f-g\), \(cf\), and \(fg\) belong to \(C(E)\). Every constant function on \(E\) is in \(C(E)\). If \(g(x)\ne0\) for every \(x\in E\), then \(f/g\in C(E)\) as well.

Proof. The Continuity of Sums theorem gives continuity of \(f+g\), and the Continuity of Differences theorem gives continuity of \(f-g\). The Continuity of Products theorem gives continuity of \(fg\). A constant function is continuous by the result in “Continuity of Constant Functions.” Also, the constant function with value \(c\) is continuous, so \(cf\), its product with \(f\), is continuous by the product theorem. Finally, if \(g\) is nowhere zero on \(E\), then the quotient is defined throughout \(E\). The quotient continuity theorem from “Continuity of Quotients” (equivalently, the pointwise result in “Continuity of Rational Functions”) gives continuity of \(f/g\) at each point of \(E\). Thus \(f/g\in C(E)\). \(\square\)

This proof deliberately uses the earlier continuity theorems as tools rather than reproving them. Its new conclusion is the closure statement: the familiar operations can be performed within \(C(E)\), subject to the domain condition for division. The algebraic laws themselves also hold pointwise. For instance, at every \(x\in E\),

$$ ((f+g)+h)(x)=(f(x)+g(x))+h(x) =f(x)+(g(x)+h(x))=(f+(g+h))(x). $$

Because real-number addition is associative, the two functions are equal. The same pointwise reasoning gives commutativity and distributivity, as well as the usual identities involving zero and one. Thus algebraic calculations with functions are justified by the corresponding real-number laws at each input. When \(E\) is empty, there is a unique function from \(E\) to \(\mathbb{R}\), and the continuity assertions are vacuous; the usual nonempty-domain formulation avoids any convention about whether a one-element function collection is called a unital algebra.

Worked Example: Combining Two Continuous Polynomial Functions

Let \(f(x)=x^2-1\) and \(g(x)=3x+2\) on \(\mathbb{R}\), and define

$$ H(x)=2f(x)^2-3f(x)g(x)+4g(x)+1. $$

Both \(f\) and \(g\) are polynomials, so they are continuous on \(\mathbb{R}\) by “Continuity of Polynomial Functions.” The theorem above shows that their squares, products, scalar multiples, sums, and differences are continuous. Therefore \(H\) is continuous on \(\mathbb{R}\).

For a direct check of the algebra at \(x=1\), \(f(1)=1^2-1=0\) and \(g(1)=3(1)+2=5\). Hence

$$ H(1)=2(0)^2-3(0)(5)+4(5)+1=0-0+20+1=21. $$

The continuity conclusion does not depend on simplifying the whole expression or finding a formula for its zeros. It follows from the operations used to build \(H\).

Continuity of Finite Algebraic Expressions

Expressions can be nested: a product may occur inside a sum, or a quotient may have a denominator that is itself a sum of products. Repeatedly applying the closure theorem works, but it is useful to state the general method precisely. We construct an expression in stages, beginning with continuous functions and constants, and then applying allowed operations. At every division stage, the denominator must be nonzero at every point of the domain under consideration.

Theorem: Let \(E\subseteq\mathbb{R}\), and let \(f_1,\ldots,f_n:E\to\mathbb{R}\) be continuous. Any function obtained from \(f_1,\ldots,f_n\) and constant functions by finitely many pointwise additions, subtractions, multiplications, and divisions is continuous on \(E\), provided each division used in constructing it has a denominator that is nowhere zero on \(E\).

Proof. We use induction on the number of operations used to construct the expression. With no operations, the expression is one of the given functions \(f_j\) or a constant function, and is continuous. Now suppose an expression is built by one further operation from expressions already constructed. By the induction hypothesis, each of those earlier expressions defines a continuous function on \(E\). If the new operation is addition, subtraction, or multiplication, the appropriate closure result in “Continuity of Sums,” “Continuity of Differences,” or “Continuity of Products” shows that the resulting function is continuous on \(E\). If the new operation is division, its denominator is nowhere zero on \(E\) by the stated condition, so the quotient continuity theorem shows that the resulting function is continuous on \(E\). In every case, adding this operation preserves continuity. Induction proves the assertion for any finite construction. \(\square\)

The induction tracks the construction, not the length of a written formula. Parentheses specify which functions are combined at each stage. The nonvanishing requirement also applies at the stage where a division is made: later algebraic cancellation cannot retroactively define a quotient at a point where its original denominator was zero.

Worked Example: A Denominator That Is Positive Everywhere

Consider the function

$$ h(x)=\frac{x+1}{x^2+(x-2)^2},\qquad x\in\mathbb{R}. $$

The numerator and denominator are polynomials, so each is continuous. To verify that the quotient is defined everywhere, rewrite the denominator:

$$ x^2+(x-2)^2 =x^2+(x^2-4x+4) =2x^2-4x+4 =2(x-1)^2+2. $$

Since \((x-1)^2\geq0\), this gives \(2(x-1)^2+2\geq2>0\) for every real \(x\). The denominator is therefore nowhere zero, and the finite-expression theorem implies that \(h\) is continuous on \(\mathbb{R}\). At \(x=1\), the numerator is \(1+1=2\), and the denominator is \(1^2+(1-2)^2=1+1=2\), so \(h(1)=2/2=1\).

Worked Example: A Quotient on Its Natural Domain

Let \(f(x)=x^2+2\) and \(g(x)=x-1\). Both are continuous on \(\mathbb{R}\), but the quotient \(f/g\) is defined only on \(D=\mathbb{R}\setminus\{1\}\). On this domain, \(g(x)\ne0\), so the quotient theorem shows that

$$ r(x)=\frac{x^2+2}{x-1} $$

is continuous on \(D\). The domain restriction is necessary: at \(x=1\), the original expression would have denominator \(1-1=0\), so \(r(1)\) is not defined. As checks at points in the domain, \(r(0)=(0^2+2)/(0-1)=2/(-1)=-2\), while \(r(2)=(2^2+2)/(2-1)=6/1=6\). Continuity holds at every point of \(D\), not at the excluded point as a value of this function.

Worked Example: A Reciprocal Built from a Sum of Squares

On \(E=\mathbb{R}\), set \(u(x)=x-1\) and \(v(x)=x+1\), and define

$$ s(x)=\frac{1}{u(x)^2+v(x)^2}. $$

The functions \(u\) and \(v\) are continuous. Their squares and sum are continuous by the algebra theorem. To check the denominator, calculate

$$ u(x)^2+v(x)^2 =(x-1)^2+(x+1)^2 =(x^2-2x+1)+(x^2+2x+1) =2x^2+2. $$

Because \(2x^2+2\geq2>0\) for every \(x\in\mathbb{R}\), the denominator never vanishes. The quotient is therefore continuous on all of \(\mathbb{R}\). At \(x=0\), \(u(0)=-1\) and \(v(0)=1\), so \(s(0)=1/[(-1)^2+1^2]=1/2\).

Domain Conditions and a Common Pitfall

The algebra of continuous functions is useful because it lets a complicated expression inherit continuity from its simpler pieces. But closure under division is not unconditional. Continuity of \(f\) and \(g\) does not make \(f/g\) a function at a point where \(g\) vanishes. Nor does a simplified-looking formula change the domain of the original expression automatically. To apply the closure result correctly, first identify the domain, then verify that each denominator used in the expression is nonzero there.

For sums and products, no comparable exclusion is needed: if \(f\) and \(g\) are defined on \(E\), then \(f+g\) and \(fg\) are defined on \(E\). In a nested expression with several divisions, the domain condition must be checked for every denominator at the stage it appears. Once those checks are complete, the induction theorem gives a reliable proof of continuity without requiring a new epsilon-delta argument for the entire expression.

Check Your Understanding

Use the closure theorem and the finite-expression proof to answer the following questions.

  1. If \(f,g\in C(E)\), which pointwise operations always give functions in \(C(E)\) on the same domain \(E\)?
  2. What additional condition is required before \(f/g\) belongs to \(C(E)\) on all of \(E\)?
  3. In the function \(h(x)=(x+1)/(x^2+(x-2)^2)\), what identity verifies that the denominator is positive for every real \(x\)?
  4. Why does the finite-expression theorem use induction on the number of operations?
  5. If a quotient’s numerator and denominator have a common factor, does cancelling that factor by itself define the original quotient at a point where its denominator was zero? Explain.