# Piecewise function of the following function given

## Homework Statement

Question: Rewrite the function f(x) =||x|-1| as a piecewise function.

## 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).

Related Precalculus Mathematics Homework Help News on Phys.org
Mark44
Mentor

## Homework Statement

Question: Rewrite the function f(x) =||x|-1| as a piecewise function.

## 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
This one won't do you much good, as it isn't at all like your function. A better choice is y = |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).
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|.