# How do you graph f(x)=abs((x)-1)-(x)?

Feb 27, 2017

See explanation

#### Explanation:

$\textcolor{red}{\text{Identify the critical points and analyse the behaviour at the point and either side}}$

$\textcolor{b l u e}{\text{Consider the case where } x < 0}$

Then $| x - 1 |$ is the same as positive $x + 1$
now subtract the $- \left(x\right)$ remembering that $x$ is negative.
The net result is $y = p o s i t i v e \left(2 x\right) + 1$
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$\textcolor{b l u e}{\text{I will let you figure out } 0 < x < 1}$
The graph shows what you should end up with.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

$\textcolor{b l u e}{\text{Consider the case where } x = 1}$

$| x - 1 | = 0 \text{ so } | x - 1 | - 1 = - 1$
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$\textcolor{b l u e}{\text{Consider the case where } x > 1}$

$| x - 1 | \text{ is the same as } x - 1$

Put it all together

$| x - 1 | - x \text{ "->" } x - 1 - x = 1$
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~