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