The intermediate value theorem
Statement
Let \( a, b \in \mathbb{R} \) with \( a \lt b \), and let \( f : [a,b] \to \mathbb{R} \) be continuous at every point of \( [a,b] \) (two-sidedly at interior points, one-sidedly at \( a \) and \( b \)). Let \( y \in \mathbb{R} \) lie strictly between the endpoint values, that is \( f(a) \lt y \lt f(b) \) or \( f(b) \lt y \lt f(a) \). Then there exists \( c \in (a,b) \) with \( f(c) = y \). Equivalently, in the form used in practice: if \( f \) is continuous on \( [a,b] \) and \( f(a)f(b) \lt 0 \), then \( f \) vanishes somewhere in the open interval \( (a,b) \).
Why it matters
The intermediate value theorem (IVT) is the first theorem of the degree that manufactures a solution out of nothing but qualitative data. No formula, no algorithm, no smoothness: two numerical evaluations and the word “continuous” are enough to certify that an equation has a root. Everything downstream that asserts existence rather than exhibiting an answer — \( n \)-th roots, real roots of odd-degree polynomials, fixed points of self-maps of an interval, equilibria of continuous dynamics, the operating point of a nonlinear circuit or a nonlinear equation of state — ultimately reduces to this one move.
It is also the theorem that exposes what the real numbers are for. Every hypothesis except continuity is a statement about the domain and the field: the domain must be an interval (connected), and the field must have no gaps. Over \( \mathbb{Q} \) the theorem is false, and the failure is not an accident of the counterexample but structural — for an ordered field, “every continuous function with a sign change has a zero” is equivalent to Dedekind completeness. IVT is therefore the point where analysis stops being algebra and starts depending on the topology of the line, and it is the one-dimensional shadow of the general fact that continuous images of connected sets are connected.
Hypotheses
Proof
We prove the case \( f(a) \lt y \lt f(b) \); the mirrored case is reduced to it in Step 8. The argument is the bisection proof: it uses only the order axioms, the monotone convergence theorem for real sequences (equivalently, the completeness axiom), and the sequential characterisation of continuity. It is chosen over the supremum proof because it is quantitative — Step 9 falls out for free and is the numerical method used in both worked examples below.
Result
Reading. A continuous function cannot step over a value. If the graph starts below a horizontal line and ends above it, it meets the line somewhere strictly inside — but the theorem says nothing about where, and nothing about how many times.
Scope. Real-valued continuous functions on any interval of \( \mathbb{R} \) (for two arbitrary points of the domain, apply the theorem to the closed subinterval they span). It needs completeness of \( \mathbb{R} \) and connectedness of the domain, and it is purely an existence statement: no formula, no uniqueness, no location. The constructive content it does carry is the bisection bound \( \lvert m_n - c\rvert \le (b-a)2^{-(n+1)} \) of Step 9.
Corollaries & converses
- Bolzano’s theorem. \( f \) continuous on \( [a,b] \) with \( f(a)f(b) \lt 0 \) has a zero in \( (a,b) \). (Take \( y = 0 \).) This is the form quoted in every numerical method.
- Existence of \( n \)-th roots. For \( \alpha \gt 0 \) and \( n \in \mathbb{N} \), \( x \mapsto x^n \) is continuous with \( 0^n = 0 \lt \alpha \lt (1+\alpha)^n \), so \( \alpha \) has a positive \( n \)-th root; strict monotonicity makes it unique. The existence of \( \sqrt{2} \) is a corollary of IVT, not an axiom.
- Odd-degree real polynomials have a real root. A monic \( p \) of odd degree satisfies \( p(-R) \lt 0 \lt p(R) \) for \( R \) large; apply Bolzano. Even-degree polynomials need not have one (\( x^2+1 \)), so parity, not degree, is what IVT can see.
- One-dimensional Brouwer fixed point. Every continuous \( f : [a,b] \to [a,b] \) has a fixed point: apply Bolzano to \( g(x) = f(x) - x \), which satisfies \( g(a) \ge 0 \ge g(b) \) because \( f \) maps into \( [a,b] \). (If either inequality is an equality that endpoint is already fixed; otherwise the sign change is strict.)
- Continuous images of intervals are intervals. \( f \) continuous on an interval \( I \) makes \( f(I) \) an interval. Combined with the extreme value theorem, \( f\bigl([a,b]\bigr) = [\min f, \max f] \): EVT supplies the endpoints, IVT fills the inside.
- Continuous injections are strictly monotone. A continuous injective \( f : [a,b] \to \mathbb{R} \) is strictly monotone, hence has a continuous inverse. This is the route to continuity of \( \sqrt[n]{\;\cdot\;} \), \( \log \), \( \arcsin \).
- Converse is false. The intermediate-value property does not imply continuity. \( f(x) = \sin(1/x) \) for \( x \ne 0 \), \( f(0) = 0 \) has the property on every interval yet is discontinuous at \( 0 \); Conway’s base-13 function attains every real value on every interval and is continuous nowhere. Darboux’s theorem (1875) says every derivative has the intermediate-value property, and derivatives can be discontinuous — so “Darboux” is strictly weaker than “continuous”.
Fails without
- Continuity dropped at a single point: \( f : [-1,1] \to \mathbb{R} \) with \( f(x) = -1 \) for \( x \lt 0 \) and \( f(x) = 1 \) for \( x \ge 0 \). Then \( f(-1) \lt \tfrac12 \lt f(1) \) but \( f^{-1}\bigl(\{\tfrac12\}\bigr) = \emptyset \). In the proof, Step 5 fails: \( a_n \to 0 \) and \( b_n \to 0 \) but \( g(a_n) \to -1 - \tfrac12 \) while \( g(b_n) \to 1 - \tfrac12 \), so the two limits in Step 5 are different and Step 6 concludes nothing.
- Completeness of the field dropped: \( f(x) = x^2 - 2 \) on \( [1,2] \cap \mathbb{Q} \), with values in \( \mathbb{Q} \). Continuity and the sign change \( f(1) = -1 \lt 0 \lt 2 = f(2) \) hold verbatim, but there is no rational zero. The bisection of Step 2 runs forever and produces the rational left endpoints \( 1,\ 1.25,\ 1.375,\ 1.40625, \dots \) whose limit \( \sqrt 2 \) is simply not in the field: Step 4 has no \( c \) to hand to Step 5.
- Connectedness of the domain dropped: \( f(x) = 1/x \) on \( [-1,0) \cup (0,1] \) is continuous on its whole domain and changes sign, yet never vanishes. Bisection breaks at the first midpoint, \( m_0 = 0 \), which is not in the domain — the recursion of Step 2 is not even well defined.
- Order on the codomain dropped: \( f(\theta) = (\cos\theta, \sin\theta) \) on \( [0, 2\pi] \) is continuous with \( f(0) = f(2\pi) = (1,0) \), and the origin is not attained. “Between” presupposes a linear order; in \( \mathbb{R}^2 \) the correct replacement is a degree or winding-number argument, and the conclusion changes character entirely (Brouwer, Poincaré–Miranda).
Common errors
- “\( f \) takes all intermediate values, therefore \( f \) is continuous.” The converse is false and badly so — see Conway’s base-13 function, which is nowhere continuous. IVT is a one-way implication.
- “IVT gives the root.” It gives at least one. \( \sin x = \tfrac12 \) has infinitely many solutions on \( [0, 100\pi] \). Uniqueness always requires a separate input, normally strict monotonicity or a contraction estimate.
- “\( f \) changes sign across the singularity, so it has a root.” Applying IVT to \( 1/x \) on \( [-1,1] \) or to \( \tan x \) on \( [0,\pi] \). The function is not defined, let alone continuous, on the whole closed interval; the hypothesis simply fails.
- “By IVT, \( c = \dots \)” followed by a formula. IVT locates nothing. What the proof yields is Step 9, an interval containing \( c \); digits come from running bisection or another algorithm, never from the theorem statement.
- Confusing IVT with the mean value theorem. IVT is about values of \( f \) and needs only continuity; MVT is about values of \( f' \) and needs differentiability. “Intermediate” refers to the vertical axis, not to slopes.
- Checking the endpoints and forgetting the interior. The hypothesis is continuity at every point of \( [a,b] \). A function beautifully continuous except at one interior point satisfies the endpoint test and still fails the conclusion.
- Using it on a set that merely looks like an interval. \( [0,1] \cap \mathbb{Q} \), a Cantor set, or a union of two intervals all admit sign-changing continuous functions with no zero. Connectedness, not “lots of points”, is the operative property.
Discussion
Historically, IVT is where analysis stopped trusting pictures. Through the eighteenth century the statement was treated as geometrically self-evident: a curve that starts below a line and finishes above it obviously meets it. Bernard Bolzano’s 1817 pamphlet, whose title advertises a “purely analytic proof”, is the founding document of rigorous analysis precisely because it insists that the claim needs a proof, that the proof needs an \( \varepsilon\text{-}\delta \) definition of continuity, and that it must rest on a completeness principle for the reals. Cauchy’s Cours d’analyse of 1821 gives an interval-subdivision argument of the same shape as the one reproduced above, set out in its Note III as a procedure for solving equations numerically as well as a proof that a solution exists.
The modern reading is topological and much shorter. The interval \( [a,b] \) is connected; continuous maps send connected sets to connected sets; the connected subsets of \( \mathbb{R} \) are exactly the intervals; therefore \( f([a,b]) \) is an interval containing \( f(a) \) and \( f(b) \), hence containing everything between them. Every ingredient of the bisection proof reappears in the proof that \( [a,b] \) is connected, so nothing has been gained logically — but the factorisation identifies the two independent hypotheses cleanly (connected domain, continuous map) and shows immediately what generalises: IVT holds for a continuous real-valued function on any connected topological space, path-connected or not. What does not generalise is the vector-valued statement; in \( \mathbb{R}^n \) the correct successors are Brouwer’s fixed-point theorem and the Poincaré–Miranda theorem, both of which need degree theory rather than order.
Algorithmically the theorem is unusually generous. Step 9 gives a convergence rate — one bit of accuracy per function evaluation, error \( (b-a)2^{-(n+1)} \) — that is independent of \( f \). Newton’s method is quadratically faster when it converges, but it needs a derivative, a good starting point, and a non-degenerate root, and it can diverge; bisection needs only a bracket and continuity, and can never fail. Production root-finders (Brent’s method and its descendants) are hybrids that attempt fast interpolation and fall back on bisection whenever the fast step would leave the bracket — the fallback is exactly the guarantee proved above. Worked Example 1 runs the method on a real equation of state and the a priori bound of Step 9 is compared with the error actually achieved.
Foundationally IVT is a delicate instrument, and its exact strength is well mapped. Over an ordered field \( F \), the statement “every continuous \( f : [a,b] \to F \) with \( f(a)f(b) \lt 0 \) has a zero” is equivalent to Dedekind completeness of \( F \), so IVT can serve as an axiom characterising \( \mathbb{R} \) among ordered fields. Constructively, in Bishop’s sense, the exact theorem is not provable: the trichotomy used in Step 2 to decide the sign of \( g(m_n) \) is not an algorithm on real inputs, and a function that hovers at the target value defeats any purported procedure. What survives is the approximate IVT — for every \( \varepsilon \gt 0 \) there is \( x \) with \( \lvert f(x) - y\rvert \lt \varepsilon \) — together with the exact theorem for functions that are locally non-constant, which covers every function met in practice. In reverse mathematics IVT for continuous functions presented with a modulus of continuity is provable outright in the weak base system \( \mathsf{RCA}_0 \) — strictly weaker than the extreme value theorem, which is equivalent to weak König’s lemma \( \mathsf{WKL}_0 \), and weaker again than the Bolzano–Weierstrass theorem, which is equivalent to arithmetical comprehension \( \mathsf{ACA}_0 \). So although all three are “consequences of completeness”, IVT is the cheapest of them, which is the formal counterpart of the fact that bisection is implementable and the supremum in EVT is not.
Common misconceptions. IVT does not say the value is attained once; it does not say where; it does not require differentiability, monotonicity or boundedness; and its converse fails so badly that a nowhere-continuous function can satisfy the intermediate-value property in the strongest possible sense. Nor is it “obvious”: it is false over \( \mathbb{Q} \), false on disconnected domains, and false for maps into \( \mathbb{R}^2 \), so every proof must at some point cash in the completeness of \( \mathbb{R} \) and the connectedness of \( [a,b] \).
Worked examples
Example 1 (molar volume from a van der Waals equation of state). Carbon dioxide is modelled by the van der Waals equation \[ p(V) \;=\; \frac{RT}{V-b} \;-\; \frac{a}{V^{2}}, \] with the standard tabulated constants for \( \mathrm{CO_2} \), \( a = 0.3640\ \mathrm{Pa\,m^{6}\,mol^{-2}} \) and \( b = 4.267\times10^{-5}\ \mathrm{m^{3}\,mol^{-1}} \), and the molar gas constant \( R = 8.3145\ \mathrm{J\,mol^{-1}\,K^{-1}} \). At \( T = 350\ \mathrm{K} \) (above the critical temperature \( 304\ \mathrm{K} \), so the isotherm is strictly decreasing) show that the equation \( p(V) = 8.000\ \mathrm{MPa} \) has a solution with \( V \) between \( 2.000\times10^{-4} \) and \( 8.000\times10^{-4}\ \mathrm{m^{3}\,mol^{-1}} \), and locate it by five bisections.
Reading. Two evaluations of the equation of state prove that a physical state at \( 350\ \mathrm{K} \) and \( 8.000\ \mathrm{MPa} \) exists in the model; five more pin it to \( \pm 9.4\times10^{-6}\ \mathrm{m^{3}\,mol^{-1}} \), about \( \pm 3.5\% \). For comparison the ideal-gas value is \( RT/p_\star = 3.638\times10^{-4}\ \mathrm{m^{3}\,mol^{-1}} \), so at this pressure attraction and excluded volume together compress \( \mathrm{CO_2} \) to \( 72\% \) of the ideal molar volume — a correction no linearisation about the ideal gas would have found.
Scope. Existence needs only continuity on a bracket with a sign change. Uniqueness here comes from outside IVT: above the critical temperature \( p \) is strictly decreasing in \( V \), so the root is unique. Below \( T_c \) the van der Waals loop makes \( p \) non-monotone and the same pressure can be met at three molar volumes — IVT would still certify existence and would still say nothing about how many.
Example 2 (the half-mass point of a non-uniform rod). A rod of length \( L = 1.20\ \mathrm{m} \) has linear mass density \( \lambda(x) = \lambda_0\bigl(1 + 2x/L\bigr) \) with \( \lambda_0 = 0.500\ \mathrm{kg\,m^{-1}} \). Prove that there is a point at which a cut divides the rod into two pieces of equal mass, and find it.
Reading. The cut sits at \( 61.8\% \) of the length, biased towards the heavy end, because the far half of the rod is denser. IVT is what turns “the accumulated mass grows continuously from \( 0 \) to \( M \)” into “every intermediate mass is realised by some cut”.
Scope. The existence argument uses only \( 0 \lt \lambda \le \lambda_{\max} \lt \infty \) and needs no formula for \( m \); the closed form in Step 4 is a bonus of this particular profile. The same argument gives a cut realising any prescribed fraction of \( M \), and it is the one-dimensional case of the ham-sandwich family of bisection results. It fails for a rod with a gap: on a disconnected body \( m \) jumps, and an intermediate mass can be skipped.
Problems
- Show that \( x^{3} - 2x - 5 = 0 \) has a root in \( (2,3) \), then perform four bisections and state both the guaranteed error bound and the error actually achieved (the root is \( 2.0945515 \) to 8 s.f.).
Solution
Let \( f(x) = x^{3} - 2x - 5 \), a polynomial, hence continuous on \( [2,3] \). Then \( f(2) = 8 - 4 - 5 = -1 \lt 0 \) and \( f(3) = 27 - 6 - 5 = 16 \gt 0 \), so \( 0 \) lies strictly between \( f(2) \) and \( f(3) \) and IVT gives \( c \in (2,3) \) with \( f(c) = 0 \).
Bisection: \( m_0 = 2.5 \), \( f = 15.625 - 5 - 5 = +5.625 \Rightarrow [2, 2.5] \). \( m_1 = 2.25 \), \( f = 11.390625 - 4.5 - 5 = +1.890625 \Rightarrow [2, 2.25] \). \( m_2 = 2.125 \), \( f = 9.595703125 - 4.25 - 5 = +0.345703125 \Rightarrow [2, 2.125] \). \( m_3 = 2.0625 \), \( f = 8.773681640625 - 4.125 - 5 = -0.351318359375 \Rightarrow [2.0625,\ 2.125] \).
Take \( m_4 = 2.09375 \). The guaranteed bound (Step 9 with \( n = 4 \), \( b - a = 1 \)) is \( \lvert m_4 - c\rvert \le 2^{-5} = 0.03125 \). The actual error is \( \lvert 2.09375 - 2.0945515\rvert = 8.0\times10^{-4} \), comfortably inside it. Note the bound is not tight — it cannot be, since it is independent of \( f \).
- Prove that \( \mathrm{e}^{-x} = x^{2} \) has a solution in \( (0,1) \) and locate it to within \( 0.05 \). Is the solution unique in \( \mathbb{R} \)?
Solution
Let \( g(x) = \mathrm{e}^{-x} - x^{2} \), continuous on \( [0,1] \) as a difference of continuous functions. \( g(0) = 1 \gt 0 \) and \( g(1) = \mathrm{e}^{-1} - 1 = -0.632121 \lt 0 \), so IVT gives a zero in \( (0,1) \).
Bisection: \( g(0.5) = 0.606531 - 0.25 = +0.356531 \Rightarrow [0.5, 1] \); \( g(0.75) = 0.472367 - 0.5625 = -0.090133 \Rightarrow [0.5, 0.75] \); \( g(0.625) = 0.535261 - 0.390625 = +0.144636 \Rightarrow [0.625, 0.75] \); \( g(0.6875) = 0.502832 - 0.472656 = +0.030175 \Rightarrow [0.6875, 0.75] \). The bracket has length \( 0.0625 \), so its midpoint \( 0.71875 \) is within \( 0.03125 \lt 0.05 \) of the root. (The root is \( 0.703467 \); the actual error is \( 0.0153 \).)
Uniqueness on \( \mathbb{R} \): for \( x \le 0 \), \( \mathrm{e}^{-x} \ge 1 \) while \( x^{2} \lt 1 \) on \( (-1,0] \) and, for \( x \le -1 \), \( \mathrm{e}^{-x} \ge \mathrm{e}^{\lvert x\rvert} \gt x^{2} \) since \( \mathrm{e}^{t} \gt t^{2} \) for all \( t \ge 1 \); so \( g \gt 0 \) there and no root exists. On \( [0,\infty) \), \( \mathrm{e}^{-x} \) is strictly decreasing and \( x^{2} \) strictly increasing, so \( g \) is strictly decreasing and has at most one zero. Hence the solution is unique. As always, IVT supplied existence and monotonicity supplied uniqueness.
- Let \( f : [0,3] \to \mathbb{R} \) be continuous with \( f(0) = f(3) \). Prove that there is \( x \in [0,2] \) with \( f(x) = f(x+1) \). Then find such an \( x \) explicitly for \( f(x) = \sin(2\pi x/3) \).
Solution
Put \( h(x) = f(x+1) - f(x) \) on \( [0,2] \); \( h \) is continuous (difference of \( f \) with a shift of \( f \), both continuous). Telescoping, \[ h(0) + h(1) + h(2) = \bigl(f(1)-f(0)\bigr) + \bigl(f(2)-f(1)\bigr) + \bigl(f(3)-f(2)\bigr) = f(3) - f(0) = 0. \] Three reals summing to \( 0 \) cannot all be strictly positive, nor all strictly negative. So either some \( h(k) = 0 \), in which case \( x = k \) works; or two of them have strictly opposite signs, say \( h(j) \lt 0 \lt h(k) \), and IVT applied to \( h \) on the closed interval with endpoints \( j \) and \( k \) (a subinterval of \( [0,2] \)) produces \( x \) strictly between them with \( h(x) = 0 \), i.e. \( f(x) = f(x+1) \).
For \( f(x) = \sin(2\pi x/3) \): \( f(0) = 0 = \sin 2\pi = f(3) \), so the hypothesis holds. Using \( \sin A - \sin B = 2\cos\frac{A+B}{2}\sin\frac{A-B}{2} \) with \( A = 2\pi(x+1)/3 \), \( B = 2\pi x/3 \), \[ h(x) = 2\sin\frac{\pi}{3}\,\cos\frac{\pi(2x+1)}{3} = \sqrt3\,\cos\frac{\pi(2x+1)}{3}. \] This vanishes when \( \pi(2x+1)/3 = \pi/2 \), i.e. \( x = \tfrac14 \), and again at \( x = \tfrac74 \). Check: \( f(0.25) = \sin(\pi/6) = 0.5 \) and \( f(1.25) = \sin(5\pi/6) = 0.5 \). Both roots lie in \( [0,2] \), illustrating that the conclusion asserts existence, not uniqueness.
- Let \( f \) be continuous on \( [a,b] \) and let \( x_1,\dots,x_n \in [a,b] \). Prove that \( f \) attains the average of the sampled values: there is \( c \in [a,b] \) with \( f(c) = \frac1n\sum_{k=1}^{n} f(x_k) \). Verify with \( f(x) = x^{2} \) on \( [0,3] \) and the samples \( 0, 1, 3 \).
Solution
Write \( A = \frac1n\sum_{k} f(x_k) \). The finite set \( \{f(x_1),\dots,f(x_n)\} \) has a least element \( f(x_j) =: \mu \) and a greatest \( f(x_i) =: \nu \) (a finite non-empty set of reals attains both — no analysis needed). Since every term of the average lies in \( [\mu,\nu] \), \[ \mu = \frac1n\sum_k \mu \;\le\; A \;\le\; \frac1n\sum_k \nu = \nu . \] If \( A = \mu \) take \( c = x_j \); if \( A = \nu \) take \( c = x_i \). Otherwise \( \mu \lt A \lt \nu \), and \( A \) lies strictly between the values of \( f \) at the two points \( x_j, x_i \in [a,b] \). Apply IVT on the closed interval with endpoints \( x_j \) and \( x_i \), which is contained in \( [a,b] \) and on which \( f \) is continuous: it yields \( c \) strictly between \( x_j \) and \( x_i \) with \( f(c) = A \). \(\blacksquare\)
Verification: \( f(0) = 0 \), \( f(1) = 1 \), \( f(3) = 9 \), so \( A = (0+1+9)/3 = 10/3 = 3.3333 \). Here \( \mu = 0 \) at \( x_j = 0 \) and \( \nu = 9 \) at \( x_i = 3 \), and \( 0 \lt 10/3 \lt 9 \). Solving \( c^{2} = 10/3 \) with \( c \gt 0 \) gives \( c = \sqrt{10/3} = 1.82574 \in (0,3) \), as predicted. Note the same argument with weights \( w_k \ge 0 \), \( \sum w_k = 1 \), gives any convex combination, and the limiting integral version \( f(c) = \frac{1}{b-a}\int_a^b f \) follows by combining IVT with the extreme value theorem.
- (Universal chord theorem.) Let \( f : [0,1] \to \mathbb{R} \) be continuous with \( f(0) = f(1) \), and let \( n \in \mathbb{N} \). Prove there is \( x \in \bigl[0, 1 - \tfrac1n\bigr] \) with \( f\bigl(x + \tfrac1n\bigr) = f(x) \). Then show the analogous statement is false for chord length \( \lambda = \tfrac23 \), using \( f(x) = \sin^{2}\bigl(\tfrac{3\pi x}{2}\bigr) - x \).
Solution
Reciprocal lengths. Put \( h(x) = f\bigl(x+\tfrac1n\bigr) - f(x) \) on \( \bigl[0, 1-\tfrac1n\bigr] \), continuous as before. Telescoping over the \( n \) grid points \( x = k/n \), \( k = 0,\dots,n-1 \), \[ \sum_{k=0}^{n-1} h\!\left(\frac{k}{n}\right) = \sum_{k=0}^{n-1}\left[ f\!\left(\frac{k+1}{n}\right) - f\!\left(\frac{k}{n}\right)\right] = f(1) - f(0) = 0 . \] If any \( h(k/n) = 0 \) we are done. Otherwise the \( n \) numbers are non-zero and sum to zero, so at least one is positive and at least one negative, say \( h(j/n) \lt 0 \lt h(k/n) \). Both \( j/n \) and \( k/n \) lie in \( \bigl[0,1-\tfrac1n\bigr] \), \( h \) is continuous on the closed interval between them, and \( 0 \) is strictly between the two values; IVT delivers \( x \) there with \( h(x) = 0 \). \(\blacksquare\)
Concrete instance, \( n = 3 \), \( f(x) = x(1-x) \) (so \( f(0) = f(1) = 0 \)): \( h(x) = \bigl(x+\tfrac13\bigr)\bigl(\tfrac23 - x\bigr) - x(1-x) = \tfrac29 - \tfrac23 x \), which vanishes at \( x = \tfrac13 \). Check \( f(1/3) = \tfrac29 = f(2/3) \). \(\checkmark\)
Failure for \( \lambda = \tfrac23 \). Take \( f(x) = \sin^{2}\bigl(\tfrac{3\pi x}{2}\bigr) - x \) on \( [0,1] \), which is continuous. Endpoints: \( f(0) = 0 \) and \( f(1) = \sin^{2}\bigl(\tfrac{3\pi}{2}\bigr) - 1 = 1 - 1 = 0 \), so \( f(0) = f(1) \) as required. For any \( x \in \bigl[0,\tfrac13\bigr] \), since \( \tfrac{3\pi}{2}\bigl(x + \tfrac23\bigr) = \tfrac{3\pi x}{2} + \pi \) and \( \sin^{2}(\theta + \pi) = \sin^{2}\theta \), \[ f\!\left(x+\tfrac23\right) - f(x) = \sin^{2}\!\left(\tfrac{3\pi x}{2} + \pi\right) - \sin^{2}\!\left(\tfrac{3\pi x}{2}\right) - \tfrac23 = -\tfrac23 \;\ne\; 0 . \] So no chord of length \( \tfrac23 \) is horizontal, and the telescoping argument above genuinely needs \( \lambda = 1/n \): with \( \lambda \) not the reciprocal of an integer the sum of the increments over a partition never closes up. The general statement — horizontal chords of length \( \lambda \) are forced exactly for \( \lambda \in \{1, \tfrac12, \tfrac13, \dots\} \), with counterexamples of the above shape otherwise — is the universal chord theorem.