# Functions range and domain

phospho
$f(x) = x - 3, g(x) = +\sqrt{x}$

Q. Find gf(x) and a suitable domain and the corresponding range.

so $gf(x) = \sqrt{x-3}$, f(x) is first and the domain for f(x) is x belongs to ℝ, so the domain for g(x) will be x belongs to ℝ, so this function doesn't work?

the answer is the domain is x>=3 and the range is x>=0, which I understand how they got but watching videos online and they separate each function, i.e do f(x) first, and find the domain and range for that, then the range becomes the domain for g(x), now I don't understand which way is correct

Vorde
You can really do either, meaning either look at each individual function or look at the combination, it depends on your perspective and the functions you are talking about.

As long as you understand how to do it both ways, it's okay to do it whichever way you want.

Villyer
For this problem I would just look at the final answer for gf(x) because ##\sqrt{x-3}## is a simple solution.

But are you more interested in a general way to doing these problems?

phospho
For this problem I would just look at the final answer for gf(x) because ##\sqrt{x-3}## is a simple solution.

But are you more interested in a general way to doing these problems?

I'm interested in why I got two different domains and ranges when looking at them separately and together. The book just seemed to look at gf(x), but how they don't mention the solution of the way I done it.

The exact wording of the questions: "for the following functions f(x) and g(x), find the composite functions fg(x) and gf(x). In each case find a suitable domain and the corresponding range when f(x) = x -3, g(x) = +√x", I've done fg(x), just gf(x) is confusing me.

Vorde
I am a bit confused on where you are having a problem.

The equation in question is ##\sqrt{x-3}##
We know the range is not going to be below zero because the square root function is strictly positive. We also know the domain is going to start where the inner function (f(x)) is zero and go to infinity.

So the inner function is zero at x=3, and increases with x. Therefore the range of g{f(x)} is 0 -> ##\inf## and the domain is 3 -> ##\inf##
What are you having a problem with?

edit: you can also just look at this as a transformation of the basic square root function, in which case the domain and range are obvious.

phospho
I am a bit confused on where you are having a problem.

The equation in question is ##\sqrt{x-3}##
We know the range is not going to be below zero because the square root function is strictly positive. We also know the domain is going to start where the inner function (f(x)) is zero and go to infinity.

So the inner function is zero at x=3, and increases with x. Therefore the range of g{f(x)} is 0 -> ##\inf## and the domain is 3 -> ##\inf##
What are you having a problem with?

edit: you can also just look at this as a transformation of the basic square root function, in which case the domain and range are obvious.
I understand your working and how they have done it, but previously I have done these types of questions by considering each function separately, so for gf(x), considering f(x) first which is (x-3) which is linear, so the domain is x belongs to ℝ and the range is f(x) belongs to ℝ, now considering g(f(x)) the domain must be the range of f(x), but if x belongs to ℝ and g(x) is the square root of x, then it can't work for negative numbers, so the function cannot work?

I completely understand how they got the answers in the book, and your explanation, but up to this point I was considering each function separately and it didn't make sense here.

Villyer
I understand your working and how they have done it, but previously I have done these types of questions by considering each function separately, so for gf(x), considering f(x) first which is (x-3) which is linear, so the domain is x belongs to ℝ and the range is f(x) belongs to ℝ, now considering g(f(x)) the domain must be the range of f(x), but if x belongs to ℝ and g(x) is the square root of x, then it can't work for negative numbers, so the function cannot work?

I completely understand how they got the answers in the book, and your explanation, but up to this point I was considering each function separately and it didn't make sense here.

I'm not sure if the part I bolded is true, I've never heard it before.
Where were you told this?

The possible domain for fg(x) is the range of g(x), which is true. But that possible domain can still be further restricted based on the domain of f(x).

Vorde
The problem is just because the 'inner function' has a range of R doesn't mean the 'outer function' has a domain of R. The square root function is only defined for positive numbers. You can note that I actually treated the two functions separately but I worked backwards, meaning I never had to deal with the problem of being undefined.

Mentor
$f(x) = x - 3, g(x) = +\sqrt{x}$

Q. Find gf(x) and a suitable domain and the corresponding range.

so $gf(x) = \sqrt{x-3}$, f(x) is first and the domain for f(x) is x belongs to ℝ, so the domain for g(x) will be x belongs to ℝ, so this function doesn't work?

Your notation is incorrect. From your work, you are looking at the composition of two function, but what you wrote was their product.

gf(x) = √x * (x - 3)

g(f(x)) = (g ° f)(x) = √(x - 3)

phospho
The problem is just because the 'inner function' has a range of R doesn't mean the 'outer function' has a domain of R. The square root function is only defined for positive numbers. You can note that I actually treated the two functions separately but I worked backwards, meaning I never had to deal with the problem of being undefined.

Really? I was watching a video of a similar example and they said the function wont exist. Unfortunately I can't link the video as it's paid for but I took a screenshot:

Look what they have done for gf(x)

phospho
Your notation is incorrect. From your work, you are looking at the composition of two function, but what you wrote was their product.

gf(x) = √x * (x - 3)

g(f(x)) = (g ° f)(x) = √(x - 3)

My apologies, it's just the notation used in my book. Thanks.

Vorde
They are wrong. The function definitely exists, I can visualize it easily, its just not defined everywhere. To say that it doesn't exist because some of it's input values aren't defined is to say ##\sqrt{x}## isn't a function because it isn't always defined.

Where are these videos from?

Villyer
Is it possible that your book uses fg(x) to refer to something other than f(g(x))?

Because the video is incorrect if it is talking about f(g(x)).

phospho
They are from a website called livemaths.co.uk which I'm using to teach myself more maths before I start back school. I'm 100% sure they mean f(g(x)), as does my book. Cheers.

Mentor
They are wrong. The function definitely exists, I can visualize it easily, its just not defined everywhere. To say that it doesn't exist because some of it's input values aren't defined is to say ##\sqrt{x}## isn't a function because it isn't always defined.

I agree. g(f(x)) = ##\sqrt{4x - 5}## is defined for certain values of x. To say that "gf(x) <sic> cannot exist" is wrong. Not everything on the web can (or should) be believed.