# How do you graph y = - abs(x-3) + 5?

Jul 6, 2015

graph{-abs(x-3)+5 [-7.27, 10.93, -2.696, 6.404]}

$y = x + 2 , \mathmr{if} x \le 3$
$y = - x + 8 , \mathmr{if} x > 3$

#### Explanation:

Recall : The "absolute value" function is defined as :

$\left\mid x \right\mid = x , \mathmr{if} x \ge 0$
$\left\mid x \right\mid = - x , \mathmr{if} x < 0$

Graph of $\left\mid x \right\mid$ :
graph{abs(x) [-, 10, -5, 5]}

Here, we have $\left\mid x - 3 \right\mid$. Using the definition of $\left\mid x \right\mid$ we can write :

$\left\mid x - 3 \right\mid = x - 3 , \mathmr{if} x \ge 3$
$\left\mid x - 3 \right\mid = - \left(x - 3\right) = - x + 3 , \mathmr{if} x < 3$

Your function doesn't contain $\left\mid x - 3 \right\mid$ but $- \left\mid x - 3 \right\mid$, we have to adapt what I wrote in the last paragraph.

$\textcolor{red}{-} \left\mid x - 3 \right\mid = - x + 3 , \mathmr{if} x \ge 3$
$\textcolor{red}{-} \left\mid x - 3 \right\mid = x - 3 , \mathmr{if} x < 3$

Graph of $- \left\mid x - 3 \right\mid$ :
graph{-abs(x-3) [-10, 10, -5, 5]}

Now we have to add 5 to $- \left\mid x - 3 \right\mid$ without regard of the value of $x$

Then :

$- \left\mid x - 3 \right\mid + 5 = - x + 3 + 5 = - x + 8 , \mathmr{if} x \ge 3$
$- \left\mid x - 3 \right\mid = x - 3 + 5 = x + 2 , \mathmr{if} x < 3$


Note : I don't know how to use multi-line equations with socratic, then sorry for heavy notations.