We have:
$$f(x)=\left\{\begin{matrix} -1, & -1 \leq x \leq 0 \\ 1, & 0<x \leq 1 \end{matrix}\right.$$
Why is the antiderivative equal to $F(x)=|x|-1$?
Do we have to find the integral of $f$ at both intervals? But... what limitsa of integration do we have to use??
EDIT: In my notes,there is the remark,that if:
$$f:[a,b] \to \mathbb{R} \text{ intergable }$$ $$F:[a,b] \to \mathbb{R}$$ $$F(x)=\int_a^x f$$ $$F'(x_0)=f(x_0), \text{ ONLY IF } x_0: \text{ point at which f is continuous }$$
As a counter-example,they give the function:
$f(x)=\left\{\begin{matrix} -1, & -1 \leq x \leq 0 \\ 1, & 0<x \leq 1 \end{matrix}\right.$ that is discontinuous at $0$,and then $F(x)=|x|-1$ is not differentiable at $0$.