Suppose the function $f:[a,b]\rightarrow \mathbb{R}$ is real analytic and monotonically increasing, i.e. for all $x,y\in [a,b]$ such that $x<y$ we have $f(x)\leq f(y)$. Further, suppose that $f$ is non constant (for example suppose $f(x)<f(b)$ for all $x<b$). I am wondering if the function has to be strictly increasing due to the assumptions. First I tried to find a counterexample, but all examples I could think of failed to be analytic at some point.
I would be very happy if someone can provide me a counterexample, or can help me proving that $f$ has to be strictly increasing.
Yes, $f$ must be strictly increasing. If $x<y$ and $f(x)=f(y)$ then $f$ is constant on $[x,y]$ and hence $f$ is constant, since it's analytic.
Details for readers new to real-analytic functions: You can get that last bit in either of two ways. (i) note that $f$ extends to a function holomorphic in some neighborhood of $(a,b)$ in $\Bbb C$, (ii) repeat the proof for holomorphic functions: Let $A$ be the set of points in $[a,b]$ where every derivative of $f$ vanishes; show that $A$ is open and closed, hence $A=(a,b)$ or $A=\emptyset$..