I have been working and researching on the following problem.
Find a continuous function defined on $(0,1]$ with range $(0,1)$.
I found the function
$\frac{1+(1-x)\sin\left(\frac{1}{x}\right)}{2}$.
I can prove it is continuous at its domain but I am unable to prove it is onto $(0,1)$.
I was stuck in the step, where $y$ is a constant from $(0,1)$ and $x$ is the value I desired in domain.
$\begin{align} (1-x)\sin\left(\frac{1}{x}\right)=2y-1. \end{align}$
So my question is, how to prove the function is onto?