If g{f(x)}=|sin x| and f{g(x)}=(sin√x)2, then
f(x)=sin2x,g(x)=√x
Let f(x)=sin2x and g(x)√x
Now, fog(x)=f[g(x)]=f(√x)=sin2√x
and gof(x)=g[f(x)]=g(sin2 x)=√sin2x=|sin x|
Again, let f(x)=sin x,g(x)=|x|
fog(x)=f[g(x)]=f(|x|)=sin|x|≠(sin√x)2
When, f(x)=x2,g(x)=sin√x
fog(x)=f[g(x)]=f(sin√x)=(sin√x)2
and (gof)(x)=g[f(x)]=g(x2)=sin√x2
=sin|x|≠|sin x|