If a function is uniformly continuous on $(-\infty,-1]$ and $[-1,\infty)$ is it uniformly continuous on $\mathbb{R}$ Is it correct to say that if $f(x)$ is uniformly continuous on $(-\infty,-1]$ and $[-1,\infty)$, then it is uniformly continuous on $\mathbb{R}$?
I don't think this is true but cannot think of a counterexample. Below there is an example of where I want to use this.
Thanks for any help

Prove that $f(x)=|x|^{\frac{1}{2}}$ is uniformly continuous on $\mathbb{R}$

Proof.
As $|x|^{\frac 12}$ is differentiable on $(-\infty,-1]$ and $[1,\infty)$ with the derivatives bounded then it is uniformly continuous on these intervals.
It is also continuous on $[-1,1]$ and so it is uniformly continuous. 
It is therefore continuous on $\mathbb{R}$.

Yes. If a function is uniformly continuous on each of finitely many closed intervals, then it is also uniformly continuous on their union.
Go back to the definition of uniform continuity on each of the subintervals: For every $\varepsilon>0$ that gives us a $\delta>0$ such that the variation of $f$ on a length-$\delta$ interval is bounded by $\varepsilon/2$. For a given $\varepsilon$, the $\delta$s for the various subintervals will have a positive minimum (because there are finitely many of them), and this minimum works as a $\delta$ everywhere. (Near an interval boundary, allot $\varepsilon/2$ of variation to each of the intervals. Bound the $\delta$ globally such that there is never a need to cross more than one interval boundary in each direction).
