** Continuous Functions**

**3.6 Monotone functions and continuity**

Note: 1 lecture (optional, can safely be omitted unless is also covered, requires )

Definition 3.6.1. Let S_{⊂}_{R}. We say f: S_{→}_{R}isincreasing(resp.strictly increasing) ifx,y∈S
withx<yimplies f(x)_{≤} f(y)(resp. f(x)< f(y)). We definedecreasingandstrictly decreasingin

the same way by switching the inequalities for f.

If a function is either increasing or decreasing we say it ismonotone. If it is strictly increasing or strictly decreasing we say it isstrictly monotone.

Sometimesnondecreasing(resp.nonincreasing) is used for increasing (resp. decreasing) func- tion to emphasize it is not strictly increasing (resp. strictly decreasing).

If f is increasing, then−f is decreasing and vice-versa. Therefore, many results about monotone functions can just be proved for say increasing functions, and the results follow easily for decreasing functions.

### 3.6.1

### Continuity of monotone functions

It is easy to compute one-sided limits for monotone functions.

Proposition 3.6.2. Let S_{⊂}_{R}, c_{∈}_{R}, f:S_{→}_{R}be increasing, and g:S_{→}_{R}be decreasing. If c is
a cluster point of S_{∩}(_{−}∞,c), then

lim

x→c− f(x) =sup{f(x):x<c,x∈S} and _{x}lim_{→}_{c}−g(x) =inf{g(x):x<c,x∈S}.

If c is a cluster point of S_{∩}(c,∞), then

lim

x→c+ f(x) =inf{f(x):x>c,x∈S} and _{x}lim_{→}_{c}+g(x) =sup{g(x):x>c,x∈S}.

If∞is a cluster point of S, then lim

x→∞f(x) =sup{f(x):x∈S} and xlim→∞g(x) =inf{g(x):x∈S}.
If_{−}∞is a cluster point of S, then

lim

x→−∞f(x) =inf{f(x):x∈S} and x→−lim∞g(x) =sup{g(x):x∈S}.

In particular all the one-sided limits exist whenever they make sense. For monotone functions
therefore, when we say the left hand limit x→c− _{exists, we mean that} _{c} _{is a cluster point of}
S_{∩}(_{−}∞,c), and same for the right hand limit.

Proof. Let us assume f is increasing, and we will show the first equality. The rest of the proof is very similar and is left as an exercise.

Leta:=sup{f(x):x<c,x∈S}. Ifa=∞, then given anM∈R, there exists anxM∈S,xM<c,

such that f(xM)>M. As f is increasing, f(x)≥ f(xM)>Mfor allx∈Swithx>xM. If we take

δ :=c−x_{M}>0, then we obtain the definition of the limit going to infinity.

Next suppose a<∞. Let ε >0 be given. Because a is the supremum and S∩(−∞,c) is

nonempty,a_{∈}_{R}and there exists anxε ∈S,xε<c, such that f(xε)>a−ε. As f is increasing, if

x_{∈}Sandxε <x<c, we havea−ε< f(xε)≤ f(x)≤a. Letδ :=c−xε. Then forx∈S∩(−∞,c)

Suppose f: S→Ris increasing, c∈S, and that both one-sided limits exist. Since f(x)≤

f(c)_{≤} f(y)wheneverx<c<y, taking the limits we obtain

lim

x→c− f(x)≤ f(c)≤_{x}lim_{→}_{c}+f(x).

Then f is continuous atcif and only if both limits are equal to each other (and hence equal to f(c)).
See also . See to get an idea of a what a discontinuity looks like.
Corollary 3.6.3. If I_{⊂}_{R}is an interval and f: I_{→}_{R}is monotone and not constant, then f(I)is
an interval if and only if f is continuous.

Assuming f is not constant is to avoid the technicality that f(I)is a single point in that case; f(I)is a single point if and only if f is constant. A constant function is continuous.

Proof. Without loss of generality suppose f is increasing.

First suppose f is continuous. Take two points f(x1)< f(x2) in f(I). As f is increasing

then x1<x2. By the , given anyywith f(x1)<y< f(x2), we find a

c∈(x1,x2)⊂Isuch that f(c) =y, soy∈ f(I). Hence, f(I)is an interval.

Let us prove the reverse direction by contrapositive. Suppose f is not continuous atc_{∈}I, and
thatcis not an endpoint ofI. Let

a:= lim

x→c−f(x) =sup{f(x):x∈I,x<c}, b:=_{x}lim_{→}_{c}+f(x) =inf{f(x):x∈I,x>c}.

As cis a discontinuity,a<b. Ifx<c, then f(x)≤a, and if x>c, then f(x)≥b. Therefore no
point in(a,b)_{\ {}f(c)_{}}is in f(I). However there existsx1∈I,x1<c, so f(x1)≤a, and there exists
x2∈I,x2>c, so f(x2)≥b. Both f(x1)and f(x2)are in f(I), but there are points in between them
that are not in f(I). So f(I)is not an interval. See .

Whenc_{∈}Iis an endpoint, the proof is similar and is left as an exercise.

f(c) c I f(x1) f(I) x1 x2 lim x→c+f(x) =b lim x→c−f(x) =a f(x2) y= f(x)

Figure 3.8:Increasing function f:I_{→}Rdiscontinuity atc.

Corollary 3.6.4. Let I_{⊂}_{R}be an interval and f: I_{→}_{R}be monotone. Then f has at most countably
many discontinuities.

Proof. Let E _{⊂}I be the set of all discontinuities that are not endpoints of I. As there are only
two endpoints, it is enough to show thatE is countable. Without loss of generality, suppose f is
increasing. We will define an injectionh: E_{→}_{Q}. For eachc_{∈}Ethe one-sided limits of f both
exist ascis not an endpoint. Let

a:= lim

x→c−f(x) =sup{f(x):x∈I,x<c}, b:=_{x}lim_{→}_{c}+f(x) =inf{f(x):x∈I,x>c}.

Ascis a discontinuity, we havea<b. There exists a rational numberq∈(a,b), so leth(c):=q.
If d_{∈}E is another discontinuity, then if d >c, then there exist an x_{∈}I with c<x<d, and

so limx→d− f(x)≥b. Hence the rational number we choose for h(d) is different from q, since

q=h(c)<bandh(d)>b. Similarly ifd<c. So after making such a choice for everyc∈E, we have a one-to-one (injective) function intoQ. Therefore,E is countable.

Example 3.6.5: By_{b}x_{c}denote the largest integer less than or equal tox. Define f: [0,1]_{→}Rby

f(x):=x+

b1/(1−x)_{c}

### ∑

n=0 2
−n_{,}

forx<1 and f(1) =3. It is left as an exercise to show that f is strictly increasing, bounded, and has
a discontinuity at all points 1−1_{/}_{k}_{for}_{k}_{∈}_{N}_{. In particular, there are countably many discontinuities,}
but the function is bounded and defined on a closed bounded interval. See .

1.5 2 2.5 3

0 1

Figure 3.9:Increasing function with countably many discontinuities.

Similarly, one can find an example of a function discontinuous on a dense set such as the rational numbers. See the exercises.

### 3.6.2

### Continuity of inverse functions

A strictly monotone function f is one-to-one (injective). To see this notice that ifx6=ythen we can assumex<y. Then either f(x)< f(y)if f is strictly increasing or f(x)> f(y)if f is strictly

decreasing, so f(x)_{6}= f(y). Hence, it must have an inverse f−1defined on its range.

Proposition 3.6.6. If I _{⊂}_{R} is an interval and f: I _{→}_{R} is strictly monotone. Then the inverse
f−1_{:} _{f}_{(I)}_{→}_{I is continuous.}

Proof. Let us suppose f is strictly increasing. The proof is almost identical for a strictly decreasing
function. Since f is strictly increasing, so is f−1_{. That is, if} _{f}_{(x)}_{<} _{f}_{(y)}_{, then we must have}_{x}_{<}_{y}
and therefore f−1 _{f}_{(x)}

< f−1 f(y)

.

Takec_{∈} f(I). Ifcis not a cluster point of f(I), then f−1_{is continuous at}_{c}_{automatically. So}
letcbe a cluster point of f(I). Suppose both of the following one-sided limits exist:

x0:= lim y→c−f

−1_{(y) =}_{sup}_{{}_{f}−1_{(y)}_{:}_{y}_{<}_{c}_{,}_{y}_{∈} _{f}_{(I)}_{}}_{=}_{sup}_{{}_{x}_{∈}_{I}_{:} _{f}_{(x)}_{<}_{c}_{}}_{,}
x1:= lim

y→c+f

−1_{(y) =}_{inf}_{{}_{f}−1_{(y)}_{:}_{y}_{>}_{c}_{,}_{y}_{∈} _{f}_{(I)}_{}}_{=}_{inf}_{{}_{x}_{∈}_{I}_{:} _{f}_{(x)}_{>}_{c}_{}}_{.}

We havex0≤x1as f−1is increasing. For allx>x0withx∈I, we have f(x)≥c. As f is strictly
increasing, we must have f(x)>cfor allx>x0,x_{∈}I. Therefore,

{x∈I:x>x0} ⊂ {x∈I: f(x)>c}.

The infimum of the left hand set is x0, and the infimum of the right hand set isx1, so we obtain x0≥x1. Sox1=x0, and f−1is continuous atc.

If one of the one-sided limits does not exist the argument is similar and is left as an exercise. Example 3.6.7: The proposition does not require f itself to be continuous. For example, let

f: R→R

f(x):=

(

x ifx<0,

x+1 ifx_{≥}0.

The function f is not continuous at 0. The image ofI=_{R}is the set(_{−}∞,0)_{∪}[1,∞), not an interval.
Then f−1_{:} _{(}_{−}_{∞}_{,}_{0}_{)}_{∪}_{[}_{1}_{,}_{∞}_{)}_{→}
Rcan be written as
f−1_{(y) =}
(
y ify<0,
y_{−}1 ify_{≥}1.

It is not difficult to see that f−1_{is a continuous function. See} _{for the graphs.}

Notice what happens with the proposition if f(I)is an interval. In that case we could simply
apply to both f and f−1_{. That is, if} _{f}_{:} _{I}_{→}_{J}_{is an onto strictly monotone function}
and I and J are intervals, then both f and f−1 _{are continuous. Furthermore} _{f}_{(I)} _{is an interval}
precisely when f is continuous.

### 3.6.3

### Exercises

Exercise3.6.1: Suppose f:[0,1]_{→}Ris monotone. Prove f is bounded.

Exercise3.6.2: Finish the proof of . Hint: You can halve your work by noticing that if g is

decreasing then−g is increasing.

Exercise3.6.3: Finish the proof of . Exercise3.6.4: Prove the claims in . Exercise3.6.5: Finish the proof of .

Exercise3.6.6: Suppose S_{⊂}R, and f:S→Ris an increasing function. Prove:

a) If c is a cluster point of S∩(c,∞), then lim

x→c+f(x)<∞.

b) If c is a cluster point of S∩(−∞,c)and lim

x→c−f(x) =∞, then S⊂(−∞,c).

Exercise3.6.7: Suppose I⊂Ris an interval and f:I→Ris a function such that for each c∈I, there exist

a,b_{∈}Rwith a>0such that f(x)≥ax+b for all x∈I and f(c) =ac+b. Show that f is strictly increasing.
Exercise3.6.8: Suppose f:I_{→}J is a continuous, bijective (one-to-one and onto) function for two intervals

I and J. Show that f is strictly monotone.

Exercise3.6.9: Consider a monotone function f:I→Ron an interval I. Prove that there exists a function

g: I→Rsuch that lim

x→c−g(x) =g(c) for all c∈I, except the smaller (left) endpoint of I, and such that

g(x) = f(x)for all but countably many x.

Exercise3.6.10:

a) Let S⊂Rbe any subset. If f:S→Ris increasing and bounded, then show that there exists an increasing

F:R→Rsuch that f(x) =F(x)for all x∈S.

b) Find an example of a strictly increasing bounded f:S→Rsuch that an increasing F as above is never

strictly increasing.

Exercise3.6.11(Challenging): Find an example of an increasing function f:[0,1]_{→}Rthat has a disconti-

nuity at each rational number. Then show that the image f([0,1])contains no interval. Hint: Enumerate the rational numbers and define the function with a series.

Exercise3.6.12: Suppose I is an interval and f:I→Ris monotone. Show thatR\f(I) is a countable

union of disjoint intervals.

Exercise3.6.13: Suppose f: [0,1]_{→}(0,1)is increasing. Show that for anyε >0, there exists a strictly
increasing g:[0,1]→(0,1)such that g(0) =f(0), f(x)≤g(x)for all x, and g(1)−f(1)<ε.

Exercise3.6.14: Prove that the Dirichlet function f:[0,1]→Rdefined by f(x):=1if x is rational and

f(x):=0otherwise cannot be written as a difference of two increasing functions. That is, there do not exist

increasing g and h such that, f(x) =g(x)−h(x).

Exercise3.6.15: Suppose f:(a,b)→(c,d)is a strictly increasing onto function. Prove that there exists a