# Question #e2f59

Feb 18, 2015

The graph is this:

graph{|x+2|-|x+1| [-10, 10, -5, 5]}

But why?

We have to "open" all the absolute values, so we have to write for which values of x the two arguments are positive or zero.

The first:

$x + 2 \ge 0 \Rightarrow x \ge - 2$.

The second:

$x + 1 \ge 0 \Rightarrow x \ge - 1$.

So we have three intervals:

$x \le - 2$
$- 2 < x \le - 1$
$x > - 1$

So:

In the first interval both arguments are negative or zero and the function becomes:

$y = - x - 2 + x + 1 \Rightarrow y = - 1$ an horizontal half-line.

In the second interval, the first is positive and the second is negative or zero and the function becomes:

$y = x + 2 + x + 1 \Rightarrow y = 2 x + 3$ a segment.

In the third both arguments are positive or zero and the function becomes:

$y = x + 2 - x - 1 \Rightarrow y = 1$ another horizontal half-line.