If $f$ is increasing on an open interval and continuous at endpoints, it's increasing on the closed interval. Prove that if $f$ is increasing on $(a,b)$ and continuous at $a$ and $b$, then $f$ is increasing on $[a,b]$. The question then clarifies: "In particular, if $f$ is continuous on $[a,b]$ and $f'>0$ on $(a,b)$ then $f$ is increasing on $[a,b]$.
An idea I had was to consider $\varepsilon > 0$, and to note that $f$ is increasing on $[a+\varepsilon, b-\varepsilon]$. Then, since $\lim_{x \to a}f(x)=f(a)$ and $\lim_{x \to b}f(x)=f(b)$, we can get some contradiction that it's strictly increasing by using the intermedate value theorem for some $c$ s.t. if $a<c<b \Rightarrow f(a)<f(c)<f(b)$. Sorry if this attempt is confusing.
 A: What we need to prove is that if $a < x < b$ then $f(a) \leq f(x) \leq f(b)$. Let us suppose that $a < y < x$ then we have $f(y) \leq f(x)$. Keeping $x$ fixed and letting $y \to a^{+}$ we get $\lim_{y \to a^{+}}f(y) \leq f(x)$ i.e. $f(a) \leq f(x)$. Similarly we can show that $f(x) \leq f(b)$. Note that the continuity at end points $a, b$ ensures that the desired limits used in above argument exist. Also note that by increasing I am actually referring to "non-decreasing".
If by increasing you mean the "strict" version, then the proof needs to be modified slightly as we need to show $f(a) < f(x) < f(b)$. Let $a < z < y < x$. Keep $x, y$ fixed and then we get $f(z) < f(y) < f(x)$. Letting $z\to a^{+}$ we get $f(a) \leq f(y) < f(x)$ so that $f(a) < f(x)$ and similarly we have $f(x) < f(b)$.
The second part dealing with $f' > 0$ can be easily handled via Mean Value Theorem instead of going through this route.
A: I don't quite understand your argument; I'll give you an informal idea on how to prove by contraddiction that $f(b) \geq f(x)$ for any $x \in (a, b)$:
Suppose $f(x_0) > f(b)$ for some $x_0 \in (a, b)$. Intuitively, since $f$ is continuous at $b$, if $x$ is close to $b$ then $f(x)$ is close to $f(b)$. Therefore, if $x$ is close to $b$ and $f(x_0) > f(b)$, then also $f(x_0) > f(x)$, contraddicting the fact that $f$ is increasing on $(a, b)$.
Can you formalize the above argument? Similarly, you can prove $f(a) \leq f(x)$; concluding that $f$ is increasing on $[a, b]$ is easy from here.
