Solve this
Question:

If $f(x)=\left\{\begin{array}{rr}\frac{\cos ^{2} x-\sin ^{2} x-1}{\sqrt{x^{2}+1}-1}, & x \neq 0 \\ k & , x=0\end{array}\right.$ is continuous at $x=0$, find $k$.

Solution:

Given:

$f(x)=\left\{\begin{array}{l}\frac{\cos ^{2} x-\sin ^{2} x-1}{\sqrt{x^{2}+1}-1}, x \neq 0 \\ k, x=0\end{array}\right.$

If f(x) is continuous at x = 0, then

$\lim _{x \rightarrow 0} f(x)=f(0)$

$\Rightarrow \lim _{x \rightarrow 0} \frac{\cos ^{2} x-\sin ^{2} x-1}{\sqrt{x^{2}+1}-1}=k$

$\Rightarrow \lim _{x \rightarrow 0} \frac{1-\sin ^{2} x-\sin ^{2} x-1}{\sqrt{x^{2}+1}-1}=k$

$\Rightarrow \lim _{x \rightarrow 0} \frac{-2 \sin ^{2} x}{\sqrt{x^{2}+1}-1}=k$

$\Rightarrow \lim _{x \rightarrow 0} \frac{-2\left(\sin ^{2} x\right)\left(\sqrt{x^{2}+1}+1\right)}{\left(\sqrt{x^{2}+1}-1\right)\left(\sqrt{x^{2}+1}+1\right)}=k$

$\Rightarrow \lim _{x \rightarrow 0} \frac{-2\left(\sin ^{2} x\right)\left(\sqrt{x^{2}+1}+1\right)}{x^{2}}=k$

$\Rightarrow-2 \lim _{x \rightarrow 0} \frac{\left(\sin ^{2} x\right)\left(\sqrt{x^{2}+1}+1\right)}{x^{2}}=k$

$\Rightarrow-2 \lim _{x \rightarrow 0}\left(\frac{\sin x}{x}\right)^{2} \lim _{x \rightarrow 0}\left(\sqrt{x^{2}+1}+1\right)=k$

$\Rightarrow-2 \times 1 \times(1+1)=k$

$\Rightarrow k=-4$