This is from Exercise 7 in p. 92 in Munkres's Topology.
Except for the trivial cases such as $Y$ is empty set or singleton, it seems if $Y$ is convex in an simply ordered set $X$ then $Y$ is interval or ray.
But I cannot start my proof because I cannot use $\sup$ or $\max$ functions.
What should I do?