so put g(x) as x in f(x), you should get f o g defined for the intervals
we have
2 functions for g(x).
and for
so for
similarly
, and
And
for
Finally
f(g(x))= if
if
if
notice we have covered the whole real line with x. The important part is to use restrictions of x so that g(x) fits in the inequalities for f(x). if i had used
instead of then the next would be which doesn't fit the inequalities for f(x).
[I rushed this there may be mistakes ]