Assume that $K\subset \Bbb R$ is compact and $f\colon K\to\Bbb R$ is a Darboux function, i.e. it has the intermediate value property. Set $$ m:=\inf_K f, \quad M:=\sup_K f.$$
As discussed here, $(m,M) \subset f(K)$. Now for my questions:
1.) Are $m$ and $M$ finite?
2.) Are there $x,y\in K$ with $f(x)=m$ and $f(y)=M$, provided that these values are finite?
3.) If not, can one give additional assumptions (other than continuity) under which $f$ attains its extrema?
I have never really worked with Darboux functions and I know little to nothing about them. The motivation behind this question is simply curiosity.
Let $f$ be given by the Conway Base 13 Function
$f$ not only satisfies the IVP, but it actually maps every open (and hence every closed) interval to the whole real line, i.e $f([a,b]) = \mathbb{R}$ for any $a,b \in \mathbb{R}$. Thus, $f$ is defined everywhere with the IVP, but is nowhere continuous and does not have any maxima or minima on any closed interval. I can provide proof of these facts, however it will take me a bit.