# Continuous function/R/Intermediate value theorem/Fact/Proof

Proof

We consider the situation ${\displaystyle {}f(a)\leq u\leq f(b)}$, and show the existence of such an ${\displaystyle {}x}$ with the bisection method. For that, we put ${\displaystyle {}a_{0}:=a}$ and ${\displaystyle {}b_{0}:=b}$, we consider the arithmetic mean ${\displaystyle {}x_{0}:={\frac {a_{0}+b_{0}}{2}}}$, and we compute

${\displaystyle f{\left(x_{0}\right)}.}$

If ${\displaystyle {}f{\left(x_{0}\right)}\leq u}$, then we put

${\displaystyle a_{1}:=x_{0}\,\,{\text{ and }}\,\,b_{1}:=b_{0}}$

and if ${\displaystyle {}f{\left(x_{0}\right)}>u}$, then we put

${\displaystyle a_{1}:=a_{0}\,\,{\text{ and }}\,\,b_{1}:=x_{0}.}$

In each case, the new interval ${\displaystyle {}[a_{1},b_{1}]}$ is lying inside the initial interval and has half of its length. It fulfills again the condition ${\displaystyle {}f{\left(a_{1}\right)}\leq u\leq f{\left(b_{1}\right)}}$, therefore we can apply the same defining method again and get recursively a family of nested intervals. Let ${\displaystyle {}x}$ denote the real number which is determined by these nested intervals. For the lower bounds of the intervals, we have ${\displaystyle {}f{\left(a_{n}\right)}\leq u}$, and this carries over to the limit ${\displaystyle {}x}$, due to the criterion for continuity in terms of sequences. Hence, ${\displaystyle {}f{\left(x\right)}\leq u}$. For the upper bounds, we have ${\displaystyle {}f{\left(b_{n}\right)}\geq u}$, and this again carries over to ${\displaystyle {}x}$, so ${\displaystyle {}f(x)\geq u}$.  Therefore, ${\displaystyle {}f(x)=u}$.