Examine the continuity of the function
$f(x)=\left\{\begin{array}{ll}3 x-2, & x \leq 0 \\ x+1, & x>0\end{array}\right.$ at $x=0$
Also sketch the graph of this function.
The given function can be rewritten as:
$f(x)=\left\{\begin{array}{c}3 x-2, x<0 \\ 3(0)-2, x=0 \\ x+1, x>0\end{array}\right.$
$\Rightarrow f(x)=\left\{\begin{array}{c}3 x-2, x<0 \\ -2, x=0 \\ x+1, x>0\end{array}\right.$
We observe
$(\mathrm{LHL}$ at $x=0)=\lim _{x \rightarrow 0^{-}} f(x)=\lim _{h \rightarrow 0} f(0-h)=\lim _{h \rightarrow 0} f(-h)=\lim _{h \rightarrow 0} 3(-h)-2=-2$
$(\mathrm{RHL}$ at $x=0)=\lim _{x \rightarrow 0^{+}} f(x)=\lim _{h \rightarrow 0} f(0+h)=\lim _{h \rightarrow 0} f(h)=\lim _{h \rightarrow 0}(h+1)=1$
$\therefore \lim _{x \rightarrow 0^{-}} f(x) \neq \lim _{x \rightarrow 0^{+}} f(x)$
Hence, $f(x)$ is discontinuous at $x=0$.