If there is $a>0$ s.t. $f|[0,a]$ and $f|[a, +\infty)$ are uniformly continuous, $f:[0, +\infty) \rightarrow \mathbb{R}$ also is Given $f:[0, +\infty) \rightarrow \mathbb{R}$, suppose that exists $a>0$ such that $f|[0,a]$ and $f|[a, +\infty)$ are uniformly continuous. Prove that $f$ is uniformly continuous.
Any hints on how to go about this? I've tried using the definition, but this is not like proving if $f$ and $g$ are u.c., then $f+g$ is as well. The best result I know is that if $f$ and $g$ are uniformly continuous and the codomain of $f$ is the same as the domain of $g$, $g \circ f$ is also uniformly continuous.
I'm not looking for a particular proof of it all, just a potential proposition that could help me see it.

*

*The restriction of $f$ to $[0.a+1]$ is uniformly continuous since $[0,a+1]$ is compact. This implies that for every $c>0$, there exists $d$ such that for every $x,y\leq a+1, |x-y|<d$ implies that $|f(x)-f(y)|<c$.

*Since the restriction of $f$ to $[a,+\infty)$ is uniformly continuous, there exists $e$ such that $x,y\geq a, |x-y|<e$ implies that $|f(x)-f(y)|<c$.
Take $f=min(d,e,1/2)$, Let $x,y\in [0,+\infty)$ such that $|x-y|<f$, if $x<a+1/2, y<a+1$, since $|x-y|<f<1/2$, since $|x-y|<f\leq d$,1. implies that $|f(x)-f(y)|<c$.
If $x\geq a+1/2,y\geq a$ since $|x-y|<1/2$, since $|x-y<f\leq d$ 2. implies that $|f(x)-f(y)|<c$. We conclude that $f$ is uniformly continuous.
