Let $f:\mathbb R \to \mathbb R$. Prove that if $f$ is uniformly continuous on $[a,b]$ and $[b,c]$, then $f$ is uniformly continuous on $[a,c]$.
My attempt at a solution:
I've came up with a solution but I am having doubts if it is correct, so I would like to check that:
Let $\epsilon>0$, we know that there exist $\delta_1, \delta_2$ such that if $x,y \in [a,b] |x-y|<\delta_1 \implies |f(x)-f(y)|<\dfrac{\epsilon}{2}$
and if
$x,y \in [b,c], |x-y|<\delta_2 \implies |f(x)-f(y)|<\dfrac{\epsilon}{2}$
Let $\delta=\min\{2\delta_1,2\delta_2\}$, if $|x-y|=|x-b+b-y|\leq |x-b|+|b-y|<\delta \implies |f(x)-f(y)|\leq |f(x)-f(b)|+|f(b)-f(y)|\leq \dfrac{\epsilon}{2}+\dfrac{\epsilon}{2}=\epsilon$. This proves that $f$ is uniformly continuous.
I would appreciate if anyone could tell me if my proof is ok or if I've made any mistakes.
(S.A. Understanding Analysis. pp 119 question 4.4.7)
Your proof never uses any of the properties of $\delta$, so it's incomplete. I think you want to set $\delta = \frac{1}{2} \min(\delta_1, \delta_2)$ rather than doubling the deltas. I'd suggest a slight rewrite:
Given $\epsilon > 0$, suppose that $|x - y| < \delta$. Then either (a) $x$ and $y$ are both greater than $b$, or (b) they're both less than $b$ or (c) one is less and one is greater. Without loss of generality, assume $x \le c \le y$. We'll proceed case by case to show that $|f(x) - f(y)| < \epsilon$.
(a) Since $|x - y| < \delta$, we know $|x - y| < \delta_2$; that means (by the unif. continuity assumption for $[b, c]$ that $|f(x) - f(y)| < \epsilon$.
(b) similar to case a.
(c) [your proof, somewhat modified and cleaned up, goes here. You'll need to use the fact that $|x - b| + |b - y| = |x - y|$ because $b$ is between $x$ and $y$. Then you'll put bounds on each of the two terms, and you're on your way.]