Let

    \[{{\mathbf{R}}^{+}}\]

.be the set of all non-negative real numbers. If

    \[\mathbf{f}:~{{\mathbf{R}}^{+}}~\to ~{{\mathbf{R}}^{+}}~\]

and

    \[\mathbf{g}~:~{{\mathbf{R}}^{+}}~\to ~{{\mathbf{R}}^{+}}~\]

are defined as

    \[\mathbf{f}\left( \mathbf{x} \right)={{\mathbf{x}}^{\mathbf{2}}}~\]

and

    \[\mathbf{g}\left( \mathbf{x} \right)=+\text{ }\sqrt{\mathbf{x}}\]

, find fog and gof. Are they equal functions.
Let

    \[{{\mathbf{R}}^{+}}\]

.be the set of all non-negative real numbers. If

    \[\mathbf{f}:~{{\mathbf{R}}^{+}}~\to ~{{\mathbf{R}}^{+}}~\]

and

    \[\mathbf{g}~:~{{\mathbf{R}}^{+}}~\to ~{{\mathbf{R}}^{+}}~\]

are defined as

    \[\mathbf{f}\left( \mathbf{x} \right)={{\mathbf{x}}^{\mathbf{2}}}~\]

and

    \[\mathbf{g}\left( \mathbf{x} \right)=+\text{ }\sqrt{\mathbf{x}}\]

, find fog and gof. Are they equal functions.

Given

    \[\mathbf{f}:~{{\mathbf{R}}^{+}}~\to ~{{\mathbf{R}}^{+}}\]

and 

    \[\mathbf{g}~:~{{\mathbf{R}}^{+}}~\to ~{{\mathbf{R}}^{+}}~\]

So, 

    \[fog:~{{R}^{+}}~\to ~{{R}^{+}}~\]

and 

    \[gof:~{{R}^{+}}~\to ~{{R}^{+}}\]

Domains of fog and gof are the same.

Now we have to find fog and gof also we have to check whether they are equal or not,

Consider (fog) (x) = f (g (x))

=

    \[f\text{ }\left( \sqrt{x} \right)\]

    \[=\text{ }\sqrt{{{x}^{2}}}\]

    \[=\text{ }x\]

Now consider (gof) (x) = g (f (x))

    \[=\text{ }g\text{ }({{x}^{2}})\]

    \[=\text{ }\sqrt{{{x}^{2}}}\]

    \[=\text{ }x\]

So, (fog) (x) = (gof) (x), 

    \[\forall x~\in {{R}^{+}}\]

Hence, fog = gof