Find the value of constant k so that the function
$f\left(x\right)= \begin{cases}
\dfrac{k \cos x}{\pi - 2x}, & \text{if } x \neq \dfrac{\pi}{2} \\\\
3, & \text{if } x = \dfrac{\pi}{2}
\end{cases}$
is continuous at $x=\dfrac{\pi}{2}$
$\lim\limits_{x \to \frac{\pi}{2}} f\left(x\right)=\lim\limits_{x \to \frac{\pi}{2}} \; \dfrac{k \cos x}{\pi - 2x}$
Let $x=\dfrac{\pi}{2}+p$
As $x \to \dfrac{\pi}{2}, \; p \to 0$
$\begin{aligned}
\therefore \; \lim\limits_{x \to \frac{\pi}{2}} f\left(x\right) & = \lim\limits_{p \to 0} \; \dfrac{k \cos \left(\dfrac{\pi}{2}+p\right)}{\pi -2 \left(\dfrac{\pi}{2}+p\right)} \\
& = \lim\limits_{p \to 0} \; \dfrac{-k \sin p}{-2p} \;\; \left[\text{Note: }\cos \left(\dfrac{\pi}{2}+\theta\right)=-\sin \theta\right] \\
& = \dfrac{k}{2} \; \lim\limits_{p \to 0} \; \dfrac{\sin p}{p} \\
& = \dfrac{k}{2} \times 1 = \dfrac{k}{2} \;\; \cdots (1)
\end{aligned}$
$f\left(\dfrac{\pi}{2}\right)=3$ $\;\;$ $\cdots$ (2)
Since $f\left(x\right)$ is continuous at $x=\dfrac{\pi}{2}$, $\;$ $\lim\limits_{x \to \frac{\pi}{2}}f\left(x\right)=f\left(\dfrac{\pi}{2}\right)$
i.e. $\dfrac{k}{2}=3$ [from equations (1) and (2)]
$\implies$ $k=6$