4.4 Continuity

Another major concept in analysis is that of continuity (again, we came across this earlier, but it’s worth revisiting this concept not that we’ve formally defined limits and convergence). Suppose we have a function ff and a convergent sequence xnxx_n \to x. Do we know that as f(xn)f(x)f(x_n) \to f(x)? The answer is that no, this doesn’t always happen. Only some functions have this property, and those functions are said to be “continuous”. Below is the formal definition.

Definition. A function ff is said to be continuous at the point x0x_0 if for every ϵ>0\epsilon> 0, there exists δ>0\delta > 0 such that f(x)f(x0)<ϵ\lvert f(x) - f(x_0)\rvert < \epsilon for all x:xx0<δx: \lvert x-x_0\rvert < \delta. If ff is continuous at every point in its domain, then the entire function ff is said to be continuous.

This is similar to the concept of convergent sequences, except now instead of a countable sequence of points x1,x2,x_1, x_2, \ldots, we are concerned with all the points in the “neighborhood” {x:xx0<δ}\{x: \lvert x-x_0\rvert < \delta\}; that is, the points near x0x_0. Many of the techniques that we encountered earlier with convergence are very similar to the techniques one uses with continuity. These techniques are often referred to as “delta-epsilon” techniques. For example, the techniques used in the following proof should look fairly familiar by now.

Theorem. Suppose xnx0x_n \to x_0 and ff is continuous at x0x_0. Then f(xn)f(x0)f(x_n) \to f(x_0).

Proof. Let ϵ>0\epsilon> 0. δ:xx0<δ    f(x)f(x0)<ϵf continuous at x0N:n>N    xnx0<δxnx0\begin{alignat*}{2} &\exists \delta: \lvert x-x_0\rvert < \delta \implies \lvert f(x) - f(x_0)\rvert < \epsilon&\hspace{4em}& f \text{ continuous at } x_0 \\ &\exists N: n > N \implies \lvert x_n - x_0\rvert < \delta && x_n \to x_0 \end{alignat*} Therefore, n>N    f(xn)f(x0)<ϵn > N \implies \lvert f(x_n) - f(x_0)\rvert < \epsilon.

One important thing to note here is that the order of these steps is important. Students often switch the order of the first two lines in this proof, but this makes no sense. The claim that N:n>N    xnx0<δ\exists N: n > N \implies \lvert x_n - x_0\rvert < \delta is meaningless if δ\delta hasn’t been defined yet. This isn’t just semantics: if you were trying to determine how large nn had to be in order to ensure that f(xn)f(x_n) is within a certain tolerance of f(x0)f(x_0), you couldn’t start by finding NN. Without using continuity first, you’d have no idea how close xnx_n must be to x0x_0 in order to ensure that f(xn)f(x_n) is within ϵ\epsilon of f(x0)f(x_0).

It is worth noting that we can actually make the above theorem into an “if and only if” statement, and thus, an equivalent definition of continuity, but we would have to add the condition that f(xn)f(x)f(x_n) \to f(x) for all sequences xnxx_n \to x. For example, a function could satisfy f(xn)f(x0)f(x_n) \to f(x_0) for increasing sequences xnx0x_n \nearrow x_0 but not for decreasing sequences xnx0x_n \searrow x_0; such functions are not continuous at x0x_0.

Here are some additional proof exercises related to continuity for you to practice with. Note that the sum and product proofs are very similar to the corresponding proofs for sequences; however, they are still useful exercises if you’ve never done delta-epsilon proofs before.

Theorem. Let the functions ff and gg be continuous at x0x_0. Then h=f+gh = f + g is continuous at x0x_0.

Theorem. Let the functions ff and gg be continuous at x0x_0. Then h=fgh = f \cdot g is continuous at x0x_0.

Theorem. Let the function ff be continuous at x0x_0 and the function gg be continuous at f(x0)f(x_0). Then h(x)=g(f(x))h(x) = g(f(x)) is continuous at x0x_0.

Exercise. Write an R function n(eps) that returns the smallest NN for which n>N    f(xn)f(x0)<ϵn > N \implies \lvert f(x_n)-f(x_0)\rvert < \epsilon for xn=21/nx_n = 2^{1/n} and f(x)=exf(x) = e^x.

See here for solutions, although you should definitely try proving them on your own first before looking at the solutions.