1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Absolute values

  1. Sep 4, 2008 #1
    How could I go about expressing |x|-|x-6| without using absolute value signs?
     
  2. jcsd
  3. Sep 4, 2008 #2
    I would just look at when the expression inside each absolute value is negative or positive. For instance, if x is negative, then you easily get x - (x+6) = -6 so if x is any negative value, you'll get the constant function f(x) = -6.

    You'll ultimately express it as a piecewise function but there shouldn't be many "pieces".
     
  4. Sep 5, 2008 #3

    CRGreathouse

    User Avatar
    Science Advisor
    Homework Helper

    Here are two thoughts, entirely unsimplified (so you have something to do!).

    1. |x| - |x - 6| =
    (x) - (x - 6), x >= 0 and x - 6 >= 0
    (x) - -(x - 6), x >= 0 and x - 6 < 0
    -(x) - (x - 6), x < 0 and x - 6 >= 0
    -(x) - -(x - 6), x < 0 and x - 6 < 0

    2. sqrt(x^2) - sqrt((x - 6)^2)

    Note that both assume that x is real.
     
  5. Sep 5, 2008 #4

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    If x< 0, both x and x-6 are negative so |x|- |x-6|= -x-(-(x-6)= -x+ x- 6= -6.

    If [itex]0\le x< 6[/itex], x- 6 is negative so |x|- |x-6|= x- (-(x-6))= x+x- 6= 2x- 6
    If [itex]6\le x[/itex], both x and x- 6 are positive so |x|- |x-6|= x- (x-6)= 6.

    We can write
    [tex]|x|-|x-6|= \left\{\begin{array}{cc}-6 & if x< 0\\2x-6 & if 0\le x< 6\\6 & if x>6\end{array}\right[/tex]

    We could also use the Heaviside step function. H(x), which is 0 for x< 0 and 1 for [itex]x\ge 0[/itex]. We want to start with -6 for x<0 and for x> 0 we have to add 2x: -6+ 2xH(x).
    Now, if x is greater than 6, we need to change that -6 to 6 and eleminate the 2x. We can do that by adding 12- 2x.

    |x|- |x-6|= -6+ 2xH(x)+ (12- 2x)H(x- 6).
     
  6. Sep 5, 2008 #5
    Thanks to all who responded, your help is appreciated!
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Absolute values
  1. Absolute value (Replies: 3)

  2. Absolute value (Replies: 3)

  3. Absolute value (Replies: 1)

Loading...