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 |
0 $\pi$ $\frac{2}{\pi}$ $-\frac{2}{\pi}$ |
$-\frac{2}{\pi}$ |
The correct answer is Option (4) → $-\frac{2}{\pi}$ |