Test the continuity of the function onĀ f(x) at the origin:
$f(x)=\left\{\begin{array}{cc}\frac{x}{|x|}, & x \neq 0 \\ 1, & x=0\end{array}\right.$
Given:
$f(x)=\left\{\begin{array}{l}\frac{x}{|x|}, x \neq 0 \\ 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} \frac{-h}{|-h|}=\lim _{h \rightarrow 0} \frac{-h}{h}=\lim _{h \rightarrow 0}-1=-1$
(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} \frac{h}{|h|}=\lim _{h \rightarrow 0} \frac{h}{h}=\lim _{h \rightarrow 0} 1=1$
$\therefore \lim _{x \rightarrow 0^{+}} f(x) \neq \lim _{x \rightarrow 0^{-}} f(x)$
Hence, $f(x)$ is discontinuous at the origin.