Solve this
Question:

If $f(x)=\left\{\begin{array}{cc}\frac{x^{2}-1}{x-1} ; & \text { for } \quad x \neq 1 \\ 2 \quad ; & \text { for } x=1\end{array}\right.$

Find whether $f(x)$ is continuous at $x=1$.

Solution:

Given:

$f(x)= \begin{cases}\frac{x^{2}-1}{x-1}, & \text { if } x \neq 1 \\ 2, & \text { if } x=1\end{cases}$

We observe

$(\mathrm{LHL}$ at $x=1)=\lim _{x \rightarrow 1^{-}} f(x)=\lim _{h \rightarrow 0} f(1-h)$

$=\lim _{h \rightarrow 0} \frac{(1-h)^{2}-1}{(1-h)-1}=\lim _{h \rightarrow 0} \frac{1+h^{2}-2 h-1}{1-h-1}=\lim _{h \rightarrow 0} \frac{h^{2}-2 h}{-h}=\lim _{h \rightarrow 0} \frac{h(h-2)}{-h}=\lim _{h \rightarrow 0}(2-h)=2$

$(\mathrm{RHL}$ at $x=1)=\lim _{x \rightarrow 1^{+}} f(x)=\lim _{h \rightarrow 0} f(1+h)$

$=\lim _{h \rightarrow 0} \frac{(1+h)^{2}-1}{(1+h)-1}=\lim _{h \rightarrow 0} \frac{1+h^{2}+2 h-1}{1+h-1}=\lim _{h \rightarrow 0} \frac{h^{2}+2 h}{h}=\lim _{h \rightarrow 0} \frac{h(h+2)}{h}=\lim _{h \rightarrow 0}(2+h)=2$

Given:

$f(1)=2$

$\therefore \lim _{x \rightarrow 1^{-}} f(x)=\lim _{x \rightarrow 1^{+}} f(x)=f(1)$

Hence, $f(x)$ is continuous at $x=1$.