If $f$ is uniformly continuous on $[1,4]$ and uniformly continuous on $[2,5]$ is $f$ uniformly continuous on $[1,5]$

epsilon-deltaproof-verificationreal-analysis

If $f$ is uniformly continuous on $[1,4]$ and uniformly continuous on $[2,5]$ is $f$ uniformly continuous on $[1,5]$?

I know that the answer is that it is true, but I am interested as to why my proof is incorrect. What I did was:

Since

$\exists \delta_1 s.t. |x-y|<\delta_1 \to |f(x)-f(y)|<\frac{\epsilon}{2}$ for $x,y \in [1,2]$ and $\exists \delta_2 s.t. |x-y|<\delta_2 \to |f(x)-f(y)|<\frac{\epsilon}{2}$ for $x,y \in [2,5]$

Then set $\delta_3 = \min{\delta_1,\delta_2}$
and you get (by triangle inequality)

$|f(x)-f(y)|=|f(x)-f(3)+f(3)-f(y)|\leq |f(x)-f(3)| + |f(y)-f(3)|\leq\frac{\epsilon}{2}+\frac{\epsilon}{2}=\epsilon$

as long as $|x-y|<\delta_3$
What's wrong with this proof and how can I fix it?

Best Answer

hint

The uniform continuity at $[1,4]$ gives $\delta_1$

the UC at $[4,5]$ will give $\delta_2$.

the continuity at $x=4$ gives $\delta_3$ such that

$$|x-4|<\delta_3 \implies |f(x)-f(4)|<\frac{\epsilon}{2}$$

Take $\delta=\min(\delta_i,i=1,2,3).$

If $x\in[1,4]$ and $y\in[4,5]$ are such $|x-y|<\delta$ then

$|x-4|<\delta_3$ and $|y-4|<\delta_3$

thus

$$|f(x)-f(y)|=$$ $$=|f(x)-f(4)+f(4)-f(y)|<\epsilon$$

Related Question