I am tutoring a student in precalculus and there was a question that I couldn't quite answer.
I know that the domain of $f \circ g$ is the domain of $g$, minus the points $z$ where $g(z)$ is not in the domain of $f$.
Now, in precalculus we often have functions such as $f(x) = \dfrac {1}{x+2}$ and $g(x) = 1/x$. According to what I said above, the domain for $f \circ g$ is $\mathbb{R} - \{0, -\frac 12 \}$. But if we just compute the formula for $f\circ g$ directly, we get $\dfrac {x}{2x+1}$. Now, this function also gives us the restriction $x \not = -\frac 12$.
So it seems that, we still have to start with the domain of $g$, but then instead of finding the points $z$ where $g(z)$ is not in the domain of $f$, it seems like we can directly compute $f \circ g$ and compute the domain directly from there (after simplification). In fact, my tutee's professor even told the students to write this "fact" down.
Is this really true, or can it fail? I really think it should fail in some cases, because I really don't see how you would ever prove it; "finding the domain of $f \circ g$ after simplification" is just a very ambiguous concept, so I can't even see where you would start to prove such a thing.