Prove that $f(x)=\begin{cases}x+1&\text{if}&x\in(-\infty,-1)\\x-1 &\text{if}&x\in(1, +\infty)\\0&\text{if}&x=0\end{cases}$ is continuous

86 Views Asked by At

Let $\mathbb R \supseteq D := (-\infty,-1) \cup \{0\} \cup (1, +\infty)$. We define a function $f: D \to \mathbb R$ by $$f(x) = \begin{cases} x+1 &\text{if} \quad x \in (-\infty,-1) \\ x-1 &\text{if} \quad x \in (1, +\infty) \\ 0 &\text{if} \quad x =0 \end{cases}$$

I would like to prove that $f$ is continuous on $D$. Clearly, $f$ is continuous on $D - \{0\}$, so it suffices to prove that $f$ is continuous at $0$.

Clearly, $f(0) = 0$. Let $U$ be an arbitrary neighborhood of $0$ in $\mathbb R$. Let $U'= (-1,1) \cap D =$ $\{0\}$. Then $U'$ is a neighborhood of $0$ in $D$. We have $f[U'] = \{0\} \subseteq U$. As such, $f$ is continuous at $x=0$.


My questions:

  1. Because $0$ is not a limit point of $D$, $\lim_{x \to 0} f(x)$ is not defined. As such, I can not appeal to the notion limit of a function at point $x=0$. Hence I must use the more general definition of continuity in the metric space. Is my understanding correct?

  2. Could you please verify if my proof looks fine or contains logical gaps/errors? Any suggestion is greatly appreciated.

Thank you so much!

1

There are 1 best solutions below

4
On BEST ANSWER

Note that it doesn't matter which value $f(0)$ is for your argument to work: any function is continuous at an isolated point of its domain.

Or, as an alternative, extend the function to the whole of $\Bbb R$ using $0$ on $[-1,1]$ and three closed parts $(-\infty,-1], [-1,1], [1,+\infty)$ and the pasting lemma implies that $f$ on $\Bbb R$ is continuous (as $x \to x\pm 1$ are and constant maps too) and the restriction to $D$ is then always automatically continuous. (there the value $0$ at $0$ is essential to the argument, not the result).