# Absolute function into piecewise function

Tags:
1. Mar 29, 2016

### Astraithious

1. The problem statement, all variables and given/known data
Write F(x)= x2-5|x| as a piecewise function

2. Relevant equations

3. The attempt at a solution
I was writting it out and came to
Fx= x2-5(x) and x2-5(-x)

but my book says that it comes out to be
x2-5
x2-5(-x)

I imagine there is a very simple reason why the x in the first one disappears but i would love an explanation, thank you!

2. Mar 29, 2016

### Samy_A

Looks like a typo in the book.

For positive x, you indeed get F(x)=x²-5x, and for negative x you get F(x)=x²+5x.

3. Mar 29, 2016

### Math_QED

You can verify that the book is wrong by filling in x values

4. Mar 29, 2016

### epenguin

Your answers appear to be identical with the book's so I don't know what your problem is. It would then be usual to write it in the form that Samy did, and also when setting out piecewise functions you have to indicate the range either side of the form.

5. Mar 30, 2016

### haruspex

No, the book has x2-5 instead of x2-5x.

6. Mar 30, 2016

### Astraithious

thank you everybody this was a great relief

7. Mar 30, 2016

### epenguin

Knowing the answer that's what I read when I see something else!