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: Piece-wise function problem

  1. May 19, 2010 #1
    1. The problem statement, all variables and given/known data

    Function f and g are defined as follows :

    f(R)=R , f(x)=x^2 , g(R)=R , g(x)=x+1,x>=0 , -x , x<0 (its a piecewise function) . Find fg(x) and gf(x) .

    2. Relevant equations



    3. The attempt at a solution

    fg(x)=
    (x+1)^2 , x>=0
    x^2 , x<0

    gf(x)=
    x^2+1 , x>=0
    -x^2 , x<0

    Am i correct ? What are the things i will need to look into when face questions like this ? Cheking the domain ?
     
  2. jcsd
  3. May 19, 2010 #2

    phyzguy

    User Avatar
    Science Advisor

    Re: function

    This looks correct to me.
     
  4. May 19, 2010 #3

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    Re: function

    If you mean f(g(x)) and g(f(x)) then what you have for f(g(x)) is correct, but the other is not.
     
  5. May 19, 2010 #4
    Re: function

    thanks but why ? How did you see that ?
     
  6. May 19, 2010 #5

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    Re: function

    Show your steps on how you derived g(f(x)).
     
  7. May 19, 2010 #6
    Re: function

    ok . Basically , i just substituted the function f(x) into the function g(x) , without doing any other checkings because i do not know what to check . Could you guide me on thsi ? Thanks .
     
  8. May 19, 2010 #7

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    Re: function

    Hint: Is f(x) ever negative?
     
  9. May 19, 2010 #8

    phyzguy

    User Avatar
    Science Advisor

    Re: function

    Ah, based on DH's hint, I now agree that you have done g(f(x)) incorrectly. Thereddevils, do you see it now?
     
  10. May 19, 2010 #9
    Re: function

    thanks !
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook