Left-hand limit as x approaches π:
\lim_{x \to \pi^-} f(x) = \lim_{x \to \pi^-}(kx + 1) = k\pi + 1$ <hr> Right-hand limit as $x$ approaches $\pi$:\lim_{x \to \pi^+} f(x) = \lim_{x \to \pi^+} \cos x = \cos \pi = -1$
For continuity at x=π, these limits must be equal:
kπ+1=−1
kπ=−2
$k=π−2
Verification: When x=π
Left side: f(π)=kπ+1=π−2⋅π+1=−2+1=−1
Right side: cos(π)=−1
Since both sides equal −1, the value of k is π−2.