Determine all points $a$ where piecewise function is continuous and differentiable

263 Views Asked by At

I need to check for which points $a \in \mathbb{R}$ the following function is $(1)$ continuous and $(2)$ differentiable at $x=a$.

$f(x) = \begin{cases} -2x + 1, & \text{for } x \lt -1 \\ x^2, & \text{for} -1 \le x \le 1 \\ x^3, & \text{for } x \gt 1 \end{cases}$

So for checking for which $a$ it is continuous, is it sufficient to check the three continuity-conditions for the values $x = -1, 1$? These seem to be the most interesting here.

For checking the differentiability, I did evaluate $\lim\limits_{h \to 0}{\frac{f(a+h)-f(a)}{h}}$ for all 3 parts of the function, and ended up with $-2$, $2a$ and $3a^2$ respectively for the first, second and third term. Are these the points a for which the function is differentiable?

I am familiar how to check for a normal function, but not so sure about this piecewise function.

Edit:

So checking $\lim\limits_{x \to -1^{-}}{-2x+1} = 3$ and $\lim\limits_{x \to -1^{+}}{x^2} = 1$ shows that the function is not continuous at $x=-1$. Doing the same for $1^+$ and $1^{-}$ yields both 1, so it is continuous at $x=1$. Since the individual sub-functions are continuous on their respective intervals, it can be concluded that it is everywhere continuous except at $x=-1$.