**Theorem**
If $f:[a,b] \to \mathbb{R}$ is [[Continuous Real Function|cts]] and $f(a)<f(b)$ then for any $g$ with $f(a)<g<f(b)$, $\exists c \in (a,b)$ such that $f(c)=g$.
*A similar statement holds if $f(a)>f(b)$ and $f(a)>g>f(b)$.*
**Proof**
*This proof is similar to that of [[There is a unique real number that is the square root of 2]] as it uses the LUBA.*
Suppose $f(a)<g<f(b)$. Consider the set $S= \{ x \in [a,b] \mid f(x)<g \}.$
Note that since $a \in S$ this set is non-empty also since $s \leq b$ for every $s \in S$ it is bounded above. Therefore, by [[Real numbers|LUBA]], $\exists c:= \sup S$.
Suppose $f(c)<g$, we know that $c \neq b$ (since $f(b)>g$).
Using continuity of $f$ at $c$, there exists $\delta>0$ such that $x \in (c-\delta,c+\delta) \cap [a,b] \implies f(x)<g$.
In particular, we can find $\delta>0$ such that $x\in [c,c+\delta) \implies f(x)<g$ so $[c,c+\delta) \subset S$ and and $c$ is not an upper bound for $S$.
Now suppose $f(c)>g$, we know that $c \neq a$ (since $g>f(a)$).
Using continuity of $f$ at $c$, choose $\epsilon=f(c)-g$, then there exists $\delta>0$ such that $x \in (c-\delta,c+\delta) \cap [a,b] \implies |f(x) -f(c)| < f(c)-g \implies f(x) > g.$
In particular we can find $\delta>0$ such that $x \in (c-\delta, c] \implies f(x)>g$.
So $(c-\delta,c]$ is disjoint from $S$ and so $c-\delta$ is an upper bound for $S$, contradicting the fact that $c$ is the least upper bound.
Hence, by trichotomy, the only possibility is that $f(c)=g$.
**Alternative proof**
If case (3) in [[Interval Halving]] never occurs then either $a_{n+1}=t_{n}>a_{n}$ or $a_{n+1}=a_{n}$ so $(a_{n})$ is increasing and bounded above. Similarly $(b_{n})$ is decreasing and bounded below, so $a_{n} \to \alpha$ and $b_{n}\to \beta$.
The length of the interval halves every iteration, so $b_{n}-a_{n}=2^{1-n}(b-a).$ It follows that $\alpha=\beta$ by taking the limits of both sides.
Also we have $f(a_{n})<0$, so since $f$ is continuous at $\alpha$ we get $f(\alpha) \leq 0$ since [[Limits of Real Sequence Preserve Weak Inequalities]]. Similarly $f(\beta) \geq 0$. Since $\alpha=\beta$ it follows that $f(\alpha)=0$.
**Remarks**
- You have to apply this to a function on a closed bounded interval. So we often restrict a function to such a set.
- Another useful property of continuous functions on a closed bound interval is given by the [[Extreme Value Theorem]].
- As simple consequence of IVT is [[Continuous Image of an Interval is an Interval]].
- IVT is useful for proving existence of roots. See **applications** [[There is a unique real number that is the square root of 2]]; [[Any odd degree polynomial with real coefficients has at least one real root]].