# Find the value of k so that the function f, defined by $f(x) = \left\{ \begin{array}{l l}kx+1, & \quad if { x \leq \pi } \\ \cos x, & \quad if { x > \pi } \end{array} \right.$ is continuous at $$x=\pi.$$

Toolbox:
• If $f$ is a real function on a subset of the real numbers and $c$ be a point in the domain of $f$, then $f$ is continuous at $c$ if $\lim\limits_{\large x\to c} f(x) = f(c)$.
Step 1:
$f(x) = \left\{ \begin{array}{l l}kx+1, & \quad if { x \leq \pi } \\ \cos x, & \quad if { x > \pi } \end{array} \right.$ is continuous at $$x=\pi.$$
The function is said to be continuous at $\pi$
The LHL is $\lim\limits_{x\to \pi^-}f(x)=\lim\limits_{x\to \pi^-}kx+1$
$\Rightarrow k\pi+1$
Step 2:
The RHL is
$\lim\limits_{x\to \pi^+}f(x)=\lim\limits_{x\to \pi^+}\cos x$
$\Rightarrow -1$
$\therefore k\pi+1=-1$
$\Rightarrow k\pi=-2$
$k=\large\frac{-2}{\pi}$