Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The other day while doing a sort of mathy/arty animation I wanted a real-valued function over the open interval (0,1) of a single variable. Any function would have done. I just needed some values to animate the object I was working with. (At the same time, there were virtually no restrictions on what values I could use, due to the way I was plugging them in.) I found myself wanting an online reference where I could just search through functions by categories such as domain, range, interval, et cetera. I know there are some general all-purposes references like Mathworld and DLMF. But what I need is a bit simpler (I feel there's actually too much information in those resources) and would have a smoother interface. Does such a thing exist?

share|cite|improve this question
"search through functions by categories such as domain, range" - huh? Given a domain and range, loads of examples can be made, so I'm not sure about the practicality... – J. M. Aug 15 '11 at 8:45
It seems that you have some ideas how the graph of your function should look like. Put up a sketch or give us a verbal description, and maybe we can help you. – Christian Blatter Aug 15 '11 at 9:21
"Any function would have done." Then it's not a very difficult problem! Take for example $f(x)=0$ (defined for $0<x<1$). ;) – Hans Lundmark Aug 15 '11 at 11:09
up vote 5 down vote accepted

It can be useful to know a few basic ways to continuously map various subsets of the reals to each other. Other maps can then be constructed by combining these basic functions. A simple "toolbox" of useful functions might include:

  • $x \mapsto \exp(x)$ maps $(-\infty, \infty)$ to $(0,\infty)$. Its inverse is $x \mapsto \log(x)$.
  • $x \mapsto \arctan(x)$ maps $(-\infty, \infty)$ to $(-\pi/2, \pi/2)$. Its inverse is $x \mapsto \tan(x)$.
  • Mapping $(a,b)$ to $(0,1)$ is easily accomplished by the affine map $x \mapsto \frac{x-a}{b-a}$. Its inverse is $x \mapsto a + (b-a)x$. These can be combined to map arbitrary intervals to each other.

All of these maps are continuous and strictly increasing, making them orientation-preserving homeomorphisms. The map $x \mapsto 1/x$ is also sometimes useful, for instance as an orientation-reversing self-homeomorphism on $(0, \infty)$ (where the usual $x \mapsto c-x$ won't work).

Of course, there are plenty of other functions that can be used as equally versatile building blocks; merely specifying the domain and range of a function leaves plenty of room for variation, even if one insists on continuity and invertibility.

share|cite|improve this answer
wow! that's the sort of toolbox i needed. you really read my mind. – ixtmixilix Aug 17 '11 at 9:55

This may not be strictly speaking an answer to the question you want to ask, but is an answer to the question you did ask: in short, such a reference is impossible to produce if you want it to be in any way exhaustive.

The problem is: there are too many possible choices of domain. And there are too many possible choices of functions for a given domain.

Let us just say that the domain of your function in this proposed reference list can be taken to be any subset of the real numbers. This means that the collection of all possible domains is the power set of the real numbers. The number of possible domains is thus uncountably infinite, which means that there are in fact so many possible domains, that it is mathematically impossible to list them all!

Similarly, even if you fix the domain to be just a simple one like $(0,1)$, because the domain itself contains uncountably many points, you also have uncountably many degrees of freedom in prescribing an arbitrary function, as soon as the range contains at least two elements. (And the case where the range contains only one element is boring, since there is only one function from any domain into a set of only one element.) (Also, the cardinality of the range should be smaller than that of the domain: if there are "more points" in the range than there are in the domain, you cannot find a function that is surjective to the appropriate range.)

Since you mention artistic purposes, for situations like this you probably already have in mind some criteria for the functions you are looking for besides just the domain and range. For example, I somewhat doubt that for the case of domain being $(0,1)$ and range being $\mathbb{R}$, you would be satisfied by something like the Conway base 13 function.

So a better way to go about it is to just ask around: creative pursuit is one thing that humans do better than computers. Why not post your query in our lovely Chatroom?

share|cite|improve this answer
+1: i like this answer quite a lot, as well, thank you. i need to learn to think like you next time i try to imagine how to do something, i guess. =) – ixtmixilix Aug 17 '11 at 9:56

While I don't know of any such tool, note that you may assume that both the domain and the range are $[0,1]$ or $[0,1)$ or $(0,1)$ because you can always compose with a linear change of variables to map any bounded interval to one of those or with arctangent if you need to consider the whole line.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.