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
x→−2−limf(x)=x+5∣∣x=−2
=−2+5
=3
Right-hand Limit
x→−2+limf(x)=x2+2x+3∣∣x=−2
=(−2)2+2(−2)+3
=3
Because x→−2−limf(x)=x→−2+limf(x), x→−2lim=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)={x+5x2+2x+3x<−2x≥−2
f′(x)={12x+2x<−2x≥−2
Left-hand Limit
x→−2−limf′(x)=1∣∣x=−2
=1
Right-hand Limit
x→−2+limf′(x)=2x+2∣∣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.