I am aware that it is a duplicate of this post, but I haven't seen anyone presenting the proof which I used.
Could you kindly verify whether my proof is valid please?
The intuition is as follows:
If a function is uniformly continuous, then small perturbation in $x$ results in small perturbation in $y$, namely
$\forall \epsilon > 0, \exists \delta > 0 \text{ s.t. } |x - y| < \delta \implies |f(x) - f(y)| < \epsilon $
In the case of $f(x) = x^2$, consider $x = N, y = N + \frac{1}{N}$, thus $|f(x) - f(y)| = 2 + \frac{1}{N^2}$
As $N \to \infty$, $x$ will be very close to $y$, but $2 + \frac{1}{N^2} \to 2$, thus the $y$-difference $> 2$, hence the criterion of uniform continuity fails for any $\epsilon \leq 2$.
Many thanks in advance!
I think your idea is on a right track, but $|f(x)-f(y)|=1+\frac{2}{N}$ is false. $f(x)=N^2$ and $f(y)=N^2+\frac{1}{N^2}+2$, so $|f(x)-f(y)|=2+\frac{1}{N^2}$. The rest of your idea is correct.
For if $f(x)=x^2$ were uniformly continuous on $\mathbb{R}$, then $|x-y|$ being sufficiently small should imply that $|f(x)-f(y)|$ being as small as we want. But with our $x=N$ and $y=N+\frac{1}{N}$, we have $|f(x)-f(y)|>1$ so that its value can't be small enough though $|x-y|$ can get arbitrarily small.