I was looking for examples of functions $f:\mathbb{R}\to\mathbb{R}$ such that for any $a>0$ we have that $[-1,1]\subseteq f\left([-a,a]\right)$
The two examples I could think of were $\sin(1/x)$ and $\cos(1/x)$. However, I was wondering if there are other, interesting examples of such a function? Perhaps ones not involving trigonometric functions? I'd be grateful for some suggestions.
If $-1\lt x\lt1$, and $x\ne0$, let the decimal expansion of $x$ be $x=\pm.000\dots0d_1d_2d_3\dots$ with $d_1\ne0$. Then let $f(x)=\pm.d_1d_2d_3\dots$. For $x=0$ and for $|x|\ge1$ the definition of $f$ is arbitrary. Then for every $a\gt0$ and for every $y$ in $[-1,1]$ there is an $x$ with $-a\lt x\lt a$ and $f(x)=y$.