If $f(x)=\left\{\begin{array}{cl}x+k, & x<3 \\ 4, & x=3 \\ 3 x-5, & x>3\end{array}\right.$ is continuous at $x=3$, then $k=$___________
The function $f(x)=\left\{\begin{array}{cl}x+k, & x<3 \\ 4, & x=3 \\ 3 x-5, & x>3\end{array}\right.$ is continuous at $x=3$.
$\therefore f(3)=\lim _{x \rightarrow 3} f(x)$
$\Rightarrow f(3)=\lim _{x \rightarrow 3^{-}} f(x)=\lim _{x \rightarrow 3^{+}} f(x)$
$\Rightarrow f(3)=\lim _{x \rightarrow 3^{-}} f(x)=\lim _{x \rightarrow 3^{+}} f(x)$ ...(1)
Now,
$f(3)=4$ .....(2)
$\lim _{x \rightarrow 3^{-}} f(x)=\lim _{x \rightarrow 3}(x+k)=3+k$ ....(3)
$\lim _{x \rightarrow 3^{+}} f(x)=\lim _{x \rightarrow 3}(3 x-5)=3 \times 3-5=9-5=4$ .....(4)
From (1), (2), (3) and (4), we have
$4=3+k=4$
$\Rightarrow 3+k=4$
$\Rightarrow k=4-3=1$
Thus, the value of k is 1.
If $f(x)=\left\{\begin{array}{cl}x+k, & x<3 \\ 4, & x=3 \\ 3 x-5, & x>3\end{array}\right.$ is continuous at $x=3$, then $k=$