Let $f(x)=\left\{\begin{array}{ccc}\frac{1-\cos x}{x^{2}}, & \text { when } & x \neq 0 \\ 1 & , \text { when } x=0\end{array}\right.$
Show that f(x) is discontinuous at x = 0.
Given:
$f(x)=\left\{\begin{array}{l}\frac{1-\cos x}{x^{2}}, \text { when } x \neq 0 \\ 1, \quad \text { when } x=0\end{array}\right.$
Consider:
$\lim _{x \rightarrow 0} f(x)=\lim _{x \rightarrow 0}\left(\frac{1-\cos x}{x^{2}}\right)$
$\Rightarrow \lim _{x \rightarrow 0} f(x)=\lim _{x \rightarrow 0}\left(\frac{2 \sin ^{2} \frac{x}{2}}{x^{2}}\right)$
$\Rightarrow \lim _{x \rightarrow 0} f(x)=\lim _{x \rightarrow 0}\left(\frac{2 \sin ^{2} \frac{x}{2}}{4\left(\frac{x^{2}}{4}\right)}\right)$
$\Rightarrow \lim _{x \rightarrow 0} f(x)=\lim _{x \rightarrow 0}\left(\frac{2\left(\sin \frac{x}{2}\right)^{2}}{4\left(\frac{x}{2}\right)^{2}}\right)$
$\Rightarrow \lim _{x \rightarrow 0} f(x)=\frac{2}{4} \lim _{x \rightarrow 0}\left(\frac{\sin \frac{x}{2}}{\frac{x}{2}}\right)^{2}$
$\Rightarrow \lim _{x \rightarrow 0} f(x)=\frac{1}{2} \cdot 1^{2}=\frac{1}{2}$
Given:
$f(0)=1$
$\therefore \lim _{x \rightarrow 0} f(x) \neq f(0)$
Thus, $f(x)$ is discontinuous at $x=0$.