# Pointwise continuity and supremum/infimum.

Does continuity of a function $f:[a,b]\to\mathbb{R}$ at a point $c$, $a<c<b$ imply that it achieves it supremum/infimum around that point?

Let's say we for an $\varepsilon$ chose a $\delta$ such that $d(x,c)<\delta$, does this imply that the supremum on that interval is attained?

I know that this is the case when the interval is compact, but in this case it's open $(c-\delta,c+\delta)$ and, I surmise, not compact.

• Why the downvote? Dec 30 '16 at 16:37
• Don't know, but I'm upvoting
– MPW
Dec 30 '16 at 23:04

Take $f(x) = x$ on a unit interval $[0,1]$. Then if we look at the open set around $c = 0.1$, so for example $(0.09, 0.11)$ one can see that the supremum of $f$ on that interval is the same as the supremum of that interval which is $0.11$. Yet $0.11 \not\in (0.09, 0.11)$.
Consider $f(x)=x$ on $(a,b)$.