Find fog and gof, if f (x) =

    \[{{x}^{2}}\]

, g (x) = cos x
Find fog and gof, if f (x) =

    \[{{x}^{2}}\]

, g (x) = cos x

f (x) = 

    \[{{x}^{2}}\]

, g(x) = cos x

    \[f:~R\to ~[0,~\infty )~\]

    \[g:~R\to [-1,~1]\]

Now we have to calculate fog,

Clearly, the range of g is not a subset of the domain of f.

⇒ Domain (fog) = {x: x ∈ domain of g and g (x) ∈ domain of f}

⇒ Domain (fog) = x: x ∈ R and cos x ∈ R}

⇒ Domain of (fog) = R

(fog): R→ R

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

= f (cos x)

    \[co{{s}^{2}}~x\]

Now we have to calculate gof,

Clearly, the range of f is a subset of the domain of g.

⇒ fog: R→R

(gof) (x) = g (f (x))

    \[g~({{x}^{2}})\]

=

    \[~cos~{{x}^{2}}\]