let fx 12x if x or equal to 1 and gx x2 if x or equal to 0
let f(x) = 1-2x if x<1 and 1+x if x > or equal to 1 and g(x) = x^2 if x<0 and 1-x if x > or equal to 0
Calculate g(f(x)) for x < or equal to 1/2, 1/2< x < 1 and x > or equal to 1
Calculate f(g(x)) for x < or equal to -1, -1 < x < 0, x=0 and x > 0
Solution
g(f(x) for x<=1/2
is g(1-2x)=1-(1-2x)=2x
g(f(x)) for 0.5<x<1
g(1-2x)=(1-2x)^2
g(f(x)) for x>=1
g(1+x)=1-1-x=-x
f(g(x)) for x<=-1
f(x^2)=1+x^2
f(g(x)) for -1<x<0
f(x^2)=1-2x^2
f(g(x)) for x>=0
f(1-x)=1-2(1-x)=-1+2x
