Lila S.

asked • 04/15/18

Give an example of a function, f(x), with a domain of (0,5] and a range of [0,∞)

Hi, I have this problem in my class, and while I understand how a function works (not fully, but I have a grasp on the concept), I am having a hard time to find information on how to find an example of f(x) when given a domain and range.
Can someone help please?

1 Expert Answer

By:

Bobosharif S. answered • 04/16/18

Tutor
4.4 (32)

PhD in Math, MS's in Calulus

Lila S.

Thank you. How do you get to that answer please? I am trying to understand.
Report

04/16/18

Bobosharif S.

Which answer? specify question. When you think about function with required properties, you have to choose it the way that its domain would be as desired. Then you can change it in some way to make the range as you need, etc.
Report

04/16/18

Lila S.

I was talking about your answer, f(x)=√(5/x-1).
How did you find that function?
Report

04/16/18

Bobosharif S.

Well, I just was thinking about a function which would have a domain (0, 5], That's all. Now a little more details; once you have a square root, then whatever is under it, should be nonnegative. So, first I took a function of the form √(p(x)). We know that p(x)>=0. Next, I specified p(x); I just put p(x)=(5-x). So the function I  was thinking about turned out to be  √(5-x) with domain x<=5. Next, I thought I had to change it the way that x<=5 remains and another restriction adds to it, that x>0. So I divided 5-x by x. 
Hope this helps. 
In principle, you can write the infinite number of functions containing rational expressions, trigonometric functions, etc.
 
Report

04/16/18

Lila S.

So when you say you just put p(x)=(5-x) it was random?
Report

04/16/18

Lila S.

By the way, thank you so much for explaining everything to me. (Sorry for all the empty messages. I can only see your answers if I post a comments myself. If I refresh the page, it goes back to showing only the first 2 comments).
Report

04/16/18

Bobosharif S.

No, putting p(x)=5-x is not random; √(5-x) tell you that x should be less or equal to 5 (This is what part of your question!). At this step you have (a, 5].
Now next step would be what should be done to have 0 instead of a in the interval (a, 5] (domain!). Therefore, under the square root I divide (5-x) by x and you get √(5/x-1). Roughly speaking, we choose that expression because it gives the domain (and range) you need.
 
 
Report

04/16/18

Lila S.

Okay I think I am getting it!
So in the beginning you chose the square root to make sure you stay in the range y>=0, then you chose 5 to stay in the domain x<=5, and finally you divided it by x so that it stays in the domain 0<x... Correct?
Report

04/16/18

Bobosharif S.

Yes, right.
Report

04/16/18

Bobosharif S.

If you understand it, then try to find another function yourself.
Report

04/16/18

Lila S.

If I want to keep within y>=0, the only way I know how to always get a positive number is to multiply by -1. So I'd do (p(x))-1.
Now that's where I get blocked, because I have to use 5 since it is my domain limit. Or could I just put any number as long as it is under 5?
For example I could choose p(x)=4-x right ?
Then I will get (4 - x) -1 , from there, I need to make sure to stay over 0 for my domain. So I'd divide it by x, like you did. So I'd get ((4-x)-1)/x.... And it doesn't work....
Report

04/16/18

Bobosharif S.

((4-x)-1)/x =(5-x)/x=5/x-1. So this is the same function as before.
Report

04/17/18

Lila S.

Then I don't get it at all, because when I input it in my calculator, it does not give me the same graph than the function you wrote at all. Instead it gives me some kind of rational looking function.
Report

04/17/18

Lila S.

I can follow your logic for how you got the equation of f(x), but I can't figure out another myself. So I guess I don't get it. I am gonna try to go through the khan academy classes and see what I am missing.
Report

04/17/18

Bobosharif S.

Hi Lila,
Let's find another function, step by step.
1. Let's our function be x2. Its range and domain is R. Let's slightly change it; instead of x2, let's take 25-x2. Domain and range didn't change. What we need to do is to restrict both range and domain. How? Next step
2. Instead of 25-x2, lets' take √(25-x2). What we have now? As you see domain changed; now x can take values only in the interval [-5, 5]. (say x cannot be 6 or -6). It looks better, but it still is not what we need. So we need to impose "more restrictions" on the domain. How to do that? 
Again instead of √(25-x2) we consider √((25-x2)/x); we just divided the expression under the square root by x. Now domain of the function f(x)=√((25-x2)/x) is (0,5]. Can you find it? What is the range?
Instead of dividing by x we could divide by x^2 or by x^3. as well.
 
I hope this explanation helps.
 
 
This 
 
Report

04/19/18

Lila S.

Thanks for trying. How did you choose x2? Randomly? and 25? Is it because you had to choose a multiple of 5 because of the domain?
You say "Let's take square root of 25 -x" How did you choose the square root? And then again, same thing for dividing by x?
Report

04/19/18

Bobosharif S.

The point is that you have to choose an expression (for the function) in the way that it will have the domain we need.  For example, if you have f(x)=x, domain is the whole R=(-∞,+∞), but if f(x)=√x, the domain is (0, +∞). (do you the difference?). Next if you have f(x)=√(1-x), domain is x<=1 or if you have f(x)=√(10-x), domain is x<=10. Thus, if f(x)=√(5-x), the domain is x<=5. The same with f(x)=√(25-x2). I take square root √, because I want to make the domain <=5 (this is the right border of the domain). This way the right border (side) of the domain is set, it is 5, that is, the domain of the function we "constructed" now is (-∞, 5]. This is better (or "smaller" if you want) than (-∞, +∞) but it is still not enough, because we want a function, domain of which is (0, 5]. Therefore, if I divide (25-x2) by x and take square root then the domain would be (0, 5].
 
Report

04/20/18

Daniel Y.

Thank you for your help!
Report

11/21/18

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.