Dealing with absolute value functions

AI Thread Summary
To find the integral of the difference between the functions f(x) = |x-2| and g(x) = x^2 + 2x, it's essential to address the absolute value in f(x). The discussion suggests simplifying g(x) - f(x) but raises concerns about handling the absolute value correctly. A recommended approach is to evaluate the problem in two scenarios: when the expression inside the absolute value is positive and when it is negative, applying a negative sign as needed. This method ensures a comprehensive understanding of the function's behavior across different intervals. Properly managing the absolute value is crucial for accurate integration.
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...


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
 
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).
 
Back
Top