Find a function $f$ that is continuous and bounded on $[0, \infty)$ but which is not uniformly continuous on $[0, \infty)$

continuityuniform-continuity

From Spivak Calculus 4th edition.

Question:
Find a function $f$ that is continuous and bounded on $[0, \infty)$ but which is not uniformly continuous on $[0, \infty)$.

I understand that functions that are not uniformly continuous inevitably have a slope that gets steeper and steeper.

However, given that $\sin(\frac1x)$ is not continuous at $0$, I am having trouble coming up with a function that satisfies this. All the variations on $\sin(x)$ I can come up with are all not bounded.

Best Answer

What about $\sin(x^2)$? This is bounded and has similar rapid oscillation as $x$ approaches $\infty$.