Dealing with absolute value functions

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 3K views
sunfleck
Messages
6
Reaction score
0
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...


[tex]f(x) = \left|x-1-1\right|[/tex]
[tex]g(x) = x^2 + 2x[/tex]

[tex]g(x) - f(x) = (\left|x-1\right|-1) - (x^2 + 2x)[/tex]
=...
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
 
Physics news on Phys.org
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).