Discuss the continuity of the following functions at the indicated point(s):
(i) $f(x)=\left\{\begin{array}{cl}|x| \cos \left(\frac{1}{x}\right), & x \neq 0 \\ 0 & , x=0\end{array}\right.$ at $x=0$
(ii) $f(x)=\left\{\begin{array}{cl}x^{2} \sin \left(\frac{1}{x}\right), & x \neq 0 \\ 0, & x=0\end{array}\right.$ at $x=0$
(iii) $f(x)=\left\{\begin{array}{cl}(x-a) \sin \left(\frac{1}{x-a}\right), & x \neq a \\ 0 & , x=a\end{array}\right.$ at $x=a$
(iv) $f(x)=\left\{\begin{array}{cc}\frac{e^{x}-1}{\log (1+2 x)}, & \text { if } \quad x \neq a \\ 7 & , \text { if } x=0\end{array}\right.$ at $x=0$
(v) $f(x)=\left\{\begin{array}{ll}\frac{1-x^{n}}{1-x}, & x \neq 1 \\ n-1 & , x=1\end{array} n \in N\right.$ at $x=1$
(vi) $f(x)=\left\{\begin{array}{cc}\frac{\left|x^{2}-1\right|}{x-1}, & \text { for } \quad x \neq 1 \\ 2 & \text {, for } x=1\end{array}\right.$ at $x=1$
(vii) $f(x)=\left\{\begin{array}{cl}\frac{2|x|+x^{2}}{x}, & x \neq 0 \\ 0, & x=0\end{array}\right.$ at $x=0$
(viii) $f(x)=\left\{\begin{array}{l}|x-a| \sin \left(\frac{1}{x-a}\right), \text { for } x \neq a \\ 0, \text { for } x=a\end{array}\right.$ at $x=a$
(i) Given:
$f(x)=\left\{\begin{array}{l}|x| \cos \left(\frac{1}{x}\right), x \neq 0 \\ 0, x=0\end{array}\right.$
We observe
$\lim _{x \rightarrow 0} f(x)=\lim _{x \rightarrow 0}|x| \cos \left(\frac{1}{x}\right)$
$\Rightarrow \lim _{x \rightarrow 0} f(x)=\lim _{x \rightarrow 0}|x| \lim _{x \rightarrow 0} \cos \left(\frac{1}{x}\right)$
$\Rightarrow \lim _{x \rightarrow 0} f(x)=0 \times \lim _{x \rightarrow 0} \cos \left(\frac{1}{x}\right)=0$
$\Rightarrow \lim _{x \rightarrow 0} f(x)=f(0)$
Hence, $f(x)$ is continuous at $x=0$.
(ii) Given:
$f(x)=\left\{\begin{array}{l}x^{2} \sin \frac{1}{x}, x \neq 0 \\ 0, x=0\end{array}\right.$
We observe
$\lim _{x \rightarrow 0} x^{2} \sin \left(\frac{1}{x}\right)=\lim _{x \rightarrow 0} x^{2} \lim _{x \rightarrow 0} \sin \left(\frac{1}{x}\right)=0 \times \lim _{x \rightarrow 0} \sin \left(\frac{1}{x}\right)=0$
$\Rightarrow \lim _{x \rightarrow 0} f(x)=f(0)$
Hence, $f(x)$ is continuous at $x=0$.
(iii) Given:
$f(x)=\left\{\begin{array}{l}(x-a) \sin \left(\frac{1}{x-a}\right), \quad x \neq a \\ 0, x=a\end{array}\right.$
Putting $x-a=y$, we get
$\lim _{x \rightarrow a}(x-a) \sin \left(\frac{1}{x-a}\right)=\lim _{y \rightarrow 0} y \sin \left(\frac{1}{y}\right)=\lim _{y \rightarrow 0} y \lim _{y \rightarrow 0} \sin \left(\frac{1}{y}\right)=0 \times \lim _{y \rightarrow 0} \sin \left(\frac{1}{y}\right)=0$
$\Rightarrow \lim _{x \rightarrow a} f(x)=f(a)=0$
Hence, $f(x)$ is continuous at $x=a$.
(iv) Given:
$f(x)= \begin{cases}\frac{e^{x}-1}{\log (1+2 x)}, & \text { if } x \neq 0 \\ 7, & \text { if } x=0\end{cases}$
We observe
$\lim _{x \rightarrow 0} f(x)=\lim _{x \rightarrow 0} \frac{e^{x}-1}{\log (1+2 x)}$
$\Rightarrow \lim _{x \rightarrow 0} f(x)=\lim _{x \rightarrow 0} \frac{e^{x}-1}{\frac{2 x \log (1+2 x)}{2 x}}$
$\Rightarrow \lim _{x \rightarrow 0} f(x)=\frac{1}{2} \lim _{x \rightarrow 0} \frac{\left(\frac{e^{x-1}}{x}\right)}{\left(\frac{\log (1+2 x)}{2 x}\right)}$
$\Rightarrow \lim _{x \rightarrow 0} f(x)=\frac{1}{2} \times \frac{\left(\lim _{x \rightarrow 0} \frac{e^{x-1}}{x}\right)}{\left(\lim _{x \rightarrow 0} \frac{\log (1+2 x)}{2 x}\right)}=\frac{1}{2} \times \frac{1}{1}=\frac{1}{2}$
And, $f(0)=7$
$\Rightarrow \lim _{x \rightarrow 0} f(x) \neq f(0)$
Hence, f(x) is discontinuous at x = 0.
(v) Given:
$f(x)=\left\{\begin{array}{l}\frac{1-x^{n}}{1-x}, x \neq 1 \\ n-1, x=1\end{array}\right.$
Here, $f(1)=n-1$
$\lim _{x \rightarrow 1} f(x)=\lim _{x \rightarrow 1} \frac{1-x^{n}}{1-x}$
$\Rightarrow \lim _{x \rightarrow 1} f(x)=\lim _{x \rightarrow 1}\left[(1-x)^{n-1}+{ }^{n} C_{1}(1-x)^{n-2} x+{ }^{n} C_{2}(1-x)^{n-3} x^{2}+\ldots+{ }^{n} C_{n-1}(1-x)^{0} x^{n-1}\right]$
$\Rightarrow \lim _{x \rightarrow 1} f(x)=0+0 \ldots+(1)^{n-1}=1 \neq f(1)$
Thus, $f(x)$ is discontinuous at $x=1$.
(vi) Given:
$f(x)=\left\{\begin{array}{l}\frac{\left|x^{2}-1\right|}{x-1}, \quad x \neq 1 \\ 2, \quad x=1\end{array}\right.$
$\Rightarrow f(x)=\left\{\begin{array}{c}x+1, \quad x<-1 \\ -x-1, \quad-1 \leq x<1 \\ x+1, \quad x>1 \\ 2, \quad x=1\end{array}\right.$
We observe
$($ LHL at $x=1)=\lim _{x \rightarrow 1^{-}} f(x)=\lim _{h \rightarrow 0} f(1-h)=\lim _{h \rightarrow 0}-(1-h)-1=\lim _{h \rightarrow 0}-2+h=-2$
And, $f(1)=2$
$\Rightarrow \lim _{x \rightarrow 1^{-}} f(x) \neq f(1)$
Hence, f(x) is discontinuous at x = 1.
(vii) Given:
$f(x)=\left\{\begin{array}{l}\frac{2|x|+x^{2}}{x}, x \neq 0 \\ 0, x=0\end{array}\right.$
$\Rightarrow f(x)=\left\{\begin{array}{cc}\frac{2 x+x^{2}}{x}, & x>0 \\ \frac{-2 x+x^{2}}{x}, & x<0 \\ 0, & x=0\end{array}\right.$
$\Rightarrow f(x)=\left\{\begin{array}{cc}(x+2), & x>0 \\ (x-2), & x<0 \\ 0, & x=0\end{array}\right.$
We observe
(LHL at $x=0$ ) $=\lim _{x \rightarrow 0^{-}} f(x)=\lim _{h \rightarrow 0} f(-h)=\lim _{h \rightarrow 0}[-h-2]=-2$
(RHL at $x=0$ ) $=\lim _{x \rightarrow 0^{+}} f(x)=\lim _{h \rightarrow 0} f(h)=\lim _{h \rightarrow 0}(2+\mathrm{h})=2$
$\Rightarrow \lim _{x \rightarrow 0^{-}} f(x) \neq \lim _{x \rightarrow 0^{+}} f(x)$
Hence, $f(x)$ is discontinuous at $x=0$.
(viii) Given:
$f(x)=\left\{\begin{array}{l}|x-a| \sin \left(\frac{1}{x-a}\right), \text { for } x \neq a \\ 0, \text { for } x=a\end{array}\right.$
$\Rightarrow f(x)=\left\{\begin{aligned}(x-a) \sin \left(\frac{1}{x-a}\right), & x>0 \\(x+a) \sin \left(\frac{1}{x+a}\right), & x<0 \\ 0, \quad x=a & \end{aligned}\right.$
We observe
(LHL at $x=a$ ) $=\lim _{x \rightarrow a^{-}} f(x)=(-a+a) \sin \left(\frac{1}{-a+a}\right)=0$
(RHL at $x=a$ ) $=\lim _{x \rightarrow a^{+}} f(x)=(a-a) \sin \left(\frac{1}{a-a}\right)=0$
$\Rightarrow \lim _{x \rightarrow a^{-}} f(x)=\lim _{x \rightarrow a^{+}} f(x)=f(a)$
Hence, f(x) is continuous at x = a.