Piecewise function and differentiation quotient We have function $y = f(x) = |2x + 1|$
Can we simply say that $|2x + 1|' = 2$?
No because if we use the chain rule then we get $\left(\left|2x+1\right|\right)'\:=\frac{2\left(2x+1\right)}{\left|2x+1\right|}$
Redefine the same function piecewise without using the absolute value.
$$\left|2x+1\right|=
\begin{cases} 
      2x+1 & x \geq -\frac12 \\
      -2x-1 & x \leq -\frac12 
   \end{cases}$$
Calculate the differential quotient for each of the
corresponding regions. 
$f(x)=2x+1$
Differential quotient
$$f'(x_0) = \lim_{x→x_0}
\frac{f(x) − f(x_0)}{x − x_0}.$$
$f'(x_0) = \lim_{x→x_0}
\frac{2x+1 − 2x_0-1}{x − x_0}=2$
$f(x)=-2x-1$
$f'(x_0) = \lim_{x→x_0}
\frac{-2x-1 + 2x_0+1}{x − x_0}=-2$
What happens at $x = −\frac12$?

This is where I am confused. There is no x so that would mean that my
  answer is wrong isn't it?


For $x_0> -1/2$ we have $f'(x_0)=2$ and For $x_0< -1/2$ we have $f'(x_0)=-2$.
Furthermore: $f$ is not differentiable at $x_0= -1/2$, since $\lim_{x→x_0+0}
\frac{f(x) − f(x_0)}{x − x_0} \ne \lim_{x→x_0-0}
\frac{f(x) − f(x_0)}{x − x_0}$.
