# Solve this

Question:

If $f(x)= \begin{cases}\frac{1-\cos x}{x \sin x}, & x \neq 0 \\ \frac{1}{2} & , x=0\end{cases}$

then at x = 0, f (x) is
(a) continuous and differentiable
(b) differentiable but not continuous
(c) continuous but not differentiable
(d) neither continuous nor differentiable

Solution:

(a) continuous and differentiable

we have,

$f(x)= \begin{cases}\frac{1-\cos x}{x \sin x}, & x \neq 0 \\ \frac{1}{2} & , x=0\end{cases}$

$f(x)= \begin{cases}\frac{1-\cos x}{x \sin x}, & x \neq 0 \\ \frac{1}{2} & , x=0\end{cases}$

Continuity at $x=0$

$(L H L$ 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{1-\cos (-h)}{(-h) \sin (-h)}$

$=\lim _{h \rightarrow 0} \frac{1-\cos h}{h \sin h}$

$=\lim _{h \rightarrow 0} 1-\cos h \quad \lim _{h \rightarrow 0} \frac{1}{h \sin h}$

$=1-\cos (0) \cdot \frac{1}{0 \sin 0}$

$=0$

$(R H L$ 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{1-\cos (h)}{(h) \sin (h)}$

$=\lim _{h \rightarrow 0} \frac{1-\cos h}{h \sin h}$

$=\lim _{h \rightarrow 0} 1-\cos h \quad \lim _{h \rightarrow 0} \frac{1}{h \sin h}$

$=1-\cos 0 \cdot \frac{1}{0 \sin 0}$

$=0$

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

For differentiability at $x=0$

$(L H D$ at $x=0)=\lim _{x \rightarrow 0^{-}} \frac{f(x)-f(0)}{x-0}$

$=\lim _{h \rightarrow 0} \frac{f(0-h)-f(0)}{0-h-0}$

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

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

$=\frac{1}{h} \lim _{h \rightarrow 0} \frac{1-\cos h}{h \sin h}-\lim _{h \rightarrow 0} \frac{1}{2}$

$=\frac{1}{2}-0=\frac{1}{2}$

$R H D$ at $x=0)=\lim _{x \rightarrow 0^{+}} \frac{f(x)-f(0)}{x-0}$

$=\lim _{h \rightarrow 0} \frac{f(0+h)-f(0)}{0-h-0}$

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

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

$=-\frac{1}{h} \lim _{h \rightarrow 0} \frac{1-\cos h}{h \sin h}-\lim _{h \rightarrow 0} \frac{1}{2}$

$=\frac{1}{2}-0=\frac{1}{2}$