Question

Let $f:R \to R{\text{ and g : R}} \to {\text{R}}$be defined by $f(x) = {x^2}{\text{ and g(x) = x + 1}}$.Show that $f(g(x)) \ne g(f(x))$

Hint: Find the composition of one function in terms of another function.

Now $f(x)$and $g(x)$is given to us such that $f(x) = {x^2}{\text{ and g(x) = x + 1}}$
Now $f:R \to R{\text{ and g : R}} \to {\text{R}}$is given as it means that the domain of f is R and so as the range, similarly the domain of g is R and its range is also R.
We have to show that $f(g(x)) \ne g(f(x))$
So letâ€™s first compute $f(g(x))$
$\Rightarrow f(x + 1)$
$\Rightarrow {(x + 1)^2}$â€¦â€¦â€¦â€¦â€¦â€¦â€¦â€¦â€¦â€¦â€¦â€¦â€¦â€¦â€¦.. (1)
Now letâ€™s compute $g(f(x))$
$\Rightarrow g({x^2})$
$\Rightarrow {x^2} + 1$â€¦â€¦â€¦â€¦â€¦â€¦â€¦â€¦â€¦â€¦â€¦â€¦â€¦â€¦â€¦â€¦. (2)
Clearly equation 1 is not equal to equation 2 as ${(x + 1)^2} \ne {x^2} + 1$
Hence $f(g(x)) \ne g(f(x))$ proved.

Note: Whenever we come across such problems the only key concept that will be involved is how to find the composition of one function into another and itâ€™s been explained above. Some questions may involve some tricky parts as they may not be having the same domain and range, so pay special attention to this part before solving.