Given the functions $f$ and $g$:
$f(x) = \frac{8}{x-2}+2$ for $x > 2$
$g(x) = \frac{8}{x-2}+2$ for $2 < x < 4$
Explain why the function gf cannot be formed.
I attempted solving this by trying to derive $gf$ as follows:
$gf(x) = g(f(x))$
$gf(x) = \frac{8}{(\frac{8}{x-2}+2)-2}+2$
Simplifying, I got $gf(x) = x$. This appears perfectly fine to me. What have I missed?
This seems to be a matter of convention. The composition $\;g(f(x))\;$ makes sense if $\;x\;$ is in the domain of $\;f\;$ and if $\;f(x)\;$ is in the domain of $\;g.\;$ Thus the domain of the composition will be, in general, a subset of the domain of $\;f.\;$ In the particular case you asked about, if $\;x>6\;$ then $\;y:=f(x)\;$ will satisfy $\;2<y<4\;$ and so $\;g(f(x)) = x\;$ but it is only defined if $\;x>6.\;$