# How do you write g(x) = |2 + x| - 1 as piecewise functions?

Jan 5, 2018

Check below.

#### Explanation:

If $x + 2 > 0$ , $g \left(x\right) = x + 2 - 1 = x + 1$

If $x + 2 < 0$ , $g \left(x\right) = - x - 2 - 1 = - x - 3$

$g \left(x\right) = \left\{\begin{matrix}x + 1 \text{ & "x> -2 \\ -x-3" & } x \le - 2\end{matrix}\right.$

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

You can tell from the graph it's $y = x$ shifted 1 point upwards and $y = - x$ shifted 3 points downwards.