Find gof and fog when $f: R \rightarrow R$ and $g: R \rightarrow R$ are defined by
(i) $f(x)=2 x+3 \quad$ and $\quad g(x)=x^{2}+5$
(ii) $f(x)=2 x+x^{2} \quad$ and $\quad g(x)=x^{3}$
(iii) $f(x)=x^{2}+8 \quad$ and $\quad g(x)=3 x^{3}+1$
(iv) $f(x)=x \quad$ and $\quad g(x)=|x|$
(v) $f(x)=x^{2}+2 x-3$ and $g(x)=3 x-4$
(vi) $f(x)=8 x^{3} \quad$ and $\quad g(x)=x^{1 / 3}$
Given, $f: R \rightarrow R$ and $g: R \rightarrow R$
So, gof: $R \rightarrow R$ and fog: $R \rightarrow R$
(i) $f(x)=2 x+3$ and $g(x)=x^{2}+5$
Now, (gof) $(X)$
$=g(f(x))$
$=g(2 x+3)$
$=(2 x+3)^{2}+5$
$=4 x^{2}+9+12 x+5$
$=4 x^{2}+12 x+14$
$(f \circ g)(x)$
$=f(g(x))$
$=f\left(x^{2}+5\right)$
$=2\left(x^{2}+5\right)+3$
$=2 x^{2}+10+3$
$=2 x^{2}+13$
(ii) $f(x)=2 x+x^{2}$ and $g(x)=x^{3}$
$(g \circ f)(x)$
$=g(f(x))$
$=g\left(2 x+x^{2}\right)$
$=\left(2 x+x^{2}\right)^{3}$
$(f o g)(x)$
$=f(g(x))$
$=f\left(x^{3}\right)$
$=2\left(x^{3}\right)+\left(x^{3}\right)^{2}$
$=2 x^{3}+x^{6}$
(iii) $f(x)=x^{2}+8$ and $g(x)=3 x^{3}+1$
$(g \circ f)(x)$
$=g(f(x))$
$=g\left(x^{2}+8\right)$
$=3\left(x^{2}+8\right)^{3}+1$
$(f o g)(x)$
$=f(g(x))$
$=f\left(3 x^{3}+1\right)$
$=\left(3 x^{3}+1\right)^{2}+8$
$=9 x^{6}+6 x^{3}+1+8$
$=9 x^{6}+6 x^{3}+9$
(iv) $f(x)=x$ and $g(x)=|x|$
$(g o f)(x)$
$=g(f(x))$
$=g(x)$
$=|x|$
$(f o g)(x)$
$=f(g(x))$
$=f(|x|)$
$=|x|$
(v) $f(x)=x^{2}+2 x-3$ and $g(x)=3 x-4$
(gof) (x)
$=g(f(x))$
$=g\left(x^{2}+2 x-3\right)$
$=3\left(x^{2}+2 x-3\right)-4$
$=3 x^{2}+6 x-9-4$
$=3 x^{2}+6 x-13$
$(f o g)(x)$
$=f(g(x))$
$=f(3 x-4)$
$=(3 x-4)^{2}+2(3 x-4)-3$
$=9 x^{2}+16-24 x+6 x-8-3$
$=9 x^{2}-18 x+5$
(vi) $f(x)=8 x^{3}$ and $g(x)=x^{1 / 3}$
$(g \circ f)(x)$
$=g(f(x))$
$=g\left(8 x^{3}\right)$
$=\left(8 x^{3}\right)^{\frac{1}{3}}$
$=\left[(2 x)^{3}\right]^{\frac{1}{3}}$
$=2 x$
$(f \circ g)(x)$
$=f(g(x))$
$=f\left(x^{\frac{1}{3}}\right)$
$=8\left(x^{\frac{1}{3}}\right)^{3}$
$=8 x$