Artificial intelligent assistant

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?

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.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 3a6dc6d9956e044ed346405c37c96523