# At what point is the function $f:\mathbb{R}\rightarrow\mathbb{R}$ continuous?

Define $f(x)=\begin{cases}x^2\,\,\,\,\text{if$x\leq 0$}\\ x+1\,\,\,\text{if$x>0$}\end{cases}$At what point is the function $f:\mathbb{R}\rightarrow\mathbb{R}$ continuous? Justify the answer.

I will separate it into three cases:

Case 1: Let $x_0>0$, then let $\{x_n\}$ be a sequence in $\mathbb{R}$ that converges to $x_0$. Let $\epsilon=x_0/2$, then there exists an index $N\in\mathbb{N}$ such that all members of $x_n$ is contained in $(a-\epsilon,a+\epsilon)$ for all $n\leq N$. Then we have $\lim\limits_{n\rightarrow\infty} f(x_n)=f(x_0)=x_0+1$

Case 2: let $x_0<0$, apply the similar way as case 1, we can have $\lim\limits_{n\rightarrow\infty} f(x_n)=f(x_0)=x_0^2$

Case 3: let $x_0=0$, and let $\{x_n\}$ be a sequence of $\mathbb{R}$ that converges to $x_0$, but we have $\lim\limits_{n\rightarrow 0^-} f(x_n)=f(x_0)=x_0^2$ and $\lim\limits_{n\rightarrow 0^+} f(x_n)=f(x_0)=x_0+1$, hence $f(x)$ is not continuous.

Can anyone help me to write a better proof by using the definition of sequential continuous? Thanks

• $f$ is continuous in $\mathbb R\setminus \{0\}$. – Empty Oct 23 '15 at 2:43
• Since I need to justify why it is continuous at $x\neq 0$, I need to show why the function is continuous at $x>0,x<0$ and not continuous at $x=0$, right? – Jia Xu Oct 23 '15 at 2:53
• For case 3, you should demonstrate a specific sequence for which $\lim_{n\to\infty}x_n=0$ but $\lim_{n\to\infty}f(x_n)$ does not exist. Such a sequence should have infinitely-many positive terms and infinitely-many negative terms. For the other two cases, you do want to proceed more generally. – Cameron Buie Oct 23 '15 at 3:54
• @CameronBuie I could have $x_n=1/n$ which limit is $0$, so $\lim f(x_n)=\lim f(1/n)=1\neq 0$, I confused about to process more generally – Jia Xu Oct 23 '15 at 4:05
• That works just as well (and arguably better)! You've thus shown that $x_n\to0,$ but $f(x_n)$ does not converge to $f(0).$ – Cameron Buie Oct 23 '15 at 4:11

The map $f$ is continuous at every $c < 0$; for, let $c < 0$. Then $x < 0$ only if $|f(x) - f(c)| = |x-c||x+c|$; note that $|x-c| < |c|/2$ only if $|x+c| < 5|c|/2$ and only if $|x-c||x+c| < |x-c|5|c|/2$; for every $\varepsilon > 0$, we have $|x-c| < 2\varepsilon/5|c|$ only if $|x-c|5|c|/2 < \varepsilon$, and hence $|x-c| < \min \{ |c|/2, 2\varepsilon/5|c| \}$ only if $|f(x) - f(c)| < \varepsilon$.

The map $f$ is continuous at every $c > 0$; for, let $c > 0$. Then $x > 0$ only if $|f(x) - f(c)| = |x-c|$; for every $\varepsilon > 0$, we have $|x-c| < \varepsilon$ only if $|f(x) - f(c)| < \varepsilon$.

We have proved that $f$ is continuous at every point $\neq 0$; we claim that $f$ is discontinuous at $0$. But $f(x) \to 1$ as $x \to 0+$ and $f(x) \to 0$ as $x \to 0-$ (try to show these); hence $f$ is not continuous at $x=0$.

• how do you get $|x-c||x+c|<|x-c|5|c|/2$ – Jia Xu Oct 23 '15 at 3:48
• By triangle inequality throughout: $|x-c| < |c|/2$ only if $|x| - |c| \leq |x-c| < |c|/2$, only if $|x| < 3|c|/2$, only if $|x|+|c| < 5|c|/2$, and only if $|x+c| \leq |x|+|c| < 5|c|/2$. – Megadeth Oct 23 '15 at 3:50
• do you get it now? By the way, you have the right here to accept any answer you find which helpful. – Megadeth Oct 23 '15 at 8:24

Well $x^2$ and $x+1$ are continuous on their respective domains, so the only point to check is $x=0$. Obviously, as $x\to0^+$, $f(x)\to 1$ and if $x\to 0^-$, then $f(x)\to 0$. Hence, $f$ isn't continuous at $x=0$

By better do you mean more $\epsilon$s and $\delta$s?

• more $\epsilon$ – Jia Xu Oct 23 '15 at 3:40