6.5 Continuity

Very informally, a continuous function is one whose graph can be drawn without lifting the pen of the page. Intuitively this means that a small change in the input of the function leads to a small change to the output. To write a rigorous definition, we will use what we have learned from sequences.

Definition 6.7.

Let f:DR, then f is continuous at x0D if is continuous at x0D if

ε>0,δ>0 such that xD,|xx0|δ|f(x)f(x0)|ε. (6.3)

We say f is continuous if f is continuous at all x0D.

What this means is that for a fixed point x0 and any value of ε we choose, we can find a δ such that when the inputs of the function are δ-close, the outputs of the function are ε-close. If this is true for all points in the functions domain, then we call the whole function continuous. When we are doing a proof of continuity, we must first fix x0, then ε, then we may choose δ similarly to the way we chose N when proving convergence of a sequence. Let’s do an example.

Example 6.3.

Let f: be given by f(x)=2x. Claim: f is continuous.
Let x0, let ε>0, choose δ(0,ε2).
Consider x with |xx0|<δ, then

|f(x)f(x0)| =|2x2x0| (6.4)
=2|xx0| (6.5)
<2δ (6.6)
<ε. (6.7)

Since the value of x0 was arbitrary, f is continuous.

6.5.1 Sequential Definition of Continuity

Just like when proving the convergence of a sequence, when we are first constructing a proof of continuity the value of δ is unknown until the proof is complete. Once the value is known, we go back and place it at the start so that the proof works. It turns out that there is a very strong link between the continuous functions and convergent sequences that we will now prove.

Theorem 6.1 (Sequential Definition of Continuity)

Let D, let f:D, then the following are equivalent:

  1. (i)

    f is continuous at x0D.

  2. (ii)

    If (xn)n is a sequence in D with limit x0, then the sequence (f(xn))n in has limit f(x0).

Proof.

(Proof that (i)(ii)): Suppose f is continuous at x0, (xn)n is a sequence in D with limit x0.
Let ε>0, since f is continuous at x0, δ>0 such that |xx0|<δ|f(x)f(x0)|<ε.
Now, since xnx0, N such that nN|xnx0|<δ, therefore |f(xn)f(x0)|<ε.
(Proof that (ii)(i)): Suppose by way of contradiction that (ii) is true, but (i) is false. So ε>0 such that δ>0,xD where |xx0|<δ|f(x)f(x0)|ε (negation of continuity).
Choose ε such that the above is satisfied, then for n, let δ=1n and xnD such that |xnx0|<1n but |f(xn)f(x0)|ε.
Thus xnx0, but f(xn)↛f(x0) since ε is fixed, which is a contradiction of our assumptions that (ii) is true, hence f must be continuous at x0. ∎

What this theorem is telling us is that we now have two equivalent definitions of continuity; the ϵδ definition which we defined originally and the sequential definition, “(xn)nD such that xnx0 we have f(xn)f(x0)”. Which one we will want to use depends on the situation. Let’s look at an example where using the sequential definition makes proving continuity much easier.

Example 6.4.

Let f: be given by f(x)=2x2+1. Claim: f is continuous.
Using εδ definition of continuity:
Let x0, let ε>0, choose δ<min{1,ε4|x0|+2}.
Consider x such that |xx0|<δ, then

|f(x)f(x0)| =|2x2+1(2x02+1)| (6.8)
=2|x2x02| (6.9)
=2|(xx0)(x+x0)| (6.10)
<2δ|x+x0| (6.11)
<2δ(|x|+|x0|) (6.12)
<2δ(2|x0|+1) (provided δ<1 so |x|<|x0|+1)
<ε. (provided δ<ε4|x0|+2)

Using the sequential definition of continuity:
Let x0, let (xn)n be a sequence in such that xnx0. Then

f(xn)=2xn2+12x02+1=f(x0). (by theorem 4.4)

Therefore f is continuous.

Here are a couple of examples proving discontinuity using the sequential definition.

Example 6.5.

Let f: be given by f(x)={1x<01x0. Claim: f is discontinuous at x0=0.
Let (xn)n=(1n)n with xn0. Since xn<0, f(xn)=1. But f(0)=11, so f cannot be continuous at x=0.

Example 6.6.

Let f: be given by f(x)={xx0x. Claim: f is continuous only at x=0.

6.5.2 Operations on Continuous Functions

In these styles of proof, the arguments can often be greatly simplified by breaking down the given function into smaller building blocks and using previous results. Recall that this was one of the main benefits of the comparison test for proving the convergence of a series. In order to use this technique, we need to know if the continuity of functions is preserved under the operations we can do with them. Thankfully, they are.

Theorem 6.2

Let D, x0D, f,g:D two functions continuous at x0, λ.

  1. (i)

    (f+g):D is continuous at x0.

  2. (ii)

    (fg):D is continuous at x0.

  3. (iii)

    (λf):D is continuous at x0.

  4. (iv)

    min{f,g}:D is continuous at x0.

  5. (v)

    Similarly for max{f,g}.

  6. (vi)

    |f|:D is continuous at x0.

  7. (vii)

    If g(x)0 xD, (fg):D is continuous at x0.

Proof.
  • (i)

    Using the εδ definition:
    Let ε>0, since f is continuous at x0, δf>0 so that |xx0|<δf|f(x)f(x0)|<ε2. Similarly for g, δg.
    Now choose δ=min{δf,δg}, then

    |xx0|<δ|(f+g)(x)(f+g)(x0)| =|f(x)+g(x)(f(x0)+g(x0))| (6.13)
    =|f(x)f(x0)+g(x)g(x0)| (6.14)
    |f(x)f(x0)|+|g(x)g(x0)| (6.15)
    ε2+ε2 (6.16)
    =ε. (6.17)

    Using the sequential definition:
    Consider a sequence (xn)n in D with limit x0. Since f and g are continuous at x0, f(xn)f(x0) and g(xn)g(x0).
    Then (f+g)(xn)=f(xn)+g(xn)f(x0)+g(x0)=(f+g)(x0).

  • (ii), (iii), (vi), and (vii) follow similarly.

  • To prove (iv) and (v), note that

    min{f,g}=f+g|fg|2,max{f,g}=f+g+|fg|2, (6.18)

    then use the results of (i), (iii), and (vi).

A notable consequence of this theorem is that since f: defined by f(x)=x is a continuous function (the proof is trivial), any polynomial is a continuous function.

Theorem 6.3

Let Df,Dg, f:Df with f(Df)(Dg), continuous at x0Df, g:Dg continuous at f(x0)Dg. Then the composition (gf):Df is continuous at x0.

Proof.

Let (xn)nDf with limit x0. Since f is continuous at x0, f(xn)f(x0). Since g is continuous at f(x0),

(gf)(xn)=g(f(xn))g(f(x0))=(gf)(x0). (6.19)

6.5.3 The Intermediate Value Theorem

We will now move onto the meat of this chapter, some intuitive but nonetheless very important results about continuous functions which will be very important when we get into more advanced topics.

Definition 6.8.

A function f:D is bounded if M such that

xD,|f(x)|M. (6.20)

The first theorem we will see is so simple that it is not clear why we need to prove it. It states that a continuous function on a closed interval is bounded and has a maximum and minimum value. As we will see after proving the theorem, there are discontinuous functions which satisfy these properties but there are also many which don’t.

Theorem 6.4 (Extreme Value Theorem)

Given two real numbers a,b with a<b, let f:[a,b] be a continuous function. Then

  1. (i)

    f is bounded.

  2. (ii)

    f attains a maximum, i.e. x0[a,b] such that f(x)f(x0)x[a,b].

  3. (iii)

    f attains a minimum, i.e. x0[a,b] such that f(x)f(x0)x[a,b].

Proof.
  1. (i)

    Assume by way of contradiction that f is not bounded. Then let (xn)n be a sequence in [a,b] such that n we have |f(xn)|>n.
    (xn)n is a bounded sequence (all the terms are contained within an interval), so by the Bolzano-Weierstrass theorem (4.8), there exists a convergent subsequence (xnk)k[a,b] with limit x0[a,b].
    Then since f is continuous, f(xnk)f(x0), hence (f(xnk))k is a bounded sequence by theorem 4.3, but this is a contradiction since |f(xnk)|>nkk, so f must be bounded.

  2. (ii)

    Let M=sup{f(x):x[a,b]}. M exists since all bounded sets in have suprema and we know the set is bounded by (i).
    By definition of sup, nxn[a,b] such that M1nf(xn)M, which implies that f(xn)M as n (however, (xn)n is by no means necessarily convergent, so we are not done yet).
    By the Bolzano-Weierstrass theorem (4.8), there exists a convergent subequence (xnk)k[a,b] with limit x0[a,b], and since f is continuous, f(xnk)f(x0).
    Therefore since (xnk)k is a subsequence of (xn)n, f(x0)=M.

The proof of (iii) follows similarly from (ii). ∎

The next theorem is the most important result for continuous functions. It cements the intuitive notion that continuous functions have no gaps or jumps. The proof uses the completeness property of the real numbers, which ensures that there are no infinitesimal gaps in the function.

Theorem 6.5 (Intermediate Value Theorem)

Let I be an interval, f:I a continuous function. Let a,bI with a<b and let y lie between f(a) and f(b) (i.e. f(a)<y<f(b) or f(b)<y<f(a)). Then x(a,b) such that

f(x)=y. (6.21)
Proof.

Assume without meaningful loss of generality that f(a)<y<f(b). Let S={x[a,b]:f(x)<y} (since aS, S). Let x0=supS.
Claim: f(x0)=y.

  1. (i)

    nx01n<x0, so x01n is not an upper bound for S. Hence snS such that x01n<sn<x0. Then snx0 as n and therefore since f is continuous f(sn)f(x0).
    Since snS, f(sn)<y, therefore f(x0)y.

  2. (ii)

    It can be shown similarly that f(x0)y, so f(x0)=y.

Note that since f(a)<f(x0)<f(b), x0(a,b). ∎

It should be noted that although it may seem as if this theorem may be taken to be the definition of a continuous function, the converse of the theorem is not true.

Example 6.7.

Let f:[0,1][0,1] be continuous. Then f has a fixed point (x[0,1] such that f(x)=x).
Proof. Let g be given by g(x)=f(x)x. Note that by theorem 6.2, g is continuous on [0,1]. Also note that

g(0) =f(0)0=f(0)0 (6.22)
g(1) =f(1)111=0 (6.23)

So 0[g(1),g(0)]. If g(0)=0 or g(1)=0, then 0 or 1 are fixed points. Therefore, assume that g(0)>0>g(1), and hence by the intermediate value theorem (6.5), x0(0,1) so that g(x0)=0, i.e. f(x0)x0=0, so x0 is a fixed point.

Corollary 6.5.1

Let I be an interval, f:I a continuous function. Then the range of f, f(I), is either an interval or a single point.

Proof.

Suppose there are two or more distinct points in f(I), let y(inff(I),supf(I)). By the intermediate value theorem (6.5), xI such that f(x)=y, hence f(I) is an interval. ∎