# How do you solve y=|x| and y=x+2 using substitution?

Jul 11, 2017

$\left(- 1 , 1\right)$

#### Explanation:

Use the substitution $y = \left\mid x \right\mid$

$y = x + 2$

$\left\mid x \right\mid = x + 2$

Now subtract $x$ from both sides.

$\left\mid x \right\mid - x = 2$

Hmm... how do we simplify this? Well, we have three cases:

1. $\text{ } x$ is positive
2. $\text{ } x$ is zero
3. $\text{ } x$ is negative

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If $x$ is positive, then $\left\mid x \right\mid = x$, so we can use this substitution:

$\left\mid x \right\mid - x = 2 , \text{ } x > 0$
$x - x = 2 , \text{ } \textcolor{w h i t e}{.} x > 0$
$0 = 2 , \text{ "" "" } x > 0$

And since $0$ is never equal to $2$, this means we have no positive solutions.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Next, let's try case 2, when $x = 0$.

$| 0 | - 0 = 2$

$0 = 2$

Again, $0$ cannot equal $2$, so our solution cannot be $x = 0$.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Finally, when $x$ is negative, $\left\mid x \right\mid$ is the same as $- x$, since to make a negative number positive, you add another negative sign. (Two negatives make a positive!) So, we can use the substitution $\left\mid x \right\mid = - x$:

$\left\mid x \right\mid - x = 2 , \text{ } x < 0$
$- x - x = 2 , \text{ } x < 0$
$- 2 x = 2 , \text{ "" } x < 0$

Now we can divide both sides by $- 2$ to find $x$:

$\frac{- 2 x}{- 2} = \frac{2}{- 2} , \text{ } x < 0$

$x = - 1$

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

So this is the $x$ coordinate for our solution. To find the $y$ coordinate, we simply plug $x = - 1$ back into one of the original equations and solve for $y$.

$y = \left\mid x \right\mid$
y = abs(-1
$y = 1$

So $x = - 1$ and $y = 1$. Therefore, our solution is $\left(- 1 , 1\right)$.