theorem
ContinuousFunctions.intermediate_value_theorem
(f : ℝ → ℝ)
(a b : ℝ)
(hab : a < b)
(hf : ContinuousOn f (Set.Icc a b))
:
Bolzano's Intermediate Value Theorem.
Let f : ℝ → ℝ be continuous on [a, b] with a < b. Then:
- if
f a < y < f b, there existsc ∈ (a, b)withf c = y; - if
f b < y < f a, there existsc ∈ (a, b)withf c = y.
In either case, f attains every value strictly between f a and f b at some
interior point of the interval.
The polynomial f(x) = x^2021 + x^2020 + 9.03 x + 1 has at least one real
root.
Proved via the Intermediate Value Theorem: f(-1) < 0 and f(0) > 0, so by
continuity there exists c ∈ [-1, 0] with f(c) = 0.