Given : f(x)={kx+1,if x≤πcos x,if x>π
If f(x) is continuous at x=π then
limx→π−f(x)=limx→π+f(x)=f(π)
L.H.L.
=limx→π−kx+1
=limh→0k(π−h)+1
Putting h=0 then we get, k(π−0)+1=kπ+1
R.H.L.
=limx→π+cos x
=limh→0cos(π+h)
=limh→0−cos h
Putting h=0 then we get, −cos 0=−1
Finding f(x) at x=π
f(x)=kx+1 at x=π
f(π)=πk+1
Solve for k
Since limx→π−f(x)=limx→π+f(x)=f(π)
∴kπ+=−1
⇒kπ=−1−1
⇒kπ=−2
⇒k=−2π