Examples of uniform continuity
Consider $f(x) = x^2$.
-
$f: \R\to\R$ is not uniformly continuous: take $\epsilon = 1$. Note that if $y=x+z$, $$ \begin{align*} f(y) - f(x) = (x+z)^2 - x^2 = 2xz + z^2 \end{align*} $$ so for every $\delta>0$, taking $x = 1/\delta$ and $y=x+\delta/2 \in B_\delta(x)$ yields $f(y) - f(x) \geq \delta$.
-
However $f: [0,1]\to \R$ is uniformly continuous: for $y=x+z$ with $x,y\in [0,1]$, $$ \begin{align*} |f(y) - f(x)| \leq |2xz| + z^2 \leq 2|z| + |z| = 3|z|. \end{align*} $$ So for every $\epsilon>0$, letting $\delta=\epsilon/3$ works.