<<

Part 2.1 Continuous functions v1 2020-21

Continuity

Definition 2.1.1 A f : A → R, A ⊆ R, is continuous at a ∈ A if, and only if, lim f(x) = f(a) , x→a that is

∀ε > 0, ∃ δ > 0, ∀x ∈ A, |x − a| < δ =⇒ |f(x) − f(a)| < ε. (1)

Notes

• Implicit in the definition is that limx→a f(x) exists, i.e. is finite.

• In the definition of limx→a f(x) we have the assumption that

0 < |x − a| < δ

whereas in (1) we only have

|x − a| < δ.

This is because in the definition of continuity we are assuming that f (a) exists and, if x = a, then the requirement |f(x) − f(a)| < ε is simply 0 < ε which is trivially true. Thus there is no need to exclude the possibility that x = a, and so we drop the requirement that 0 < |x − a| .

• f is defined on some neighbourhood of a, including a,

Definition 2.1.2 A function f is continuous on an open interval (a, b) if f(x) is defined for, and is continuous at, every x in (a, b), i.e. for all c in (a, b) we have limx→c f(x) = f(c). A function f is continuous on a closed and bounded interval [a, b] if f(x) is defined for every x in [a, b], and is continuous at every point in (a, b), i.e. for all c in (a, b) we have limx→c f(x) = f(c), while limx→a+ f(x) = f(a) and limx→b− f(x) = f(b).

To prove a given function is continuous on an interval we need verify the definition of continuity for each point of the interval.

1 Results in Part 1 can be rephrased as

Example 2.1.3 All polynomials are continuous on R. All rational functions are continuous at points at which they are defined.

Solution is immediate. We saw in the last section that limx→a p(x) = p(a) for all polynomials p at all points a ∈ R. We also saw that limx→a r(x) = r(a) all rational functions r(a) at all points a ∈ R for which r(a) is defined.  From an earlier result, f is continuous at a iff

lim f(x) = f(a) = lim f(x) . (2) x→a+ x→a−

This is used in the example of a function which is constructed from poly- nomials.

Example 2.1.4 The function

( x2 − x − 1 for x ≤ 1 f(x) = x3 − 2 for x > 1, is continuous on R.

Solution If a > 1 then, in some neighbourhood of a we have f(x) = x3 − 2. This is a polynomial and so f is continuous at such a. If a < 1 then, in some neighbourhood of a we have f(x) = x2 − x − 1. This is a polynomial and so f is continuous at such a. If a = 1 then there is no neighbourhood of 1 in which f is a polynomial. Instead we have to use (2). For the left hand ,

lim f(x) = lim x2 − x − 1 = 12 − 1 − 1 = −1. x→1− x→1−

For the right hand limit

lim f(x) = lim x3 − 2 = 13 − 2 = −1. x→1+ x→1+

And since these one-sided limits both equal f(1) = −1 we deduce that f is continuous at x = 1. 

2 Graphically:

y

x 1

1 −

As a particular example of a rational function we have (x2 − 1) / (x2 − x) , which by Example 2.1.3 is continuous for all x 6= 0, 1. Can we assign values at x = 0 and 1 to make it continuous on all of R?

Example 2.1.5 Prove that the function f : R\{0} → R given by  x2 − 1  , if x 6= 0, 1, f(x) = x2 − x  2 if x = 1, is continuous at x = 1.

Solution in Tutorial. 

Example 2.1.6 If f : R\{0, 1} → R is given by x2 − 1 f(x) = , x2 − x there is no value for f(0) that will make f : R\{1} → R continuous at x = 0.

Solution in Tutorial  1  lim f(x) = lim 1 + = +∞. x→0+ x→0+ x

Thus limx→0+ f(x) does not exist and hence limx→0 f(x) does not exist. Therefore f cannot be continuous at x = 0. 

3 Example 2.1.7 Prove that the function g : R → R given by ( π  sin if x 6= 0, g(x) = x 0 if x = 0, is not continuous at x = 0.

Solution in Tutorial Since limx→0 g(x) does not exist there is no value of g(0) that it can equal. 

Nowhere Continuous More interesting, perhaps, are examples where continuity fails, and fails “fre- quently”. A popular example of such a “pathological” function is the follow- ing, first described by Dirichlet in 1829. Recall that in any interval of real numbers we can find a rational number and we can find an irrational number. (See the appendix to the notes of Part 1)

Example 2.1.8 Define f : R → R, by ( 1 if x is rational f(x) = 0 if x is irrational.

Prove that f is nowhere continuous.

Solution Let a ∈ R be given Assume f is continuous at a. Choose ε = 1/2 in the definition of continuity to find δ > 0 such that |x − a| < δ implies |f(x) − f(a)| < 1/2. Two cases. First, a ∈ Q. This implies f(a) = 1 while in any interval, such as |x − a| < δ, i.e. (a − δ, a + δ) , we can find an irrational x0 for which f(x0) = 0. (For a proof of this see the appendix.) Thus

1/2 > |f(x0) − f(a)| = |0 − 1| = 1. Contradiction. Second case left to Tutorial. 

4 Rules of Continuity

Given functions continuous at c ∈ R we know, in particular, that the limits of the functions exist at c. This means that we can simply apply the limit rules of section 1.3. In this way we get

Theorem 2.1.9 (i) Suppose that both f and g are defined on a neighbour- hood of c ∈ R and are continuous at c. Then Sum Rule: the sum of continuous functions is continuous,

f + g is continuous at c,

Product Rule: the product of continuous functions is continuous,

fg is continuous at c,

Quotient Rule: the quotient of continuous functions is continuous where defined, f is continuous at c, provided g(c) 6= 0. g (ii) Suppose that both f and g are continuous on an interval, then f + g, f − g, fg and f/g are continuous on the interval with the proviso that in the quotient, g is non-zero on the interval.

Proof in Tutorial As an example of the proof I prove only the Sum Rule, the others I leave to the students (or see the Appendix).

Since f and g are continuous at a ∈ R we have limx→a f(x) = f(a) and limx→a g(x) = g(a). The Rules for limits justify

lim (f + g)(x) = lim (f(x) + g(x)) from definition of f + g, x→a x→a = lim f(x) + lim g(x) from Sum Rule for limits, x→a x→a = f(a) + g(a) = (f + g)(a) .

 In the next result we move the question of continuity at a point c to continuity at the origin.

5 Lemma 2.1.10 f(x) is continuous at x = c if, and only if, f(x + c) is continuous at x = 0.

Proof Following the definitions we have f(x) is continuous at x = c iff limx→c f(x) = f(c) iff

∀ε > 0, ∃ δ > 0, ∀x, |x − c| < δ =⇒ |f(x) − f(c)| < ε.

Writing y = x − c this becomes

∀ε > 0, ∃ δ > 0, ∀y, |y − 0| < δ =⇒ |f(c + y) − f(c)| < ε, which is the definition of f(c + y) being continuous at y = 0. Relabelling y as x gives the stated result. 

Trigonometric Functions Recall that we have shown

lim sin θ = 0 = sin 0 θ→0 and lim cos θ = 1 = cos 0, θ→0 hence sin θ and cos θ are continuous at 0. Assumption To continue we assume addition formula for , namely

sin(α + β) = sin α cos β + sin β cos α.

This can be proved using diagrams; see https://www.cut-the-knot.org/triangle/SinCosFormula.shtml#PWW for a couple of such proofs.

6 Example 2.1.11 sin θ is continuous on R. Solution Let a ∈ R be given. By Lemma 2.1.10 to show sin x is continuous at a it suffices to show that sin (a + x) is continuous at x = 0. To do this consider lim sin (a + x) = lim (sin a cos x + cos a sin x) x→0 x→0 = sin a lim cos x + cos a lim sin x x→0 x→0 by the Sum Rule for limits,

= sin a × 1 + cos a × 0

= sin a. Thus sin (a + x) is continuous at x = 0 and hence sin x is continuous at a. Yet a was arbitrary so sin x is continuous on R.  That cos θ is continuous on R is the subject of a question on the Problem Sheet.

Exponential Function

x 0 x Recall that we have shown limx→0 e = 1 = e and so e is continuous at x = 0. Assumption To continue we assume that

α+β α β ∀α, β ∈ R, e = e e . Given our definition of ex as an infinite this requires taking the product of two infinite series and rearranging the product as a series of the same form as the originals. The product we take is the so-called Cauchy Product of Series, and the result we need use is that “the limit of the Cauchy product of two absolutely convergent series is equal to the product of the limits of those series”. It is a gap in your education that there is no time to prove this in earlier analysis courses and now has to be assumed. Aside The requirement that the series be absolutely convergent is used to deduce that their product is absolutely convergent. A result you may have seen in earlier analysis courses is that ”an absolutely convergent series can be rearranged”. That this is a non-trivial result can be seen from the interesting result that a conditionally convergent series (convergent but not absolutely convergent) can be rearranged to converge to any given number! End of Aside

7 Example 2.1.12 ex is continuous on R.

Solution Let a ∈ R be given. By Lemma 2.1.10 to show ex is continuous at a it suffices to show that ea+x is continuous at x = 0. Yet

lim ex+a = lim exea = ea. x→0 x→0



Composition of Functions We now have a large collection of continuous functions; polynomials: rational functions: trig functions and the exponential. We can now increase this collection with the following

Theorem 2.1.13 Composite Rule for functions. Assume that g is defined on a deleted neighbourhood of a ∈ R and limx→a g(x) = L exists. Assume that f is defined on a neighbourhood of L and is continuous there. Then   lim f(g(x)) = f lim g(x) . (3) x→a x→a

Proof Let ε > 0 be given. Since f is continuous at L there exists δ1 > 0 such that, |y − L| < δ1 =⇒ |f(y) − f(L)| < ε. (4)

The definition of limx→a g(x) = L means that

“∀ε > 0, ∃ δ > 0 such that something holds”.

TRICK Choose ε = δ1 in the definition of limx→a g(x) = L to find δ2 > 0 such that 0 < |x − a| < δ2 =⇒ |g(x) − L| < δ1. (5)

Combine (4) and (5) (using g (x) in place of y in (4)) to get

0 < |x − a| < δ2 =⇒ |g(x) − L| < δ1 =⇒ |f(g(x)) − f(L)| < ε.

Thus we have verified the definition that   lim f(g(x)) = f(L) = f lim g(x) . x→a x→a



8 Warning I often see attempted proofs where students try to first use the fact that limx→a g (x) exists. This is doomed to failure. You must start with the fact that f is continuous at limx→a g (x) to find a δ1 which is then used, in place of ε, in the definition of limx→a g (x). Remember, f first, then g second.

If we assume more, namely that g is continuous at a, then we can deduce more.

Theorem 2.1.14 Composite Rule for Continuous functions. As- sume that g is defined on a neighbourhood of a ∈ R and is continuous there and assume that f is defined on a neighbourhood of g (a) and is continuous there, then f ◦ g is continuous at a.

Proof In the previous theorem we can now replace limx→a g (x) by g (a) wherever it is seen. In particular in the conclusion, so

lim (f ◦ g)(x) = lim f(g(x)) by definition of convolution, x→a x→a   = f lim g (x) by the Theorem 2.1.13 x→a = f(g(a)) since g is continuous at a, = (f ◦ g)(a) by definition of convolution.



Example 2.1.15 Show that π  sin x is continuous on R \{0}.

Solution π  π sin = (f ◦ g)(x) with g(x) = and f(x) = sin x. x x By the , g(x) is continuous for all x 6= 0, while by the exam- ple above f(x) is continuous for all x. Hence by the Composite Rule for Continuous functions we deduce the stated result. 

9 Appendix 2.1 1. Drawing a . From a geometric point of view, a function is continuous on an interval if you can “draw it’s graph without lifting your pencil from the paper”. For, if you have to lift your pencil from the graph there has to be a “jump” in the graph. At that point the function is not continuous (the limits of the function as you approach the jump from the right and from the left, if they exist, will be different). But be careful, any curve you can draw will be ‘smooth’, except for a finite number of corners. Such a function will be differentiable except at the corners. Yet there exist continuous functions that are differentiable nowhere! They would be impossible to draw.

2. By previous results on Limits all the following functions are continuous on R: ( ex−1 ( sin θ x if x 6= 0 θ if θ 6= 0 f1(x) = f2(x) = 1 if x = 0. 1 if θ = 0.

( cos θ−1 ( cos θ−1 θ if θ 6= 0 θ2 if θ 6= 0 f3(x) = f4(x) = 1 0 if θ = 0. − 2 if θ = 0.

( ex−1−x x2 if x 6= 0 f5(x) = 1 2 if x = 0.

3. Rational and irrational numbers in an interval. In lectures we used the result that in any interval (a, b) we can find a rational number and we can also find an irrational number. Proof Let ` = b − a be the length of the interval. Choose n ∈ N so large that 2−n < `. Assume for the sake of a contradiction that for no m ∈ Z do we have m/2n ∈ (a, b). This means there exists p ∈ N for which p p + 1 ≤ a < b ≤ . 2n 2n (In fact p = max {m ∈ Z : m ≤ a2n} .) Then, writing p p ≤ a as − a ≤ − , 2n 2n 10 we find that p + 1 p 1 ` = b − a ≤ − = < `. 2n 2n 2n

The final result, a strict inequality ` < `, is a contraction, and so our assumption is false, and so there does exist m ∈ Z for which the rational number r = m/2n lies in (a, b) for some m ∈ N. √ √ To find an irrational number do the above for the interval a/ 2, b/ 2 √ to find a rational r0 in this interval. You can then check that r0 2 is an irrational number lying in (a, b) .  4. Example 2.1.16 Show that the function g : R → R given by ( π  sin if x 6= 0, g(x) = x 0 if x = 0, is not continuous at x = 0. Solution Assume that g is continuous at x = 0. Then π  lim sin = g(0) = 0. x→0 x In particular this means the limit exists. Yet from a Problem Sheet we know that limx→0 sin (π/x) does not exist. This contradiction means our assumption is false and so f is not continuous at 0.  Note that there is, in fact, no value for g(0) that would make the function continuous at x = 0. 5. Example 2.1.17 If ( 1 if x is rational f(x) = 0 if x is irrational,

and a∈ / Q show that f is not continuous at a. Solution Assume f is continuous at a. Choose ε = 1/2 in the definition of continuity to find δ > 0 such that |x − a| < δ implies |f(x) − f(a)| < 1/2.

But a∈ / Q implies f (a) = 0 while in any interval, such as (a, a + δ) we can find a rational x0 for which f (x0) = 1. Thus 1 > |f(x ) − f(a)| = |1 − 0| = 1. 2 0 11 Contradiction, so our assumption is false. Thus f is not continuous at a.  6. Product and Quotient Rules for continuous functions. Assume that f and g are continuous at a ∈ R. This means that limx→a f (x) = f (a) and limx→a g (x) = g (a). For the

lim (fg)(x) = lim (f(x) g(x)) from definition of fg, x→a x→a = lim f(x) lim g(x) from Product Rule for limits, x→a x→a = f(a) g(a) = (fg)(a) .

For the Quotient Rule, we have to also assume that g(a) 6= 0. Then

lim (f/g)(x) = lim (f(x)/g(x)) from definition of f/g, x→a x→a = lim f(x)/ lim g(x) from Quotient Rule for limits, x→a x→a = f(a)/g(a) = (f/g)(a) .

In applying the Product and Quotient Rules for limits we should have observed that they were allowable since the individual limits, limx→a f(x) and limx→a g(x) exist, and is non-zero in the case of the Quotient Rule. 7. Interchanging a limit with other operations. The Composite Rule for functions in the form   lim f(g(x)) = f lim g(x) x→a x→a is an example of a whole class of results in Mathematical Analysis looking at when a limit can be taken inside a function, or an operation such as summation or integration.

For example under what conditions on the functions fn(x) can we say

∞ ∞ X X lim fn(x) = lim fn(x)? x→a x→a n=1 n=1 The important point here is it is an infinite summation. By repeated application of the Sum Rule above we know this result holds for finite summations.

12 For a function of two variables under what conditions can we say Z ∞ Z ∞ lim f(x, t) dt = lim f(x, t) dt? x→a −∞ −∞ x→a

Again for a function of two variables under what conditions can we interchange limits as in

lim lim f(x, t) = lim lim f(x, t)? x→a t→b t→b x→a Unfortunately we cannot answer these questions in this course.

8. Composition rule for limits. I have missed out another Composition result, one for limits.

Assume limx→a g(x) exists, equal to L say. Assume not that f is con- tinuous at L but only that limy→L f(y) exists, equal to M say. What can be said of limx→a (f ◦ g)(x)? Is it equal to M?

There is a possible problem, for though the limit limy→L f(y) exists, the value f(L) may not. So in examining (f ◦ g)(x) = f(g(x)) we would not want g(x) = L for x close to a.

Theorem 2.1.18 Assume limx→a g(x) = L exists and there exists a deleted neighbourhood of a on which g(x) 6= L. Assume limy→L f (y) = M exists. Then limx→a (f ◦ g)(x) exists with value M.

Proof By assumption there exists δ0 > 0 such that if 0 < |x − a| < δ0 then g(x) 6= L or, in a form appropriate for us,

0 < |g(x) − L| . (6)

Let ε > 0 be given. Look at f first to find δ1 > 0 such that

0 < |y − L| < δ1 =⇒ |f(y) − M| < ε. (7)

Take ε = δ1 in the definition of limx→a g(x) = L to find δ2 > 0 such that 0 < |x − a| < δ2 =⇒ |g(x) − L| < δ1. (8)

Choose δ = min (δ0, δ2) and assume 0 < |x − a| < δ. Then we have both

13 • 0 < |g(x) − L| by (6) and

• |g(x) − L| < δ1 by (8).

Combine to get 0 < |g(x) − L| < δ1. But then this implies |f(g(x)) − M| < ε by (7) with y = g(x). This verifies the definition of limx→a (f ◦ g)(x) = M.  If it is not the case that there exists a deleted neighbourhood of a on which g(x) 6= L then f (L) has to be defined and it can be shown that if limx→a (f ◦ g)(x) exists then limx→a (f ◦ g)(x) = f(L). But we need some condition such as f is continuous at L to deduce that limx→a (f ◦ g)(x) exists.

14