# 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

I believe Mark44 answered a similar question in this topic: https://www.physicsforums.com/showthread.php?t=728375

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.