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 best way to prove this is directly from the definition. If $f|_{[0,a]}$ is uniformly continuous, you know that for any $\varepsilon_1 > 0$ there exists a $\delta_1 > 0$ such that if $|x - y| < \delta_1$ and $x,y \in [0,a]$ then $|f(x) - f(y)| < \varepsilon_1$. Similarly, if $f|_{[a,\infty)}$ is uniformly continuous, you know that for any $\varepsilon_2 > 0$ there exists $\delta_2 > 0$ such that if $|x - y| < \delta_2$ and $x,y \in [a, \infty)$ then $|f(x) - f(y)| < \varepsilon_2$.
Given $\varepsilon > 0$, you want to find $\delta > 0$ such that if $|x - y| < \delta$ and $x,y \in [0,\infty)$ then $|f(x) - f(y)| < \varepsilon$. The naive attempt is to take $\varepsilon_1 = \varepsilon$ and obtain $\delta_1$ which works on $[0,a]$, take $\varepsilon_2 = \varepsilon$ and obtain a $\delta_2$ which works on $[a,\infty)$ and then you might hope that $\delta = \min (\delta_1, \delta_2)$ will give you a $\delta$ that works on $[0,\infty)$. An indeed, this almost works as this guarantees that
$$ |f(x) - f(y)| < \varepsilon $$
if both $x,y$ are in $[0,a]$ or both $x,y$ are in $[a,\infty)$. But what happens if $x \in [0,a]$ and $y \in [a,\infty)$? Try and think how you can estimate $|f(x) - f(y)|$ in this case and modify the argument accordingly. You will need to use the triangle inequality and compare everything to the values of $f$ at some point.