1. Not finding help here? Sign up for a free 30min 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 Value functions => Piecewise Function

  1. Mar 3, 2007 #1

    danago

    User Avatar
    Gold Member

    Given the function:

    [tex]
    f(x) = \left| {x + 1} \right| + \left| {x + 2} \right|
    [/tex]

    How can i write that as a piecewise function? If i was given something in the form of [tex]f(x) = \left| {g(x)} \right|[/tex], i know to write it as:

    [tex]
    f(x) = \left\{ {\begin{array}{*{20}c}
    {g(x),} & {g(x) \ge 0} \\
    { - g(x),} & {g(x) < 0} \\
    \end{array}} \right.

    [/tex]

    but im a little stuck with the other one.

    Thanks in advance,
    Dan.
     
  2. jcsd
  3. Mar 3, 2007 #2
    consider the cases, x+1<0, x+2<0 and other combinations separately:

    x+1<0, x+2<0
    x+1<0, x+2>0
    x+1>0, x+2<0
    x+1>0, x+2>0

    notice that some of these conditions are impossible.
     
  4. Mar 3, 2007 #3

    danago

    User Avatar
    Gold Member

    Hmm ok. So when both are positive [tex]x + 1,x + 2 \ge 0[/tex], the piece is [tex](x + 1) + (x + 2) = 2x + 3[/tex]. They are both positive only when [tex]x \ge - 1[/tex], so my piece ([tex]2x + 3[/tex]) would only be existant over the domain [tex]x \ge - 1[/tex]? Is that the way i should go about it?
     
  5. Mar 3, 2007 #4
    yes, that should be correct.
     
  6. Mar 3, 2007 #5

    danago

    User Avatar
    Gold Member

    Ok thanks for that :)
     
  7. Mar 4, 2007 #6

    danago

    User Avatar
    Gold Member

    Just one more thing. Using [tex]
    y = \left| x \right|[/tex] for example. At x=0, it could go either way. y could equal x or -x, so either of the following could be true:

    [tex]
    \begin{array}{l}
    f(x) = \left\{ {\begin{array}{*{20}c}
    {x,} & {x \ge 0} \\
    { - x,} & {x < 0} \\
    \end{array}} \right. \\
    f(x) = \left\{ {\begin{array}{*{20}c}
    {x,} & {x > 0} \\
    { - x,} & {x \le 0} \\
    \end{array}} \right. \\
    \end{array}
    [/tex]

    Does it matter which way i do it? Or is there some convention i should follow?
     
  8. Mar 4, 2007 #7

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    The convention is that |x|= x for [itex]x\ge 0[/itex] but, in fact, either that or |x|= -x for [itex] x\le 0[/itex] give the same function.
     
    Last edited: Mar 5, 2007
  9. Mar 4, 2007 #8

    danago

    User Avatar
    Gold Member

    Ok thanks.
     
  10. Sep 25, 2009 #9
    Another way to do it is to find your critical points, (x=-1 and x=-2 in this case) and create an x, f(x) table to test points outside of and between those points within the function. Then you can take the points in the three regions and find the equation of the line between them which is the equation that satisfies the x value of the region it was determined from. A calculator that can come up with a table of values for you really helps with this.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Absolute Value functions => Piecewise Function
Loading...