Let f :R →R be a function having lateral limits at all points. Prove that the

4.7.5. Let f :R →R be a function having lateral limits at all points. Prove that the

set of discontinuity points of f is at most countable.

Solution. Let E be the set of discontinuity points of f and

E 1 = {x ∈ E; f (x−) = f (x+) < f (x)},

E 2 = {x ∈ E; f (x−) > f (x+)},

E 3 = {x ∈ E; f (x−) = f (x+) > f (x)},

E 4 = {x ∈ E; f (x−) < f (x+)}.

Obviously, E =E 1 ∪E 2 ∪E 3 ∪E 4 .

For any x ∈E 1 , let a x ∈ Q be such that f (x−) < a x < f (x+). Choose b x ,c x ∈Q such that b x <x<c x and

b x <t<c x x . The map ϕ :E 1 →Q × Q × Q defined by ϕ (x) = (a x ,b x ,c x ) is one-to-one, since

(a x ,b x ,c x ) = (a y ,b y ,c y ) implies f (y) < a x set E 1 is at most countable. If x ∈E 2 , let a x ∈ Q be such that f (x−) > a x > f (x+) and choose b x ,c x ∈Q satisfying b x <x<c x and

b x <t<x implies f (t) > a x

and

t <c x implies f (t) < a x .⊓ ⊔

4.7 Qualitative Properties of Continuous Functions 171 With the same arguments as above, the mapping E 2

E 2 is at most countable. Similar arguments apply for E 3 and E 4 . It follows that E is at most countable, as the finite union of at most countable sets.

4.7.6. Let f :R →R

be a continuous function that maps open intervals into open intervals. Prove that f is monotone.

Solution. We argue by contradiction and assume that f is not monotone. Thus, without loss of generality, we can suppose that there exist a < b < c such that

f (a) < f (b) > f (c). By Weierstrass’s theorem, f achieves its maximum M on [a, b] at a point that is different from a and b. It follows that the set f ((a, c)) cannot be open because it contains M, but does not contain M + α , for any α > 0 less than some ε . So, necessarily, f is monotone. ⊓ ⊔

4.7.7. Let f :R →R

be a continuous function such that | f (x) − f (y)| ≥ |x − y| ,

for all x ,y∈R . Prove that f is surjective.

Solution. By hypothesis it follows that f is one-to-one. Hence f is strictly mono- tone, as a continuous and one-to-one mapping. So, f transforms open intervals into open intervals, so the image of f is an open interval.

Let y n = f (x n ) be such that y n →y ∈ R. The sequence (y n ) is thus a Cauchy sequence, so the same property holds for the sequence (x n ). Let x = lim n → ∞ x n . By the continuity of f we obtain

f (x n ) = y. ⊓ ⊔ It follows that the image of f is a closed set. Since f (R) is simultaneously open and

f (x) = f ( lim

x n ) = lim

closed, we deduce that f (R) = R, that is, f is surjective.

4.7.8. Let f : [1, ∞)→(0,∞)

be a continuous function. Assume that for every

a >0 , the equation f (x) = ax has at least one solution in the interval [1, ∞) . (i) Prove that for every a >0 , the equation f (x) = ax has infinitely many solutions.

(ii) Give an example of a strictly increasing continuous function f with these properties.

SEEMOUS 2008 Solution. (i) Suppose that one can find constants a > 0 and b > 0 such that

f (1) f (x) > ax for x ∈ [b,∞). Define

x ∈[1,b] x

Then, for every x ∈ [1,∞) one should have

min (a, c)

f (x) >

172 4 Continuity

a contradiction. (2) f (x) < ax for x ∈ [b,∞). Define

x ∈[1,b] x

Then, f (x) < 2 max(a,C) x for every x ∈ [1,∞), and this is again a contradiction. (ii) Choose a sequence 1 =x 1 <x 2 < ··· < x n < ··· such that the sequence

(y n ) n ≥1 defined by y n =2 n cosn π x n is also increasing. Next define f (x n )=y n and extend f linearly on each interval [x n −1 ,x n ], that is, f (x) = a n x +b n for suitable

a n ,b n . In this way we obtain an increasing continuous function f , for which lim n → ∞ f (x 2n )/(2n) = ∞ and lim n → ∞ f (x 2n −1 )/(2n − 1) = 0. It now follows

that the continuous function f (x)/x takes every positive value on [1, ∞). ⊔ ⊓ Let f : I → R be an arbitrary function, where I is a bounded or unbounded inter-

val. We say that f has a horizontal chord of length λ > 0 if there is a point x such that x, x + λ ∈ [a,b] and f (x) = f (x + λ ).

Examples. (i) The function f (x) = 1 defined on the entire real line has horizontal chords of all lengths.

(ii) The function f (x) = x 3 − x + 1 has a horizontal chord of length 2 and two hori- zontal chords of length 1.

(iii) The function f (x) = x 3 has no horizontal chords.

The next exercise provides a class of functions having horizontal chords of any length.

be a continuous and periodic function. Prove that f has hor- izontal chords of all lengths.

4.7.9. Let f :R →R

Solution. Let T be the period of f . Fix arbitrarily λ > 0. We must prove that there exists ξ ∈ R such that f ( ξ )=f( ξ + λ ). To see this, consider the continuous function

g (x) = f (x + λ ) − f (x) and choose x m ,x M ∈ [0,T ] such that f (x m ) = min x ∈[0,T ] f (x) and f (x M ) = max x ∈[0,T ] f (x). Then g(x m ) ≥ 0 and g(x M ) ≤ 0. Thus, by the interme- diate value property, there exists ξ ∈ [0,T ] such that g( ξ ) = 0.

Notice that the above property is no longer true if we replace the continu- ity assumption with the intermediate value property. Indeed, consider the function

f :R →R defined by

cos 1 1 [x/π]

if x / π

f (x) =

sin x

0 if x / π ∈ Z, where [x] denotes the largest integer less than or equal to x. Then f is periodic with

period 2 π and has the intermediate value property. However, f has no chord of length π . ⊓ ⊔

4.7 Qualitative Properties of Continuous Functions 173 We prove in what follows that continuous periodic functions have particular

chords of any length, not necessarily horizontal.

4.7.10. Let f :R →R

be a continuous and periodic function. Prove that f has a chord of any length, not necessarily horizontal, with midpoint on the graph of f .

Solution. Let T > 0 be the period of f . Fix λ > 0 arbitrarily and consider the continuous function g (x) = f (x + λ ) − 2 f (x) + f (x − λ ). Let x m ,x M ∈ [0,T ] be such that f (x m ) = min x ∈[0,T ] f (x) and f (x M ) = max x ∈[0,T ] f (x). Then g(x m ) ≥ 0 and

g (x M ) ≤ 0. Thus, by the intermediate value property, there exists ξ ∈ [0,T ] such that

g ( ξ ) = 0. This means that

f ( ξ + λ )−f( ξ )=f( ξ )−f( ξ − λ ),

which concludes the proof. ⊓ ⊔

4.7.11. Let f be continuous and periodic with period T . Prove that f has two hor- izontal chords of any given length λ , with their left-hand points at different points of [0, T ) .

Solution. Consider the function g (x) = f (x + λ ) − f (x). Then g(T ) = g(0) and

g changes sign between 0 and T . Thus, g vanishes at least twice in [0, T ), say at ξ and η . It follows that f ( ξ + λ )=f( ξ ), f ( η + λ )=f( η )( ξ η ). This completes the proof. ⊔ ⊓

For functions that are continuous but not periodic, the situation can be quite dif- ferent. A continuous function may have no horizontal chords, as for example, a strictly increasing function. However, the following horizontal chord theorem holds.

4.7.12. Suppose that the continuous function f : [0, 1] → R has a horizontal chord of length λ . Prove that there exist horizontal chords of lengths λ /n , for any integer n ≥2 , but horizontal chords of any other length cannot exist.

Solution. Without loss of generality we assume that f (0) = f (1), hence λ = 1. Fix an integer n ≥ 2 and consider the function g(x) = f (x + 1/n) − f (x), so

that g has domain [0, 1 − 1/n]. We show that there exists ξ such that g ( ξ ) = 0, hence f ( ξ + 1/n) = f ( ξ ). This shows that f has a horizontal chord of length 1/n, as required. Arguing by contradiction, we deduce that g is either positive for all x ∈ [0,1 − 1/n] or negative for all x ∈ [0,1 − 1/n]. Otherwise, by the intermediate value property, we obtain that g vanishes at some ξ , as required. Assume g > 0 in [0, 1 − 1/n]. Taking x = 0, 1/n, 2/n, ... ,(n − 1)/n, we have

f (0) < f (1/n) < f (2/n) < ··· < f ((n − 1)/n) < f (1) = f (0),

a contradiction. We show in what follows that there exists a continuous function that has a hor- izontal chord of length 1, but none of length ρ for all ρ ∈ (0,1/2) \ {1/n; n ≥ 2}. The following example is due to Paul L´evy. Let a n ≥ 2. Consider the function

f (x) = sin 2 ( π x

/a) − xsin 2 ( π /a) .

174 4 Continuity Since f (0) = f (1) = 0, f (1) = 0, we deduce that f has a horizontal chord of length