Integral of $\frac{|x|}{x}$ Description
In Example 8.6 on my textbook(http://www.math.louisville.edu/~lee/RealAnalysis/), it goes like
Let
$$
f(x) =
\begin{cases}
\frac{|x|}{x}, & x \neq 0\\
0, & x = 0
\end{cases}
$$
And the author just shows that $F(x) = \int^{x}_{-1} f(x) dx = |x| - 1$ without any derivation.
Question
The point where I'm getting stuck at is that I think $F(x) = \int^{x}_{-1} f(x) dx = x - 1$. Because;
$$
\int^{x}_{-1} f(x) dx = \int^x_0 \frac{|x|}{x} dx + \int^0_{-1} \frac{|x|}{x} dx = \int^x_0 1 dx + \int^0_{-1} (-1) dx = \int^x_0 1 dx - \int^0_{-1} 1 dx = x - 1
$$
So, why the textbook uses the absolute value for the first term??

If $x\le 0$, then
$$\int_{-1}^xf=\int_{-1}^x(-1)dt=$$
$$\Bigl[-t\Bigr]_{-1}^x=-x-1=-1+|x|$$
If $x\ge 0$, then
$$\int_{-1}^xf=\int_{-1}^0(-1)dt+\int_0^x(1)dt$$
$$=\Bigl[-t\Bigr]_{-1}^0+\Bigl[t\Bigr]_0^x=-1+x=-1+|x|$$
in all cases, it gives $$|x|-1$$
