Show that if $f$ is continuous on $[0, \infty)$ and uniformly continuous $[a, \infty)$ for some positive constant $a$, then $f$ is uniformly continuous on $[0, \infty)$.
Here is my attempt at the proof. A classmate is concerned my proof leaves a gap around $a$ that is not rigorously defined.
Proof:
Let $f: [0, \infty) \rightarrow \Bbb R$ continuous and let $f: [a, \infty) \rightarrow \Bbb R$ uniformly continuous for $a>0$
Consider the interval $I:= [0,a]$ and $[0,a] \subseteq \Bbb R$
Note the interval $[0,a]$ is closed and bounded. By the Heine-Borel Theorem, since $I$ is closed and bounded, $I$ is compact.
If a function $f$ is continuous on a compact space then it is uniformly continuous thus $f$ is uniformly continuous on $[0, \infty)$
This is a proof for my real analysis class and I've used a proof that I learned last semester in topology. So it may be the case that this technique is not allowable. Can anyone advise?
Is this proof sufficient to confirm that the points around $[0,a)$ are continuous?
Let $\epsilon > 0$. Since $[0,a]$ is a compact subset of $\mathbb R$ and $f$ is continuous on $[0,\infty)$, $f$ is uniformly continuous on $[0,a]$. Hence, there exists $\delta_1 > 0$ such that $$ x,y \in [0,a], \quad |x - y| < \delta_1 \implies |f(x) - f(y)| < \epsilon/2. $$ Since $f$ is uniformly continuous on $[a,\infty)$, there exists $\delta_2 > 0$ such that $$ x,y \in [a,\infty), \quad |x - y| < \delta_2 \implies |f(x) - f(y)| < \epsilon/2. $$ Choose $\delta = \min{\delta_1,\delta_2}$. By our choice of $\delta$, if $x,y \in [0,a]$ or $x,y \in [a,\infty)$, then $|x - y| < \delta \implies |f(x) - f(y)| < \epsilon/2 < \epsilon$. If $x < a < y$ and $|x - y| < \delta$, then $|x - a| < \delta \leq \delta_1$ so $$ |f(x) - f(a)| < \epsilon/2. $$ Similarly, we have $|y - a| < \delta \leq \delta_2$ so that $$ |f(x) - f(a)| < \epsilon/2. $$ Thus, we see that if $x < a < y$ and $|x - y| < \delta$, then $$ |f(x) - f(y)| \leq |f(x) - f(a)| + |f(y) - f(a)| < \epsilon. $$