# Homework Help: Dealing with absolute value functions

1. Jan 29, 2009

### sunfleck

In order to get an integral I need to find the difference between two functions, but I'm not sure how to deal with the absolute value....

$$f(x) = \left|x-1-1\right|$$
$$g(x) = x^2 + 2x$$

$$g(x) - f(x) = (\left|x-1\right|-1) - (x^2 + 2x)$$
=....
I don't know if I can simplify it anymore... can I take that |x| out so - 2x + |x| = - x? If so what happens to the |-1| I feel like I probably can't simplify any further, but I'd like to know for sure

2. Jan 29, 2009

### TheBaker

The easiest way I find to solve problems like this is to solve the problem twice - once where the contents of the modulus are positive anyway, and once when they're negative (in which case you need to put an extra minus sign in front of them).