Question:
If $f(x)=\left\{\begin{aligned} \frac{1-\cos x}{x^{2}}, & x \neq 0 \\ k &, x=0 \end{aligned}\right.$ is continuous at $x=0$, find $k$.
Solution:
Given: $f(x)=\left\{\begin{array}{l}\frac{1-\cos x}{x^{2}}, 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}\left(\frac{1-\cos x}{x^{2}}\right)=k$
$\Rightarrow \lim _{x \rightarrow 0}\left(\frac{2\left[\sin \left(\frac{x}{2}\right)\right]^{2}}{4\left(\frac{x}{2}\right)^{2}}\right)=k$
$\Rightarrow \frac{1}{2} \lim _{x \rightarrow 0}\left(\frac{\left[\sin \left(\frac{x}{2}\right)\right]^{2}}{\left(\frac{x}{2}\right)^{2}}\right)=k$
$\Rightarrow 1 \times \frac{1}{2}=k$
$\Rightarrow k=\frac{1}{2}$