Examples of continuous functions $f:(0,1)\to[0,1]$ Hi so the question is asking if if there is a continuous function over $(0,1)$ which will result in the image $[0,1]$. Thank you so much! Explanations are greatly appreciated!
you may consider the function $f(x)=\frac{\cos{(100x)+1}}{2}$. Surely it is continuous and reaches its maximum and minimum several times in $(0,1)$.

Hope I helped.
Consider the piecewise function:
\begin{cases}
2x, \qquad &amp;\text{ for } 0 &lt; x &lt; \frac{1}{2}, \\
1, &amp;\text{ otherwise. } 
\end{cases}

EDIT: Oops, thought we wanted the image to be $(0, 1]$. To get the appropriate answer, consider:
\begin{cases}
4x, \qquad &amp;\text{ for } 0 &lt; x &lt; \frac{1}{4}, \\
1 - 4(x - \frac{1}{4}) = 2 - 4x, &amp;\text{ for } \frac{1}{4} &lt; x \leq \frac{1}{2}, \\
0, &amp;\text{ otherwise.} 
\end{cases}