Prove that the function $f:\mathbb{R}\to\mathbb{R}$, $f(x):=\frac{1}{x^2+x+1}$ is uniformly continuous. My attempt: 
$x^2 + x + 1 \neq 0$ so $lim_{x \to a} f(x) = f(a) \forall_{a \in \mathbb{R}}$. So $f(x)$ is continuous. 
$\lim_{x \to +\infty} f(x) = 0 $ and $\lim_{x \to -\infty} f(x) = 0$. 
Set $M > 0$ such that $|x| > M \implies f(x) < \frac{\epsilon}{2}$. Since $f$ is continuous, $f$ restricted to the interval $[-M-1, M+1]$ is uniformly continuous. 
This means $\exists_{\delta_1 > 0} \forall_{x,y \in [-M - 1, M + 1]} |x-y| < \delta_1 \implies |f(x) - f(y)| < \epsilon$ 
set $\delta = min\{\delta_1, 1\}$. Given $x, y \in \mathbb{R}$ such that $|x - y| < \delta$ there are 3 cases to consider: 
Case 1: $x, y \in [-M-1, M+1]$. Then $|x - y| < \delta$, so $|f(x) - f(y)| < \epsilon$
Case 2: $x \notin[-M-1, M+1]$. Since $|x - y| < \delta_1 \leq 1$, it follows that $y \notin[-M, M]$ Therefore $|f(x) - f(y)| \leq |f(x)| + |-f(y)| < \frac{\epsilon}{2} + \frac{\epsilon}{2} < \epsilon$
Case 3: $y \notin[-M-1, M+1]$ Since $|x - y| < \delta_1 \leq 1$, it follows that $x \notin[-M, M]$ Therefore $|f(x) - f(y)| \leq |f(x)| + |-f(y)| < \frac{\epsilon}{2} + \frac{\epsilon}{2} < \epsilon$
In all 3 cases $|f(x) - f(y)| < \epsilon$. it follows that $f:\mathbb{R}\to\mathbb{R}$, 
$f(x):=\frac{1}{x^2+x+1}$ 
is uniformly continuous.
I am wondering if this proof is correct, and whether my claim at the start that $f$ is continuous is ok.
 A: Yes. Everything is correct except for a minor error: In both cases 2 and 3 you typed $\delta_1$ instead of $\delta$.
Other way for justifying the continuity of $f$: We know that polynomials are continuous. Also, the inverse of a continuous non-zero function is continuous. Then the inverse of a non-zero polynomial is continuous. Then $f$ is continuous.
Basically what you did is... Since $f$ is continuous on the whole of $\mathbb{R}$ and also $\lim_{|x|\to\infty}f(x)=0$, we have that $|f(x)|$ becomes as small as we please when $|x|$ grows, so, for $\varepsilon>0$ there is some $M>0$ such that $|f(x)|<\varepsilon/2$ for all $|x|>M$. Now divide the argument in two cases: continuity on a closed and bounded interval and $f$ is really small in the complement. On one hand, we have uniform continuity, as you said, on the other we have $|f|$ small and we're done.
A: Also note that
$x^2+x+1
=x^2+x+\frac14+\frac34
=(x+\frac12)^2+\frac34
\ge \frac34$.
A: One can also show that $f$ is a contraction:
$$|f(x)-f(y)|\le |x-y|$$
because $|f'(x)|\le 1$ for all $x$.
Indeed, since $f'(x)= -\frac{2x+1}{(x^2+x+1)^2}$,  we have 
$$1+ f'(x) = \frac{x^2 (x^2 + 2 x + 3)}{(x^2 + x+1)^2}\ge 0$$
$$1 - f'(x) = \frac{(x+1)^2 (x^2+2)}{(x^2 + x+1)^2}\ge 0$$
