Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: A weird absolute value problem

  1. Aug 5, 2007 #1
    Please help me out here with this problem:

    37. Express the function f(x)=l x l + l x-2 l

    without using absolute value signs.

    Okay, I've took a sneak peak at the answer key and it is given in kinda of like piece-wise notation where they have 3 equations and different intervals of x for them.

    Are you suppose to just take off the signs? [tex] f(x)= 2x-2[/tex] but know I know there is a catch... Does the range still apply or something?
  2. jcsd
  3. Aug 5, 2007 #2


    User Avatar
    Science Advisor

    Yes, you take of the signs carefully!

    A pretty standard way to handle absolute values is to use "cases": |x|= x if [itex]x\ge 0[[/itex], [itex]|x|= -x is [itex]x< 0[/itex].

    Here you have both |x| which "breaks" at x= 0 and |x-2| which "breaks" when x-2= 0 or x= 2.

    Look at the three cases: [itex]x< 0[/itex], [itex]0\le x< 2[/itex], and [itex]x\ge 2[/itex].

    If x< 0, then both x and x-2 are negative so |x|= -x and |x-2|= -(x-2)= 2- x. In that case, |x|+ |x-2|= -x+ 2- x= 2- 2x.
    If [itex]0\le x< 2[/itex] then x is non-negative but x- 2 is still negative so |x|= x and |x-2|= -(x-2)= 2- x. In that case, |x|+ |x-2|= x+ 2-x= 2.
    Finally, if [itex]2\le x[/itex], both x and x- 2 are positive so |x|= x and |x-2|= x-2. In that case, |x|+ |x-2|= x+ x-2= 2x- 2.
  4. Aug 5, 2007 #3
    Okay, so how do you know they have three cases? Should you graph the function first to find out how it looks and then divide them up into intervals or is there a faster and easier way to do it without the graphing calculator?
  5. Aug 5, 2007 #4
    I would just make a plot of this function on a piece of paper (it is faster than on a graphing calculator). Then its 3-component structure becomes obvious.

  6. Aug 5, 2007 #5
    No you dont need graph the function
    You only need to understand the definition of |x|

    |x|= x if x>0, |x|=-x if x<0 (and |x|=0 if x=0 naturally)
    Do the same for |x-2|
    |x-2|=x-2 if x-2>0 etc. as explained you above.

    How the things (inside absolute value )go out depends on its sign (e.g.
    |-5|=-(-5) =5 |1|=1 )
    So you only have to find when the expressions inside absolute value become positive /negative depending on x

    Lastly if you read HallSoftIvy's post again carefully you will understand it
  7. Aug 5, 2007 #6
    I know how HallsofIvy found the bototm part but I just don't understand how she found the intervals. Do you need to graph it first to find it?

    I know the graph of l x l and l x-2 l

    However, how come their fulls graphs don't show up? Do you just take their x-intercepts (lowest y value) to obtain the intervals and solve for f(x) in those intervals?
    Last edited: Aug 5, 2007
  8. Aug 6, 2007 #7


    User Avatar
    Homework Helper

    Oh no. HallsofIvy is, atually, a he, not a she. o:)

    Well, say, to break the absolute value of |A|, one must check if it's negative, or non-negative. So, to break the absolute value of |x| + |x - 2|, you should check whether they are negative or nonnegative.

    x is negative for x < 0, and non-negative for the rest.
    x - 2 is negative for x < 2, and non-negative for the rest.

    So, for x < 0, both x, and x - 2 are negative.
    0 <= x < 2, then x is non-negative, but x - 2 is negative.
    And for x >= 2, they are both positive.

    From the 3 intervals above, you can easily break the absolute value. Pretty simple, right? :)
  9. Aug 6, 2007 #8


    User Avatar
    Science Advisor

    I said in my original post- there are two absolute values: |x| and |x-2|. |x| itself changes "formulas" when x= 0. |f(x)|, for any function f, changes when f(x)= 0. Therefore, |x| changes when x= 0, |x-2| changes when x- 2= 0 or x= 2. Those two values divide the number line into 3 parts: x< 0, 0< x< 2, and x> 2.
  10. Aug 8, 2007 #9
    I still don't know what you are talking about. Negatives and non-negatives, that is. Why is it important that x is negative/non negative? Isn't the absolute value of x always positive? How do you know the graph will "break" when x=0 or x=2? How do you not know that they will keep going like the shape of a "V"?

    For example, the graph f(x)=l x l has the shape of a V but it doesn't "break" when x=0... I just don't know how you guys can find where the graph changes without graphing or substituting points.

    What do you mean by changes "formulas"? Are you saying that if x=0 then the function becomes: f(x)= l x-2 l? and when x=2 then the function becomes: f(x)=l x l? Then there will be 2 "breaks" and therefore 3 parts.. Is this what you guys are all trying to tell me??
  11. Aug 8, 2007 #10


    User Avatar
    Science Advisor

    If you are trying to do problems involving absolute values, you should know exactly what |x| means! What does YOUR textbook say is the definition of |x|?
  12. Aug 8, 2007 #11
    Here's what my text says:

    The absolute value of x (written) as l x l ) is defined as follows:

    if x=>, then l x l = x;

    if x<0, then l x l= -x ( note that -x is a positive number)

    l x l=> 0 for all values of x
  13. Aug 8, 2007 #12


    User Avatar
    Homework Helper

    ilovephysics, y = |x| does break at x=0. What do we mean when we say break... we mean that the equation of the line has changed...

    A line has an equation of the form y = mx + b... so if we write y=|x| in this form:

    when x < 0, y = -x

    when x > 0, y = x

    So as we go along the x axis from the negative end to the positive end... we have a straight line going downwards (a negative slope)... but at x = 0 it changed to positive slope... so that's a break. it's a different equation...

    The breaks can only occur when the value within the absolute values changes sign or in other words when that value is 0... because that's how the absolute value is defined...

    First find the points when the value inside an absolute value changes sign...

    For your example you have two absolute value signs |x| and |x-2|... for |x|, x changes sign when x = 0... |x-2|, x-2 changes sign when x-2 = 0 ie when x =2

    So those are the only 2 points when a break can happen...

    Then you can analyze what happens at x<=0, then 0<x<=2, then x>2... within each range your equation can be written as a line in the form of y=mx+b. Use the definition of absolute value to write the equation for these 3parts...
    Last edited: Aug 8, 2007
  14. Aug 8, 2007 #13
    Oh ok. I think I get it now, thanks! :smile:
  15. Aug 9, 2007 #14
    I think I finally get what they mean by " express the function without using absolute value signs." Do they mean that you need to take the absolute value sign off and instead did what you did above?

    So like for l x l, if x is negative then l x l must equal -x without the absolute value signs because then -x would equal -(-x), which is a positve number. So whenever you are trying to solve these problems one should always follow that format? It is either everything instead the absolute value remains positive (unaffected) or negative (so that if the expression inside is negative it will turn positve)? Thanks! :smile:

    Edit: Also, did you choose those parts because you wanted to make some negative and some positve? For example, did you want to make l x l both negative and positve and l x-2 l both negative and positive as well? I'm just not sure how you can up with the [tex]\geq, >, \;and\;<[/tex] signs.
    Last edited: Aug 9, 2007
  16. Aug 9, 2007 #15


    User Avatar
    Science Advisor

    f(x)= |x|, itself, is "expressed without absolute value signs" exactly as you give the definition: |x|= x if [itex]x\ge 0[/itex], -x is x< 0. It changes formula, as you put it when the quantity inside the abwsolut value signs is equal to 1.; Your problem involved |x|+ |x-2| so I immediately asked myself "where do those change formula?". That would be at x= 0 and x= 2. Everything else follows from that.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook