# Homework Help: Domain and ranges of composition function

1. Dec 13, 2013

### Coco12

My teacher discussed an in and out method that could be used however I don't understand how that works. Can someone explain it to me? The teacher said this method would allow us to determine the domain and range without knowing what the graph looked like.
How I have been doing it is looking at the domain of the inner function then looking at the domain of the composition function to figure out the domain of the composition function. However this method requires you to know how the graph looks like.
Is that right?

2. Dec 13, 2013

### vela

Staff Emeritus
What is this in-and-out method of which you speak?

3. Dec 13, 2013

### Coco12

I'm not really sure how to describe it but it's like you find the domain and ranges for the inner function and then the answer you get for the range you subbed it into the domain of the other function??

4. Dec 13, 2013

### vela

Staff Emeritus
OK, that's what I kind of suspected it was.

Say you have two functions, f and g, and you combine them to produce a new function h(x) = g(f(x)).

The first problem you'd run into is in trying to evaluate f(x). Obviously, x has to be in the domain of f. So say it is. We'll write y=f(x). Now you want to evaluate g(y). Clearly, to be able to do this, y has to be in the domain of g. If it's not, then we must rule out any values of x that f maps onto y.

Let's look at an example. Say $f(x) = \sqrt{1-x}$ and g(y) = 1/y, and let h(x) = g(f(x)). We want to find the domain of h.

First, we look at f. For f(x) to be defined, 1-x has to be non-negative, i.e. 1-x ≥ 0 or x ≤ 1, because you can't take the square root of a negative number. So after this first bit of analysis, we know that the domain of h at most is the interval (-∞,1].

Now we look at g(y), which isn't defined when y=0 because you can't divide by 0. So we need to figure out what values of x map to 0. In other words, we need to solve f(x)=0. If you do that, you'll find that when x=1, f(x)=0. That means we need to rule out x=1 from the domain of h.

The domain of h, therefore, is what we had before, (-∞,1], with the point x=1 removed. In other words, it's (-∞,1).

Last edited: Dec 13, 2013
5. Dec 13, 2013

### Coco12

6. Dec 13, 2013

### Coco12

What is g(y)?

Mod note: When you quote someone, don't chop of the [quote] tag. You did that here, so it looked like you were saying what vela actually said.

Last edited by a moderator: Dec 13, 2013
7. Dec 13, 2013

### Coco12

So You are saying that you look at the domain of the inner function F(x) and compare it with the range of g(x).
Whatever value of the range that g(x) is you plug into the f(x) function to find the value that x cannot equal??
The domain will be x cannot equal to 1, all real numbers?

8. Dec 13, 2013

### Coco12

Would my other method work too?

9. Dec 14, 2013

### vela

Staff Emeritus
I can't follow what you're saying.

If a point x is to be in the domain of g(f(x)), it has to meet two conditions. If either of the conditions is not met, it's not in the domain of g(f(x)). These two conditions are:
1. x has to be in the domain of f;
2. Let y=f(x). y has to be in the domain of g.
In the example I gave, condition 1 rules out any value of x greater than 1 because that would make 1-x negative and you can't take the square root of a negative number. Condition 2 rules out the point x=1 because when x=1, f(x) equals 0, which isn't in the domain of g. Only points in the interval (-∞,1) meet both conditions, so that's the domain of g(f(x)).

To find the range, start by taking the domain you find and see what f maps it to. In the example, we found the range was (-∞,1). f maps this to the interval (0,∞). Can you see why? If x<1, then 1-x > 0. Taking the square root of both sides leaves you with $\sqrt{1-x} > 0$.

Now you take this range of f we just found and see what g maps it to. In our example, g would map (0,∞) to (0,∞). So the range of g(f(x)) is (0,∞).

Last edited: Dec 14, 2013