Chapter V · Limits of functions of a continuous variable. Continuous and discontinuous functions
The intermediate value theorem
A continuous function takes every value between any two of its values; Hardy’s proof by a Dedekind section, the bisection proof, why the converse fails, and the persistence of sign.
Why this matters
If a continuous curve starts below a horizontal line and ends above it, it must cross the line. This is obvious to the eye, and it is false for the rational numbers (the graph of “crosses” the axis at a hole in ), so its proof must use the completeness of the real numbers. In §101 Hardy proves it with a Dedekind section, the tool of §17. The theorem guarantees that equations have solutions, it underlies the existence of inverse functions (§110), and its proof is the model for the other great theorems of this chapter.
The idea
Take continuous on with . We want a point where . Hardy’s idea is to look for the first such point. Walk right from , and collect every for which has stayed below all the way from to : these form the lower class . Everything else is the upper class . The pair is a section of the real numbers, so it defines a number , the place where “always below ” stops being true. Continuity then forces : it cannot be below (or would stay below a little further), and it cannot be above (or would already have been above a little earlier).
Try this. Move the level up and down. Watch the green class , the orange class , the purple section point , and the ochre dots marking every solution of .
- class L: φ < η all the way from x₀
- class R: the rest
- ξ₀, the section point, and φ(ξ₀)
- the level η and every solution of φ(x) = η
What to notice
Whatever is, the section point lands exactly on the curve’s first crossing of the level: , and is the least of the solutions. As passes the height of a local maximum, jumps from one bump of the curve to a later one, but it is always a solution.
Precise statements
Let be continuous on , and let lie strictly between and . Then there is an between and with . Moreover, if there is a least such .
In other words, as goes from to , takes every value between and at least once. The second sentence is a bonus of Hardy’s proof: the set of solutions of has a least member, which is not true for an arbitrary set of numbers.
The converse is false: a function can take every intermediate value without being continuous.
Try this. Choose “a function with a jump” and put inside the gap of the graph, around . Then choose “Hardy’s Fig. 30 function” (it is at , on and at ) and try several .
- class L: φ < η all the way from x₀
- class R: the rest
- ξ₀, the section point, and φ(ξ₀)
- the level η and every solution of φ(x) = η
What to notice
With the jump, the section point is the jump itself: while just to the left, Hardy’s first case, and no solution exists. Fig. 30 shows the second case: , where but values above occur arbitrarily close on the right. Yet that function does take every value between and , each exactly once. Taking all intermediate values does not imply continuity.
For monotone functions, though, the converse is true, and this is the case that matters for inverse functions.
If is steadily increasing (or decreasing) on and takes every value between and , then is continuous on .
§102 adds two simple facts that we will use constantly.
If is continuous at and , there is such that throughout . Likewise for .
If is continuous at , and vanishes, or takes both positive and negative values, at points arbitrarily close to , then .
Proofs
Suppose (the other case is the same with inequalities reversed, or apply this case to ). Define the section described above, let be its number, and show that and both contradict continuity at .
Both classes are non-empty
Since and is continuous at , stays below on some interval (persistence of sign applied to ): those points are in . Similarly near , so points near are in .
is a section
Put if for every in , and otherwise. Every point is in exactly one class, and if and then too (the condition on includes ). So every member of lies to the left of every member of . By Dedekind’s theorem (§17) there is a number with to its left and to its right.
is impossible
Then would be in , and every is in , so . With we would have for all to the left of , however close. That contradicts continuity at (take tolerance ).
is impossible
Let . Every is in , so somewhere in there is a point where , that is, where differs from by at least . Such points exist arbitrarily close to , again contradicting continuity. (And on by the definition of , so the bad case cannot arise there either.)
So , and is the least solution
Every lies in , where ; so no solution comes before .
There is a second proof, by repeated bisection, which is also an algorithm. Halve ; at least one half has of opposite signs at its ends (or at the midpoint, and we are done). Keep that half and repeat. The intervals are nested and their lengths tend to , so they close in on a single point (§71). At points as close to as we please, takes both signs, so by Theorem 2 of §102, .
Try this. Press “Halve” several times for on and watch the interval shrink. Read off the root to four decimal places.
- earlier intervals
- current interval
- y = f(x)
What to notice
Each step keeps the half where the sign changes, so a root is always trapped. Ten halvings shrink the interval by a factor of : the root is . Notice what the proof needs: nested intervals closing on a point (completeness) and Theorem 2 at that point (continuity).
Use the definition of continuity with the tolerance : values within half of of a positive number are still positive.
Choose
By continuity there is with whenever .
Then there
Indeed . Theorem 2 follows: if were positive (or negative), would keep that sign on a whole interval round , so could not vanish or change sign at points arbitrarily close to .
A monotone function has one-sided limits everywhere (§95), so its only possible discontinuities are jumps. A jump leaves a gap of values that are never taken.
One-sided limits exist
Let increase steadily and . Then .
Suppose
For , ; for , . So no value strictly between and is ever taken, although such values lie between and . Contradiction.
Conclude
So , and likewise : is continuous at . The end points are handled in the same way, using one side only.
Worked examples and exercises
Show that every polynomial of odd degree (with ) has at least one real root.
Hint
Solution
We may take . Since , there is with for . Hence has the sign of , and has the sign of ( odd). is continuous on and lies strictly between and , so for some in between.
Let be continuous on with for every . Show that for some in . Draw the picture.
Hint
Solution
is continuous, and . If take ; if take . Otherwise and the theorem gives in with . In the picture: the graph of runs from the left edge to the right edge of the unit square, so it must cross the diagonal .
Define on by ; for ; ; for ; . Show that takes every value in exactly once, but is discontinuous at , and . Check that .
Hint
Solution
Values. The pieces take: ; every value in , once each (as runs over , runs over ); ; every value in once each; and . These sets are disjoint and fill .
Discontinuities. ; and ; . All are simple discontinuities. The function is not monotone, which is why §101’s converse does not apply.
Formula. For : , , giving . For : , , giving . At : ; at : ; at : .
Let be continuous everywhere and for every rational . Show that for every . Deduce that two continuous functions which agree at every rational point agree everywhere.
Hint
Solution
Fix . There are rationals as close to as we please, and vanishes at all of them. By Theorem 2 of §102, . If and are continuous and on the rationals, apply this to . So a continuous function is determined by its values at the rationals, which is how for irrational can be defined from its rational values.
Check yourself
If takes every value between and as goes from to , then is continuous on .
False. Hardy’s Fig. 30 function ( at , on , at ) takes every value in exactly once and is discontinuous at both ends. The converse holds only with an extra hypothesis such as monotonicity.
has and , but has no solution. Which hypothesis of the theorem fails?
Continuity is needed at every point of the closed interval. has an infinity at , and the graph leaps from to without crossing the axis. No monotonicity is needed for the theorem.
Bisection starts on . How many halvings are needed before the interval has length less than ?
After halvings the length is . and , so .
Why is the intermediate value theorem false for functions defined only on the rational numbers?
The proof uses Dedekind’s theorem: every section of the real numbers has a number at its boundary. The corresponding section of the rationals (those with on the left) has no rational boundary point; that is exactly the gap of Chapter I.
Hardy’s language
It should be observed that we have proved more than is asserted explicitly in the theorem; we have proved in fact that is the least value of for which .
Summary
- A function continuous on takes every value between and ; with there is even a least solution of .
- Hardy’s proof: the section point of “ stays below up to here” must satisfy , since either strict inequality contradicts continuity at . The bisection proof traps the crossing in nested halves.
- The converse is false in general (Fig. 30) but true for monotone functions.
- Persistence of sign: a continuous function positive at is positive near ; so values of both signs arbitrarily near force .