# Bounded function in $[0,1]$ without max and min.

Do we have a function $$f$$ defined in $$[0, 1]$$, which is bounded but has no maximum and minimum ?

I do know that $$\arctan x$$ can give me a hint, which is bounded without max and min but that's in $$\mathbb R$$. Thanks!

EDITED:
I would like to ask a little additional question: could we find some edited or mixed trigonometric functions to satisfy this problem?
The reason is, that I got stuck with the idea of $$\arctan x$$ and other possible trigonometric functions.

Thanks!

$$f(x)=x$$ if $$.25, and $$f(x)=0.5$$ otherwise

You cannot have a purely trigonometric function defined on $$[0,1]$$ that does not attain its max/min because it would be continuous and the extreme value theorem would apply.

$$f(x)=\begin{cases}(1-x)\sin(\frac 1x) &; x\in(0,1]\\ 0 &; x=0 \end{cases}$$ This function is almost a trigonometric function as you specified. It has $$\sup_{x\in[0,1]} f(x)=1$$ and $$\inf_{x\in[0,1]} f(x)=-1$$ but those values are not attained.

The function $$f$$ defined below has $$\sup_{x\in[0,1]} f(x)=1$$ and $$\inf_{x\in[0,1]} f(x)=-1$$ but doesn't attain those values. $$f(x)=\begin{cases}\frac {(-1)^nn}{n+1} &; x=\frac 1n \text{ for n\in\Bbb N}\\ 0 &; \text{otherwise} \end{cases}$$

The key point is continuity, without that we can construct counterexample as

• $$f(x)=x \quad x\in [0,1/2)$$

• $$f(x)=0 \quad x=1/2$$

• $$f(x)=1-x \quad x\in (1/2,1]$$

Refer also to Extreme value theorem.