Is the function f defined by
$f(x)=\left\{\begin{array}{l}x, \text { if } x \leq 1 \\ 5, \text { if } x>1\end{array}\right.$
continuous at $x=0$ ? At $x=1$ ? At $x=2$ ?
The given function $f$ is $f(x)=\left\{\begin{array}{l}x, \text { if } x \leq 1 \\ 5, \text { if } x>1\end{array}\right.$
At $x=0$
It is evident that f is defined at 0 and its value at 0 is 0.
Then, $\lim _{x \rightarrow 0} f(x)=\lim _{x \rightarrow 0} x=0$
$\therefore \lim _{x \rightarrow 0} f(x)=f(0)$
Therefore, f is continuous at x = 0
At x = 1,
f is defined at 1 and its value at 1 is 1.
The left hand limit of f at x = 1 is,
$\lim _{x \rightarrow 1^{-}} f(x)=\lim _{x \rightarrow 1^{-}} x=1$
The right hand limit of f at x = 1 is,
$\lim _{x \rightarrow 1^{+}} f(x)=\lim _{x \rightarrow 1^{+}}(5)=5$
$\therefore \lim _{x \rightarrow 1} f(x) \neq \lim _{x \rightarrow 1} f(x)$
Therefore, $f$ is not continuous at $x=1$
At $x=2$,
f is defined at 2 and its value at 2 is 5.
Then, $\lim f(x)=\lim (5)=5$
$\therefore \lim _{x \rightarrow 2} f(x)=f(2)$
Therefore, f is continuous at x = 2