Domain of composite function question

apple2357

Full Member
Joined
Mar 9, 2018
Messages
520
Supposing you had something like f(x)=1/(x+2) for x not equal to -2
And g(x)=2/x for x not equal to 0, and you work out the composite function fg(x)=x/(2+2x).
Is the domain of the composite function just x not equal to -1, because that's where the new function is undefined, or do you also have x not equal to zero, because you excluded 0 from the domain of g?
 
A function is defined by two things, the "formula" or "rule" that tells you how to go from "x" to "y" and the domain, the set of all possible x values. y= 2x for x> 0" is a different function from "y= 2x for x< 0". So, yes, since g(0) is not defined, f(g(0)) cannot be defined and 0 is not in the domain of fg. And since f(-2) is not defined f(g(x)) is not defined for any x such that g(x)= 2/x= -2, x= -1 is not in the domain of fg. The domain of fg is "all x except 0 and -1".
 
Ok, so let’s say I asked what the domain of the function x/(2+2x) is without knowledge that it was constructed by a composite function? What would you say?

It can be anything except x=0 because? And you can’t tell me? Because I haven’t defined the function fully? And it’s up to me to decide what the domain is ?
Is that what you mean?
 
Supposing you had something like f(x)=1/(x+2) for x not equal to -2
And g(x)=2/x for x not equal to 0, and you work out the composite function fg(x)=x/(2+2x).
Is the domain of the composite function just x not equal to -1, because that's where the new function is undefined, or do you also have x not equal to zero, because you excluded 0 from the domain of g?
In deriving (simplified) expression for f(g(x)), a multiplication by 'x' was involved. Hence x=0 is excluded from the domain of the "simplified" function.
 
Ok, so let’s say I asked what the domain of the function x/(2+2x) is without knowledge that it was constructed by a composite function? What would you say?

It can be anything except x=0 because? And you can’t tell me? Because I haven’t defined the function fully? And it’s up to me to decide what the domain is ?
Is that what you mean?
The function x/(2+2x) is not the same function as f(g(x))! It has a different domain,because simplifying changes the domain. So the answer there would be "x is not -1"; x = 0 is perfectly legal in that function.

What I generally recommend is to look for domain not (primarily) in the final form, but in the initial form before simplification, here 1/((2/x)+2). Now you can see that x can't be 0 because you need 2/x; and also, the denominator can't be 0, so you can solve (2/x)+2 = 0 to find what to exclude. For the latter, you can use the final simplified form, since in simplifying you have,in effect, rearranged the denominator to (2 + 2x)/x, and can see that it is 0 when x = -1.
 
A function is not just a rule. It is a rule that applies within a domain.

[MATH]f(x) = \dfrac{1}{x + 2} \text { if } x \ne -\ 2.[/MATH]
A rule and a domain.

[MATH]g(x) = \dfrac{2}{x} \text { if } x \ne 0.[/MATH]
A rule and a domain.

Now we want to create a new function by composition, namely h(x) = f(g(x)). I stress that this is a new function. We must determine a rule and a domain. Obviously, g(x) is not defined for 0 so we are stuck at the outset for h(0). 0 cannot be in h's domain. Let's consider whether any other value for x creates an issue. If g(x) = - 2, then we have no rule for f(-2). When will g(x) = - 2?

[MATH]- \ 2 = \dfrac{2}{x} \implies -\ 2x = 2 \implies x = -\ 1.[/MATH] So - 1 cannot be in h's domain.

[MATH]h(x) = f(g(x)) = f \left ( \dfrac{2}{x} \right ) = \dfrac{1}{\dfrac{2}{x} + 2} = \dfrac{1}{\dfrac{2 + 2x}{2x}} = \dfrac{x}{1 + x} \text { if } x \ne 0 \text { and } x \ne -\ 1.[/MATH]
Now we can define the function i(x) as

[MATH]i(x) = \dfrac{x}{1 + x} \text { if } x \ne -\ 1.[/MATH]
But that is a different function from h(x) because they have different domains. We cannot say

[MATH]h(x) = i(x) \text { if } x \ne -\ 1 \implies h(0) = i(0) = 0.[/MATH]
Yes, we are being very fussy about definitions. That is how you avoid subtle mistakes. You do not need to understand this fussiness for elementary algebra. You may not need to do so for merely applying calculus. But you do need it for the standard way of proving calculus.

Excellent question!
 
Here is one way of finding the domain for f(g(x)).
Step 1: Find out what you can NOT compute g of. Then say x can not be those values
Step 2: Find out what you can NOT compute f of. Then say that g(x) can not be those values. Then solve for what x can not be.
Step 3: The domain is all real numbers except for the values that x can not be from steps 1 and 2.

Lastly, before using the steps about please think about why my steps work.

Here is something that you should look at at least once while studying this topic. Let f(x) = g(x) = 1/x. Then f(g(x)) = x which you would assume has no restriction on the domain but it does----- x can NOT be 0.
 
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?
 
"Let f(x) = g(x) = 1/x. Then f(g(x)) = x which you would assume has no restriction on the domain but it does----- x can NOT be 0."

This seems to offer me an additional problem! whist g(x) is not defined for x=0 so therefore the domain of fg(x) cannot clearly be x=0, in thinking about step 2 above we are left trying to solve 1/x=0 , which suggests x is undefined? or x is extremely large!
 
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?
 
Thanks- that was my hunch. But you have provided a strong argument!
 
Last edited:
"Let f(x) = g(x) = 1/x. Then f(g(x)) = x which you would assume has no restriction on the domain but it does----- x can NOT be 0."

This seems to offer me an additional problem! whist g(x) is not defined for x=0 so therefore the domain of fg(x) cannot clearly be x=0, in thinking about step 2 above we are left trying to solve 1/x=0 , which suggests x is undefined? or x is extremely large!
So long as we are restricting discussion to the real numbers, there is no point discussing x/0: there is no such real number.

You are making the same mistake as before.

[MATH]f(x) = \dfrac{1}{x} = g(x), \text { and } h(x) = f(g(x)) \text { if } x \ne 0.[/MATH]
It is then true that

[MATH]x \ne 0 \implies h(x) = x[/MATH], but

h(x) is and always undefined at x = 0.

It is true of course that we can define i(x) = x for all real x, but h and i are different functions with different domains. They are not the same. They happen to be equivalent within h's domain.
 
I asked a friend of a friend the same orginal question who was a student and fellow at Cambridge in pure maths. He gave me a response which is in line with what we have concluded above but i only partially understand it! Is anyone interested in his response? its a bit abstract!
 
I asked a friend of a friend the same orginal question who was a student and fellow at Cambridge in pure maths. He gave me a response which is in line with what we have concluded above but i only partially understand it! Is anyone interested in his response? its a bit abstract!
My academic training was in European languages and history. I very much doubt that I would grasp your friend's notation or the technical reasons for his style of argument.
 
I asked a friend of a friend the same orginal question who was a student and fellow at Cambridge in pure maths. He gave me a response which is in line with what we have concluded above but i only partially understand it! Is anyone interested in his response? its a bit abstract!
You might as well show it to us and see if anyone wants to explain it. Probably some of us will at least be able to understand it.
 
Here it is. He is someone who does a lot of research in Lie Algebra(??)
Hi

Technically you should exclude both.

What does it mean to calculate ‘the domain of g’. Not really anything, as the specification of a function g:X->Y is simply a couple of sets X and Y and a list of pairs (x,y_x) for every x in X and some y_x in Y.

It’s just in our case it’s implicit that we want X and Y to look like the real numbers and we want y_x=2/x whenever that is possible.

Then it makes sense to make Y=\R and X as big as possible, so you set X= \R - {0}.

Now you then want to specify f: Y\to Z, but you can’t make that work without excluding at least -2 from Y. But this entails removing -1 from X.

Another way to do this is to extend the range of Y by adding in infinity. If you do that, then you don’t need to remove 0, since we define 2/0 = \infty.

Then decide whether you want infinity in Z or not. If you’re happy to have infinity in Z, then you don’t need to lose any points. If you do, then you need to remove just the -2 from Y, hence the -1 from X.

So it’s basically about whether you’re happy to have infinity in Y or not.
 
Here it is. He is someone who does a lot of research in Lie Algebra(??)
Hi

Technically you should exclude both.

What does it mean to calculate ‘the domain of g’. Not really anything, as the specification of a function g:X->Y is simply a couple of sets X and Y and a list of pairs (x,y_x) for every x in X and some y_x in Y.

It’s just in our case it’s implicit that we want X and Y to look like the real numbers and we want y_x=2/x whenever that is possible.

Then it makes sense to make Y=\R and X as big as possible, so you set X= \R - {0}.

Now you then want to specify f: Y\to Z, but you can’t make that work without excluding at least -2 from Y. But this entails removing -1 from X.

Another way to do this is to extend the range of Y by adding in infinity. If you do that, then you don’t need to remove 0, since we define 2/0 = \infty.

Then decide whether you want infinity in Z or not. If you’re happy to have infinity in Z, then you don’t need to lose any points. If you do, then you need to remove just the -2 from Y, hence the -1 from X.

So it’s basically about whether you’re happy to have infinity in Y or not.
Well that is pretty funny because I specifically noted that my discussion was not dealing with anything except real numbers and thereby implicitly excluded things like hyperreal, superreal, or surreal numbers.
 
That post wasn’t in response to anything you wrote. It was the answer to my original question! He doesn’t read the forum.
 
"Let f(x) = g(x) = 1/x. Then f(g(x)) = x which you would assume has no restriction on the domain but it does----- x can NOT be 0."

This seems to offer me an additional problem! whist g(x) is not defined for x=0 so therefore the domain of fg(x) cannot clearly be x=0, in thinking about step 2 above we are left trying to solve 1/x=0 , which suggests x is undefined? or x is extremely large!
I think that you are confused about this. It seems that you are thinking that x=undefined or extremely large in 1/x=0!

1/x=0 has NO solution. This means that g(x) will never be 0 so you CAN compute f of whatever g of happens to be. So there is no problem here (ie from step 2). This is a restriction from step 1 however.

Consider f(x) = sqrt(x) and g(x)=x2+ 1. Now let's look at f(g(x))
Step 1: You CAN take g of any number (because you can square any number and then add 1 to it)
Step 2: What can't you take f of? Answer, you can NOT compute f of any negative number. So g(x) can NOT be negative. But g(x) is never negative, it is always at least 1. So there are no restrictions for x in step 2
Step 3: x can be any number, ie the domain is all real numbers.

One last comment. Although what you wrote happens to correct I am sure that you meant something else.
You wrote: the domain of fg(x) cannot clearly be x=0 (see bold above). You meant to write that the domain of fg(x) can NOT contain x=0
 
Last edited:
Top