# What is the domain of the composite function (g@f)(x)?

Since the notation for the composition $\left(g \setminus \circ f\right) \left(x\right) = g \left(f \left(x\right)\right)$ means to first apply $f$ to $x$ to get $f \left(x\right)$ and then to apply $g$ to $f \left(x\right)$ to get $g \left(f \left(x\right)\right)$, a point $x$ will be in the domain of $g \setminus \circ f$ if and only if $x$ is in the domain of $f$ and $f \left(x\right)$ is in the domain of $g$.
For example, let $f \left(x\right) = \setminus \frac{x + 3}{x - 4}$ and $g \left(x\right) = \setminus \frac{x - 2}{x + 5}$. The number $x = 4$ is not in the domain of $f$ and is therefore not in the domain of $g \setminus \circ f$. Is there another number that's not in the domain of $g \setminus \circ f$? Yes, any value(s) of $x$ such that $f \left(x\right) = - 5$ is/are not in the domain of $g \setminus \circ f$ since $- 5$ is not in the domain of $g$. In order for $f \left(x\right) = - 5$, we must have $x + 3 = - 5 \left(x - 4\right) = - 5 x + 20$ or $6 x = 17$ or $x = \frac{17}{6}$. The domain of $g \setminus \circ f$ is therefore $\setminus \left\{x \setminus \in R : x \ne 4 \setminus m b \otimes \left\{\mathmr{and}\right\} x \ne \frac{17}{6} \setminus\right\}$.
If you find a simplified formula for $g \setminus \circ f$ in such an example, you can be misled in what the correct answer is. In the example above, we can write $\left(g \setminus \circ f\right) \left(x\right) = \setminus \frac{f \left(x\right) - 2}{f \left(x\right) + 5} = \setminus \frac{\setminus \frac{x + 3}{x - 4} - 2}{\setminus \frac{x + 3}{x - 4} + 5} = \setminus \frac{x + 3 - 2 \left(x - 4\right)}{x + 3 + 5 \left(x - 4\right)} = \setminus \frac{- x + 11}{6 x - 17}$.
This simplified formula can mislead you into thinking that $\frac{17}{6}$ is the only number not in the domain of $g \setminus \circ f$, but it's not. The number $4$ is also not in the domain as we saw above.
Why does this happen? The reason is that the equality $\setminus \frac{\setminus \frac{x + 3}{x - 4} - 2}{\setminus \frac{x + 3}{x - 4} + 5} = \setminus \frac{x + 3 - 2 \left(x - 4\right)}{x + 3 + 5 \left(x - 4\right)}$ is not true if $x = 4$, because the expression on the left-hand side is undefined there. So, in doing the simplification above, we were implicitly assuming that $x \ne 4$.