If $E$ is a non-compact and bounded set in $\mathbb{R}$, then there exists a continuous function on $E$ which is not uniformly continuous.
In the proof, the book says that if $E$ is a non-compact and unbounded, there doesn't exist a non-uniformly continuous, by suggesting the example of $E=\mathbb{Z}$. But I can't understand this, because if $E$ is $\mathbb{R}$, which is unbounded, and $f(x)=x^2$, then $f(x)$ is a non-uniformly continuous function.
Please help me ;(