How to show a piecewise function is continuous on a subinterval If I have the piecewise function:
$f(x) = x+2$ when $x \in [0,1]$ and $x-2$ when $x \in [2,3]$ being mapped from $[0,1]\cup[2,3]$ to $[0,1]\cup[2,3]$
how do I show that the function is continuous? I do know how to show continuity when there is a break in intervals of the functions. I think I need to show one sided limits but I do not know where to start. I am pretty confused.
 A: Continuity is a local property which means that if two functions coincide on the neighbourhood of a point, if one of them is continuous in that point, also the other is.
In this case you have a function which is the union of two continuous functions on two intervals whose closures do not intersect. So the function is continuous, because in the neighbourhood of every point in the interval $[0,1]$ the function coincides with $x+2$, which you know is continuous and on the neighbourhood of any point in $[2,3]$ the function coincides with $x-2$ which you know is continuos. 
When making the union of two functions you need to check that the limit of the two functions is the same on the points which are accumulation points for the domains of both functions. In this case the domains are closed (so they contain all accumulation points) and they have no intersection. So you don't have to check any limit.
A: Observe that $|f(x)-f(a)| = |x-a|, \forall a \in [0,1]\cup [2,3]$. Thus this means you can take $\delta = \epsilon$, and the conclusion would follow immediately.
