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
 A: 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$.
A: 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?
