# Homework Help: Inputs and outputs of composite function

1. Dec 14, 2013

### Coco12

1. The problem statement, all variables and given/known data

Can someone describe the input and output method to find the domain and ranges of composite functions to me??

2. Relevant equations

3. The attempt at a solution
Example: f(g(x))

first you find the domain of g(x)
Then you find the range of g(x)
y= G(x)
that will become the domain of f(x)??

This is the part where I get confused.

2. Dec 14, 2013

### haruspex

No, it should merely be contained within the domain of f(x). f will be defined as a function in its own right independently of g, so its domain can go outside the range of g. Consequently, the range of G could be smaller than the range of f.

3. Dec 14, 2013

### Coco12

Can u explain how it would work then?

4. Dec 14, 2013

### haruspex

The domain of the composite is easy, right? It's just the range that's tricky.
Given g:A→B and f:C→D, the composite f(g(.)) is only meaningful if B$\subseteq$C. You can define a function $\hat f$:B→D as the restriction of f to B. Then the range of f(g(.)) is the range of $\hat f$.

5. Dec 14, 2013

### Coco12

What is A - B and C-D?

6. Dec 14, 2013

### Coco12

Yup I understand how to do the domain , it is just the range

7. Dec 14, 2013

### scurty

$g:A \rightarrow B$ means that if you take any element $x \in A$, $g(x) \in B$; g maps every element in A to some element in B. Basically, you take an element from the set A and put it into the function g and it outputs a solution in the set B. Similarly for C and D for the function f. I think that is what you were asking? (there was no mention of subtraction in haruspex's post)

8. Dec 14, 2013

### Coco12

Is there an example that can be given?

9. Dec 14, 2013

### Coco12

Also , another question lets say if
F(x) = sqrt(x-2)
G(x) = x+3
How do you find the range of (f+g)(x)
Sqrt (x-2) +x+3 ?
Normally the range of sqrt (x+2) will equal all y values greater than or equal to 0. How will adding the x+3 affect it?

10. Dec 14, 2013

### scurty

$f:[0,1] \rightarrow [1,2]$ where $f(x) = x + 1$

$g:\mathbb{R} \rightarrow \mathbb{C}$ where $g(x) = xi$

are two examples.

11. Dec 14, 2013

### scurty

Consider $\sqrt{x-2}$ by itself. The smallest value obtained is 0 when $x = 2$ and it tends towards $\infty$ as $x \rightarrow \infty$. Now consider $\sqrt{x-2} + x + 3$. This is only valid, again, for $x \geq 2$. What is the value when $x = 2$? How does this relate to the smallest value obtained from just the square root?

Alternatively, like Mark44 suggested, you can also look on a graph.

12. Dec 14, 2013

### haruspex

In general, you need to find all the extrema. Each extremum may be interior to an open set in the domain or at a domain boundary. In the first case, you look for the derivative being zero (if differentiable). In the second, you have to identify the domain boundaries that are contained in the domain. In your example x=2 is the only such. For a function of two variables it could be a surface.
To complete the solution, you need to find the value at each extremum and whether it is a local maximum or minimum.

13. Dec 15, 2013

### Coco12

Let's say g(f(x))
G(x)=x+1
F(x)= 4 ^x

I got 4^x +1

That would be an exponential graph with an horizontal asymptote at 1
The range would be y greater than 1
The book says y greater AnD equal to one .. Why is that so?

14. Dec 15, 2013

### Coco12

When u plug in 2 it would give you 5 as opposed to 0. What next?

15. Dec 15, 2013

### scurty

I would say the book is wrong and you are right, unless for some odd reason you are adjoining $-\infty$ to the real number line. I would double check with your teacher just to make sure.

16. Dec 15, 2013

### Coco12

When considering range do we only look at the range of the difference of functions or have to consider range of both or just the final function

17. Dec 15, 2013

### scurty

In Calculus we would call this function strictly increasing, because as x increase, y increases, no matter how small the increment of x. For now you can just refer to a graph and see how it isalways increasing.

Because it is always increasing, the upper limit is infinity like before. However, it has a lower limit, because the domain is restricted to $[2,\infty)$. You already found the two values, 0 and 5. Adding the x + 3 term raised the range from $[0,\infty) \text{ to } [5,\infty)$.

18. Dec 15, 2013

### Coco12

So the range is everything greater than or equal to 5? How do u know whether it is not equal to, less than or less than and equal to etc.

19. Dec 15, 2013

### scurty

The final range is only important. Consider the example:

$f(x) = \sqrt{x}, g(x) = 2\sqrt{x}, \, f(x) - g(x)$

f(x) and g(x) have ranges of $[0,\infty)$, but f(x) - g(x) has range $(-\infty,0]$. Also, consider the case where f(x) = g(x). Their subtraction would result in a range of just 0.

20. Dec 15, 2013

### scurty

Yep! As for why: assuming you haven't taken Calculus yet, graphing is the best you can do. When you hit Calculus you will learn techniques to prove that 5, in this case, is the lower value for the range.

I hope that in this case it is clear as to why 5 is the lowest value in the range, but other functions may be more complicated than this one.

21. Dec 15, 2013

### Coco12

Ok look at this example:

H(x)= G(x) / f(x)
G(x)= 1/(x+4)
F(x) = 1/(x^2-16)
H(x)= (x-4)(x+4)/(x+4)

I put : y cannot equal to -8
The book says y cannot equal to -8 and 0
Why the zero?

22. Dec 15, 2013

### scurty

I was wrong in my previous post, sorry. You do need to consider the original functions, because if the domain is restricted, that will affect the range. In this case -4 is not allowed which prevents -8 from being in the range.

As for why 0 is not in the range, the same principle applies. In f(x), you have $x^2-16$ in the denominator. That factors into (x-4)(x+4). This means x = -4,4 are NOT in the domain of f(x). So, H(4) is undefined because $H(4) = \frac{G(4)}{F(4)}$, but F(4) is undefined. H(x) simplifies to just x-4 so if you plug in 4 and -4 you get 0 and -8; that's where the values came from.

23. Dec 15, 2013

### Coco12

So u plug in 4 and -4 into the equation to get the range?

What about if the final equation was 1/(x-1) +sqrt(x)
The domain is x greater than or equal to 0 and x cannot equal 1
. Note this is a sum of functions
How does that plug into the range??

24. Dec 15, 2013

### scurty

No, the 4 and -4 were undefined values for the domain. To see what values in the range these corresponded to, I plugged them into H and then I discarded those results.

You can't plug in 1 for the new function, because x-1 wasn't canceled out in the function.

For the other function, if you simplified it, it would become: $H(x) = G(x)/F(x) = \frac{x^2-16}{x+4} = \frac{(x+4)(x-4)}{x+4} = x-4$. Because the x+4 canceled out, in the new equation you can get a value for x = -4. However, this is invalid because -4 was excluded from the domain on F(x) (and whenever you cancel terms out, you exclude those values of x that make the term 0 from the final answer).

You don't find ranges by plugging in one or two numbers. Use the graphing method for now.

25. Dec 15, 2013

### Coco12

The graphing method is inaccurate isn't it?