Simplifying Piecewise Functions: fg(x) and gf(x) Calculations

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
8 replies · 2K views
thereddevils
Messages
436
Reaction score
0

Homework Statement



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) .

Homework Equations





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 ?
 
Physics news on Phys.org


D H said:
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.

thanks but why ? How did you see that ?
 


D H said:
Show your steps on how you derived g(f(x)).

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 .
 


D H said:
Hint: Is f(x) ever negative?

thanks !