$$ f(x) = \begin{cases}
x+5 & x\lt -2 \\
x^2+2x+3 & x \geq -2
\end{cases}
$$
Let \(f\) be the function defined above. Which of the following statements about \(f\) is true?
We can check for continuity at \(x=-2\) if the three hold true:
- The limit at \(x=-2\) exists.
- \(f(-2)\) exists.
- The limit at \(x=-2\) is equal to \(f(-2)\).
The piecewise function is defined by a line and parabola. We first check that the limit exists by comparing the left and right hand limits.
Left-hand Limit
$$ \lim\limits_{x\to -2^-}f(x) = x+5\Big|_{x=-2}$$
$$ = -2+5 $$
$$ = 3 $$
Right-hand Limit
$$ \lim\limits_{x\to -2^+}f(x) = x^2+2x+3\Big|_{x=-2}$$
$$ = (-2)^2+2(-2)+3 $$
$$ = 3 $$
Because \(\lim\limits_{x\to-2^-}f(x) = \lim\limits_{x\to-2^+}f(x)\),  \(\lim\limits_{x \to -2} = 3\).
\(f(-2)\) can be found and is defined on the parabola.
$$ f(-2)=(-2)^2+2(-2)+3 $$
$$ f(-2)=3 $$
The limit and \(f(-2)\) are equal, which means that \(f\) is continuous at \(x=-2\).
To check for differentiability, we use the same process but must find the derivative of \(f\) first.
$$ f(x) = \begin{cases}
x+5 & x\lt -2 \\
x^2+2x+3 & x \geq -2
\end{cases}
$$
$$ f'(x)=\begin{cases}
1 & x\lt -2 \\
2x+2 & x \geq -2 \end{cases}
$$
Left-hand Limit
$$ \lim\limits_{x\to -2^-}f'(x) = 1\Big|_{x=-2}$$
$$ = 1 $$
 
Right-hand Limit
$$ \lim\limits_{x\to -2^+}f'(x) = 2x+2\Big|_{x=-2}$$
$$ = 2(-2)+2 $$
$$ = -2 $$
Because the left and right hand limits of the derivative do not equal each other, \(f\) is not differentiable at \(x=-2\).