In mathematical analysis, the intermediate value theorem states that if f is a continuous function whose domain contains the interval [a, b] and s is a number such that f(a)<s<f(b), then there exists some x between a and b such that f(x)=s. That is, the image of a continuous function over an interval is itself an interval that contains f(a),f(b). For example, suppose that f∈C([1,2]),f(1)=3,f(2)=5 , then the graph of y=f(x) must pass through the horizontal line y=4 while x moves from 1 to 2. Over the interval, the set of function values has no gap, and the graph can be drawn without lifting a pencil from the paper. The corollary Bolzano's theorem states that if a continuous function has values of opposite sign inside an interval, then it has a root in that interval. The theorem depends on, and is equivalent to, the completeness of the real numbers, although Weierstrass Nullstellensatz is a version of the intermediate value theorem for polynomials over a real closed field. A similar result to the intermediate value theorem is the Borsuk–Ulam theorem, which underpins why rotating a wobbly table will always bring it to stability. Darboux's theorem states that all functions that result from the differentiation of some other function on some interval have the intermediate value property, even though they need not be continuous.
Motivation
This captures an intuitive property of continuous functions over the real numbers: given f continuous on [1,2] with the known values f(1)=3 and f(2)=5, then the graph of y=f(x) must pass through the horizontal line y=4 while x moves from 1 to 2. It represents the idea that the graph of a continuous function on a closed interval can be drawn without lifting a pencil from the paper.
Theorem The intermediate value theorem states the following: Consider the closed interval I=[a,b] of real numbers ℝ and a continuous function f:I→ℝ. Then
Version I. if u is a number between f(a) and f(b), that is, min(f(a),f(b))<u<max(f(a),f(b)), then there is a c∈(a,b) such that f(c)=u. Version II. The image set f(I) is also a closed interval, and it contains [min(f(a),f(b)),max(f(a),f(b))]. That is, the set of function values has no gap; for any two function values c,d∈f(I) with c<d, all points in the interval [c,d] are also function values, [c,d]⊆f(I).Fundamentally, a subset of the real numbers with no internal gap is an interval. Version I is naturally contained in Version II.
Proof The theorem depends on, and is equivalent to, the completeness of the real numbers. The intermediate value theorem does not apply to the rational numbers Q because gaps exist between rational numbers; irrational numbers fill those gaps. For example, the function f(x)=x2 for x∈ℚ satisfies f(0)=0 and f(2)=4. However, there is no rational number x such that f(x)=2, because 2 is an irrational number. Despite the above, there is a version of the intermediate value theorem for polynomials over a real closed field; see the Weierstrass Nullstellensatz.
Proof version A The theorem may be proven as a consequence of the completeness property of the real numbers as follows: We shall prove the first case, f(a)<u<f(b). The second case is similar.
Let S be the set of all x∈[a,b] such that f(x)<u. Then S is non-empty since a is an element of S. Since S is non-empty and bounded above by b, by completeness, the supremum c=supS exists. That is, c is the smallest number that is greater than or equal to every member of S. Note that, due to the continuity of f at a, we can keep f(x) within any ε>0 of f(a) by keeping x sufficiently close to a. Since f(a)<u is a strict inequality, consider the implication when ε is the distance between u and f(a). No x sufficiently close to a can then make f(x) greater than or equal to u, which means there are values greater than a in S. A more detailed proof goes like this:
Choose ε=u−f(a)>0. Then ∃δ>0 such that ∀x∈[a,b], |x−a|<δ⟹|f(x)−f(a)|<u−f(a)⟹f(x)<u. Consider the interval [a,min(a+δ,b))=I1. Notice that I1⊆[a,b] and every x∈I1 satisfies the condition |x−a|<δ. Therefore for every x∈I1 we have f(x)<u. Hence c cannot be a. Likewise, due to the continuity of f at b, we can keep f(x) within any ε>0 of f(b) by keeping x sufficiently close to b. Since u<f(b) is a strict inequality, consider the similar implication when ε is the distance between u and f(b). Every x sufficiently close to b must then make f(x) greater than u, which means there are values smaller than b that are upper bounds of S. A more detailed proof goes like this:
Choose ε=f(b)−u>0. Then ∃δ>0 such that ∀x∈[a,b], |x−b|<δ⟹|f(x)−f(b)|<f(b)−u⟹f(x)>u. Consider the interval (max(a,b−δ),b]=I2. Notice that I2⊆[a,b] and every x∈I2 satisfies the condition |x−b|<δ. Therefore for every x∈I2 we have f(x)>u. Hence c cannot be b. With c≠a and c≠b, it must be the case c∈(a,b). Now we claim that f(c)=u. Fix some ε>0. Since f is continuous at c, ∃δ1>0 such that ∀x∈[a,b], |x−c|<δ1⟹|f(x)−f(c)|<ε. Since c∈(a,b) and (a,b) is open, ∃δ2>0 such that (c−δ2,c+δ2)⊆(a,b). Set δ=min(δ1,δ2). Then we have f(x)−ε<f(c)<f(x)+ε for all x∈(c−δ,c+δ). By the properties of the supremum, there exists some a∗∈(c−δ,c] that is contained in S, and so f(c)<f(a∗)+ε<u+ε. Picking a∗∗∈(c,c+δ), we know that a∗∗∉S because c is the supremum of S. This means that f(c)>f(a∗∗)−ε≥u−ε. Both inequalities u−ε<f(c)<u+ε are valid for all ε>0, from which we deduce f(c)=u as the only possible value, as stated.
Proof version B We will only prove the case of f(a)<u<f(b), as the f(a)>u>f(b) case is similar.
… excerpt ends here. Continue reading the full article.


