If f(x), defined by $f(x)=\left\{\begin{array}{ll}k x+1 & \text { if } \quad x \leq \pi \\ \cos x & \text { if } \quad x>\pi\end{array}\right.$ is continuous at $x=\pi$, then the value of k is
Answer & explanation
Correct answer: option 4
The correct answer is Option (4) → $-\frac{2}{\pi}$
$f(\pi)=k\pi+1$
$\lim\limits_{x→\pi^+}\cos x=-1$
so $k\pi+1=-1$
$k=-\frac{2}{\pi}$