if $f$ is strictly monotonic in $(a,b) \Rightarrow f$ is strictly monotonic in $[a,b]$ I'm trying to solve the following:
Suppose $f: [a,b] \to \Bbb R$ is a continuous function. The first question was whether $f$ is monotonic in $(a,b) \Rightarrow  f$ is monotonic in $[a,b]$. which I managed to prove is true using the Intermediate value theorem. The second question is if  $f$ is strictly monotonic in $(a,b) \Rightarrow  f$ is strictly monotonic in $[a,b]$ which I'm having a hard time proving and am starting to think is in fact not true but can't come up with a Counterexample.
Any thoughts? 
 A: Strict monotony implies monotony, so $f$ is monotone on $[a,b]$. If it's not strictly so, then either $f(a) = f(c)$ for some $c \in (a,b]$ or $f(b) = f(d)$ for some $d\in [a,b)$. WLOG say the former is the case and that $f \uparrow$. Let $e = (a+c)/2$. Then $f(e) < f(c)$ by strict monotony on $(a,b)$, so $f(a) < f(c)$ since $f(a) \le f(e)$. A contradiction.
A: We can assume, without loss of generality, that $f$ is strictly increasing in $(a, b)$ as the proof for $f$ being strictly decreasing can be considered by taking $g = -f$. We will show that $f$ is strictly increasing in $[a, b]$ by contradiction. We can also assume that $f$ violates the monotony in the point $a$.
Let us assume that $f(a) = f(z)$ for some $z \in (a, b)$. The case $f(a) < f((a, b])$ doesn't violate the monotony and for the case $f(a) > f((a, b])$ it is easy to show that $f$ is not continuous.
Because $f$ is strictly increasing, we have that $f(\frac{a+z}{2}) < f(z)$. Let us write $f(\frac{a+z}{2}) = f(z) - 2k \iff f(\frac{a+z}{2}) + 2k = f(z)$ for some $k > 0$.
Because $f$ is continuous at $a$, we have:
$$\forall_{\epsilon > 0} \exists{\delta > 0}: |x-a| < \delta \implies |f(x) - f(a)| < \epsilon$$
Let us take $\epsilon = k$ and substitute $f(a)$ for $f(z)$ in that expression:
$$\exists{\delta > 0}: |x-a| < \delta \implies |f(x) - f(z)| < k$$
But because $f$ is strictly increasing in $(a, b)$, for every $\delta$ we pick, there is going to be some $x_0$ to the left of $\frac{a+z}{2}$ with $x - a < \delta$ and with $f(x_0) + c = f(\frac{a+z}{2}), c > 0$. Because $f(x_0) < f(\frac{a+z}{2})$, we have
$$|f(x_0) - f(z)| = |f\left(\frac{a+z}{2}\right) - c - f(z)| = f(z) - f\left(\frac{a+z}{2}\right) + c = 2k + c$$
Which is bigger than $\epsilon = k$.
A: Consider $g : (a , b] \to \mathbb{R}$, given by $g(x) = f(x) - f(a)$ for all $x \in (a , b]$. Let's prove that $g > 0$ on $(a , b]$. We know that $g$ is continous on $(a , b]$, because $f$ is continous, and $g(x) > 0$ for all $x \in (a , b)$, because $f$ is strictly growing on $(a , b)$, so we have to prove that $g(b) > 0$. We have that
$$
g(b) = \lim_{x \to b^-} f(x) - f(a)\mbox{,}
$$
where
$$
\lim_{x \to b^-} f(x) = \sup\{f(x) : x \in (a , b)\}\mbox{,}
$$
because of this, by definition of supreme,
$$
g(b) = \lim_{x \to b^-} f(x) - f(a) \geq f(x) - f(a) = g(x) > 0
$$
for all $x \in (a , b)$.
