Ok thats really helpful.
One last queston, is it possible that when looking at the simplified fg(x), additional (different) restrictions came into play ( for the maximum possible domain) that have not already been covered by looking at steps 1 and 2 above?
If I understand the question, the answer is "No."
We start with
[MATH]h(x) = f(g(x)) \text { if } x \in \mathbb S \text { and } h(x) = i(x) \text { if } x \in \mathbb S.[/MATH]
That, I believe, is the situation under discussion. In your terms, i(x) is the "simplified" version of h(x). I prefer to say it is an equivalent form. But the initial premise was that the equivalent form is valid whenever h(x) exists. Your initial question was premised on the fact that i(x) may be defined when h(x) is not. Under those circumstances, you asked whether the gaps in h had to be gaps in i. We said "no" because h and i are different functions with different domains, and they are equivalent only in the domain of h.
So being super technical, if they are equivant in h's domain, we have excluded by hypothesis the possibility of non-equivalence in that domain. So I think your real question is whether the technique for finding i leads to total equivalence. The answer to that is "It depends."
If, in your algebraic technique, you do not, explicitly or
implicitly, put any restrictions on x other than it must be in h's
domain, then we have complete equivalence. If, however, your algebra requires putting additional restrictions on x, then the equivalence relates to a smaller domain than h's.
Does that help?