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

Jun 23, 2016

Piecewise, f(x)=x, x in (-oo, 1] and f(x)=2-x, x in [1, oo).

#### Explanation:

#|x-1|=1-x, x in (-oo, 1] and

$= x - 1 , x \in \left[1 , \infty\right)$.

So,

$f \left(x\right) = x - \left(1 - x\right) = x , x \in \left(- \infty , 1\right]$

$= 1 - \left(x - 1\right) = 2 - x , x \in \left[1 , \infty\right)$.

Note that f(x) is continuous everywhere.

The graph is collar (inverted V)-like, with vertex at (1, 1).