Question:
If the function $f(x)=\left\{\begin{array}{cl}(\cos x)^{1 / x}, & x \neq 0 \\ k & , x=0\end{array}\right.$ is continuous at $x=0$, then the value of $k$ is
(a) 0
(b) 1
(c) $-1$
(d) $e$.
Solution:
(b)
Given: $f(x)=\left\{\begin{array}{l}(\cos x)^{\frac{1}{x}} \\ k, x=0\end{array}, x \neq 0\right.$
If $f(x)$ is continuous at $x=0$, then
$\lim _{x \rightarrow 0} f(x)=f(0)$
$\Rightarrow \lim _{x \rightarrow 0}(\cos x)^{\frac{1}{x}}=k$
If $\lim _{x \rightarrow a} f(x)=1$ and $\lim _{x \rightarrow a} g(x)=0$, then
$\lim (f(x))^{g(x)}=e^{\lim _{x \rightarrow a}(f(x)-1) \times g(x)}$
$\Rightarrow e^{\lim _{x \rightarrow 0} \frac{(\cos x-1)}{x}}=k$
$\Rightarrow e^{0}=k \quad\left[\because \lim _{x \rightarrow 0} \frac{(\cos x-1)}{x}=0\right]$
$\Rightarrow k=1$