In the proof of the intermediate value theorem there's a step I'm having difficulty inderstanding, namely, step 4) below:
Step 1) Suppose $f(x)$ is continuous on the closed interval $[a,b]$ $\\$ and $f(a)<0 Step 2) Define the set $S={x∈[a,b]|f(x)≤0}$. The set is not empty since $f(a)<0$; $\\$ Step 3) Define the value $c$ to be the least upper bound of $S$; Step 4) Since $f(x)$ is continuous, then $\lim_{x\to c}f(x)=f(c)$; And here's my doubt. The initial assumption was that $f(x)$ is continuous only in the closed interval $[a,b]$. For $f(x)$ to be continuous in $c$, the least upper bound of $S$, $c$ would have to be in that interval as well. How can I be sure that $c\in[a,b]$? Thanks. (Here's the complete proof: http://www.milefoot.com/math/calculus/limits/IntValueTheorem13.htm, just in case someone wants to check it out)