We shall prove the first case, . The second case is similar.
Let us define set .
Then is none-empty since , and the set is bounded from above by . Hence, by completeness, the supremum exists. That is, is the lowest number that for all .
We claim that .
Let us assume that . We get .
Since is continuous, we know that for all there exists a such that whenever .
For the case there exists a s.t. for all we get
By the supremum properties, there exists an that is also .
So there exists such for which we get , but is defined for . Contradiction.
So now let us assume that . We get .
In the same way, for the case there exists a s.t. for all we get
By the supremum properties, all are definitely .
So there exists such for which we get , but . Contradiction.
Hence, it must be .