# How do you write y = |9 - x| +7 into piecewise functions?

Jul 11, 2016

$y = 16 - x , \mathmr{if} 9 \ge x ,$ and, $y = x - 2 , x > 9.$

#### Explanation:

Recall that $\forall t \in \mathbb{R} , | t | = t . \mathmr{if} t \ge 0 , \mathmr{and} , | t | = - t , \mathmr{if} t < 0.$

Accordingly, $\left(i\right) | 9 - x | = 9 - x , \mathmr{if} \left(9 - x\right) \ge 0 , i . e . , 9 \ge x ,$ and,
$\left(i i\right) | 9 - x | = - \left(9 - x\right) , \mathmr{if} \left(9 - x\right) < 0. \mathmr{and} , x > 9.$

Therefore, in $\left(i\right) , y = | 9 - x | + 7 = 9 - x + 7 = 16 - x , \mathmr{if} , 9 \ge x$, whereas,
in $\left(i i\right) , y = - \left(9 - x\right) = 7 = - 9 + x + 7 = x - 2 , \mathmr{if} , x > 9.$

Altogether, $y = 16 - x , \mathmr{if} 9 \ge x ,$ and, $y = x - 2 , x > 9.$