Show that a piecewise function is continuous but its inverse it not

90 Views Asked by At

I have a function, $f:[0,1)\cup[2,3]\to \mathbb{R}$ such that $$f(x) = \begin{cases} x & x\in[0,1)\\ x-1 & x\in [2,3] \end{cases}$$ That I want to show is continuous, but also show its inverse it not.

Here is my proof for continuity:

Continuity

Let $x_0\in [0,1)$, and suppose that $0 < |x - x_0| < \delta$.

Then if $\delta = \epsilon$, $0 < |f(x) - f(x_0)| = |x - x_0| < \delta = \epsilon$.

So $f$ is continuous on the interval $[0,1)$.

Let $x_0\in [2,3]$, and suppose that $0 < |x - x_0| < \delta$.

Then if $\delta = \epsilon$, $0 < |f(x) - f(x_0)| = |x - 1 - x_0 + 1| = |x - x_0| < \delta = \epsilon$.

So $f$ is continuous on the interval $[2,3]$.

The above also implies that the limit of $f$ at $x\to 1$ from the left is $1$, and the limit of $f$ as $x\to 2$ from the right is $1$.

Therefore $f$ is continuous.

My concern with this proof is that it feels like I can do the same thing with the inverse function to show that the inverse function is continuous, even though I know that a choice of $\epsilon = 1/2$ disrupts the continuity. What am I missing here?

1

There are 1 best solutions below

8
On

I feel like $\epsilon-\delta$ shrouds vision while solving this question. Elementary topology is a useful tool here.


Note that $[0,1[$ is closed in $[0,1[ \cup [2,3]$ since we for example have $[0,1[ = [0,1] \cap ([0,1[ \cup [2,3])$. Similarly, $[2,3]$ is closed in $[0,1[ \cup [2,3]$. Next, note that your function is continuous restricted to these two subsets. Thus, as a corollary of the pasting lemma, we see that the function you wrote down is continuous.


An inverse, if it exists, can't be continuous. Indeed, suppose to the contrary that such a continuous inverse exists. Then you have a continuous map

$$f^{-1}: \mathbb{R} \to [0,1[ \cup [2,3]$$

and in particular by continuity it follows that $[0,1[ \cup [2,3]$ is connected, which is not the case. This is the desired contradiction.


Here is an answer avoiding topology:

Let $\epsilon > 0$ be given and put $\delta:= \min \{\epsilon, 1/2\}$. Then if $|x-y| < \delta$, we see that either $x,y \in [0,1[$ or $x,y \in [2,3]$ and it trivially follows that $|f(x)-f(y)| < \epsilon$, showing that $f$ is uniformly continuous, hence continuous.

Assume to the contrary a continuous inverse exists. Note that $f^{-1}(0) = 0$ and $f^{-1}(2) = 3$ so by the intermediate value theorem, there is a point $c \in \mathbb{R}$ such that $f^{-1}(c) = 1$. This is impossible as the image of $f^{-1}$ is $[0,1[ \cup [2,3]$.