Them: If $f$ is continuous on $[a,b]$, then there is a $y$ in $[a,b]$ such that $f(y) \geq f(x)$ for each $x \in [a,b]$
Proof. We already know that $f$ is bounded on $[a,b]$, which means that the set $$\{ f(x):x\text{ in }[a,b]\}$$ is bounded. This set is obviously not $\varnothing$, so it has a least upper bound $\alpha$. Since $\alpha\geqslant f(x)$ for $x$ in $[a,b]$ it suffices to show that $\alpha=f(y)$ for some $y$ in $[a,b]$.
Suppose instead that $\alpha\neq f(y)$ for all $y$in $[a,b]$. Then the function $g$ defined by $$g(x)=\dfrac1{\alpha-f(x)},\quad x\text{ in }[a,b]$$ is continuous on $[a,b]$, since the denominator of the right side is never $0$. On the other hand, $\alpha$ is the least upper bound of $\{f(x):x\text{ in }[a,b]\}$; this means that $$\text{for every $\epsilon\gt0$ there is $x$ in $[a,b]$ with $\alpha-f(x)\lt\epsilon$}.$$ This, in turn, means that $$\text{for every $\epsilon\gt0$ there is $x$ in $[a,b]$ with $g(x)\gt1/\epsilon$}.$$ But this means that $g$ is not bounded on $[a,b]$, contradicting the previous theorem. $\Rule{0.3em}{0.87em}{0.1em}$
OKay first of all how on earth does one come up with $g(x)$? It just feels like it comes out of nowhere. On the other hand what does
This means that: for every $\epsilon > 0$, there is x in $[a,b]$ with $\alpha - f(x) < \epsilon$
even mean? This statement is true, I agree, but I have absolutely no feeling for it. I also do not understand the last line with $g$. He could have chosen $\epsilon = \alpha - f(x)$ and be done it no?
If you're confused on how Spivak derived the last line with $g$, just take reciprocals in the previous line.
– Gyu Eun Lee May 07 '13 at 22:58