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

AI Thread Summary
The discussion revolves around calculating fg(x) and gf(x) for the given piecewise functions f and g. The correct calculations for fg(x) are (x+1)^2 for x >= 0 and x^2 for x < 0. However, the calculation for gf(x) was initially incorrect; it should be x^2 + 1 for x >= 0 and -x^2 for x < 0. Participants emphasize the importance of checking the domain of the functions and understanding the behavior of f(x) to avoid mistakes in piecewise function evaluations. The conversation highlights the need for careful substitution and verification in piecewise function problems.
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


This looks correct to me.
 


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.
 


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 ?
 


Show your steps on how you derived g(f(x)).
 


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 .
 


Hint: Is f(x) ever negative?
 


Ah, based on DH's hint, I now agree that you have done g(f(x)) incorrectly. Thereddevils, do you see it now?
 


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

thanks !
 
Back
Top