# How do you write p(x) = |x-1| +4 as a piecewise function?

Sep 7, 2017

$p \left(x\right) = - x + 5 : x \in \left(- \infty , 1\right)$
$p \left(x\right) = + x + 3 : x \in \left[1 , + \infty\right)$

#### Explanation:

$p \left(x\right) = \left\mid x - 1 \right\mid + 4$

$p \left(x\right) = - \left(x - 1\right) + 4 = - x + 5$
where $x - 1 < 0 \to x \in \left(- \infty , + 1\right)$

$p \left(x\right) = + \left(x - 1\right) + 4 = + x + 3$
where $x - 1 \ge 0 \to x \in \left[1 , + \infty\right)$

This can be more easily visualised from the graph pf $p \left(x\right)$ below.

graph{abs(x-1)+4 [-9.96, 10.04, -0.64, 9.36]}