# Thread: domain and range function?

1. ## domain and range function?

Can anyone think of a function ( not piecewise) so that the natural domain is x>=0 and the range is all real values?

For example, y= sqrt(x) has a natural domain x>=0 and range of y>=0 ( the graph exists in the first quadrant) but I want one with has a range of all real values ( so in quadrants 1 and 2)?

Does it exist?

No

3. ## Re: domain and range function?

If there were such a function, its graph would be in quadrants 1 and 4, not 1 and 2- and so it could not be a function.

4. ## Re: domain and range function?

Isn't y=lnx in quadrants 1 & 4 ? that has a domain x>0 and range all real y? All I want is something like this but defined for x=0 too?

5. ## Re: domain and range function?

Originally Posted by rodders
Isn't y=lnx in quadrants 1 & 4 ? that has a domain x>0 and range all real y? All I want is something like this but defined for x=0 too?
There is no such function that is not also piecewise. If you allowed piecewise functions, I could give you many. For example, Conway Base-13 function of the square root of $x$. This function is defined piecewise, it is discontinuous everywhere, its natural domain is $x\ge 0$, its range is the set of all real numbers, it possesses the intermediate value property.

Alternately, if the range is the one-point compactification of the reals rather than the set of reals, then $\ln x$ would work.

6. ## Re: domain and range function?

Thanks for this.
I am now trying to think of a function defined for x>=0 but a range of y>0 , so only in the first quadrant, touching the y axis but not the x axis?
I thought about y= e^sqrt(x) but whilst the domain is x>=0, the range is y>=1 and not y>0

7. ## Re: domain and range function?

You have not studied topology, but if you had, you would see that range runs into the exact same problem. You are looking for a continuous function from a half closed interval to an open one. No such function exists.

This is why I suggested the one-point compactification of the reals as the range. $(-\infty,\infty]$ is a half-closed interval, and sure enough, there exists a continuous function from $[0,\infty)$ to $(-\infty,\infty]$

8. ## Re: domain and range function?

Hold on.. you sure. I have been playing around with this function? Mostly experimenting on graph plotter.... Sorry it is so small, need to click on it.

9. ## Re: domain and range function?

Originally Posted by rodders
Hold on.. you sure. I have been playing around with this function? Mostly experimenting on graph plotter.... Sorry it is so small, need to click on it.

You are right. I was thinking of homeomorphisms. I remembered the exercise, but forgot the nature of the functions involved. Looks like you found one. And take away the square for $\sin x$ and you found an example for the original question.