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: Modulus clarification

  1. Jan 31, 2006 #1

    I've been reading through some notes and I can't see where a step comes from.

    I understand that

    [tex] |x| = \left\{\begin{array}{cc} x,& \mbox{ if } x\geq 0\\-x, & \mbox{ if } x \leq0 \end{array}\right[/tex]

    The equation I'm stuck on reads as

    [tex] f(x) = 1 - | 1- x | \mbox{on} [-2,2] [/tex]

    [tex] = \left\{\begin{array}{cc} 2-x,& \mbox{ if } x\geq 1\\x, & \mbox{ if } x \leq 1 \end{array}\right [/tex]

    Can someone explain this step?
    Last edited: Jan 31, 2006
  2. jcsd
  3. Jan 31, 2006 #2


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    Dearly Missed

    Well, when 1-x>=0, then |1-x|=1-x
    Thus, when x<=1, we have f(x)=1-|1-x|=1-(1-x)=x
  4. Jan 31, 2006 #3


    User Avatar
    Science Advisor

    The crucial point about an absolute value (modulus) is to determine when the quantity inside the modulus changes from negative to positive and vice-versa: and that occurs, of course, where it is equal to 0.

    Since the quantity inside the absolute value is 1- x, that will be 0 when
    1- x= 0 or when x= 1. That means we can write this as two separate functions for x< 1 and x> 1.

    If x< 1, 1- x is positive and |1- x|= 1- x.
    If x< 1, 1- |1- x|= 1- (1- x)= x.

    If x> 1, 1- x is negative and |1- x|= -(1- x)= x- 1. If x> 1, 1- |1- x|=
    1-(-(1-x))= 1+ 1- x= 2- x.

    If x= 1, of course 1-x= 0 so 1- |1-x|= 1. which is correct for either of the formulas so it doesn't matter where you put the "equals".
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook