Solve the composition $f \circ g=?$ and $g\circ f=?$ a) $f(x) =  \sqrt[3]{x}\ $ and $g(x) = x^3$
find $f\circ g=?$ and $g\circ f=?$
I have $f\circ g = f(g(x)) = f(x^3) =  \sqrt[3]{x^3}  = x$
So basically, first we replace $g(x)$ with its value, then we replace $x$ with the value of $f(x)$ inside $g(x)$?
$g\circ f = g(f(x)) = g( \sqrt[3]{x} ) =  \sqrt[3]{x^3} $ OR $ \sqrt[3]{x}^3 $ ?
b) $f(x) = \sin x$ and $g(x) = x^2$
$$(f\circ g) = f(g(x)) = f(x^2) = \sin (x^2)$$
$$(g\circ f) = g(f(x)) = g(\sin x) = (\sin x)^2 = \sin^2x$$
Am I doing it right? I'm kinda confused whether I have to replace x with the original value or not.

so there is two different case and different result,for example let us suppose that
$f(x)=x^3$
and $g(x)=x^2$
then multiplication  is directly $x^3*x^2=x^5$
for composition like $f\circ g=f(g(x))=(x^2)^3$
$g\circ f=g(f(x))=(x^3)^2$
