# Homework Help: Piecewise function of the following function given

1. Feb 21, 2010

### francis21

1. The problem statement, all variables and given/known data
Question: Rewrite the function f(x) =||x|-1| as a piecewise function.

2. Relevant equations

3. The attempt at a solution
I tried considering the following absolute value functions:

1)|x|
|x| = x, if x $$\geq$$ 0
= -x, if x < 0

2) |x-1|
|x-1| = x-1, if x $$\geq$$ 1
=-(x-1), if x < 1

But I'm not sure on how to go from there, or if I did something wrong with the process shown above. I was thinking that the there might be something wrong with part 2).

2. Feb 21, 2010

### Staff: Mentor

This one won't do you much good, as it isn't at all like your function. A better choice is y = |x| - 1
First, graph y = |x| - 1. The graph is similar to y = |x|, but with a downward translation.
Second, graph y = ||x| - 1|. This graph is identical to the graph of y = |x| - 1 on the points for which y >= 0. For the points at which y < 0, that part of the graph is reflected across the y-axis. Your final graph should have a W shape.

Write the equation of each piece of the W and specify the interval on which that equation is defined, then you'll have your piecewise definition of y = ||x| - 1|.