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??
 A: 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$$
A: Consider the case $x<-1$. Then
$$F(x) = \int_{-1}^x f(x)dx = -\int_x^{-1} f(x)dx$$
Now let us reference the graph of $f(x)=|x|/x$:

Using the analogy of an integral as the signed area, we see that $\int_x^{-1} f(x)dx$ would be the area of a rectangle with width $-x-1$ ($-x$ is used since $-x>0$) and height $1$. We multiply this by $-1$ twice, thus negating the sign changes, since the area is below the $x$ axis, but also because of the $-$ is outside of the integral. 
Then $F(x) = -x-1$, or, equivalently, $F(x)=|x|-1$ (as $|x|=-x$ whenever $x<0$).

Okay, cool. And I imagine you understand the case $x>0$. What if $x \in (-1,0)$? Then
$$F(x) = \int_{-1}^x f(x)dx$$
with no swapping of bounds this time as $x > -1$. What would be the width of the rectangle we have this time? It would be $x+1$. (You might have to do some reckoning to determine this fact, but it works.) This is negative area, however, since it's below the $x$ axis, and thus
$$F(x) = -x-1$$
But again, $x < 0$ gives us $|x| = -x$ and so we equivalently have $F(x) = |x| - 1$.
