What Function Has All Real Numbers as Domain and Range [0,1]?

  • Context: Undergrad 
  • Thread starter Thread starter cahiersujet
  • Start date Start date
  • Tags Tags
    Function
Click For Summary

Discussion Overview

The discussion revolves around identifying functions that have all real numbers as their domain while restricting their range to the interval [0,1]. Participants explore various types of functions and their characteristics, including piecewise functions and periodic functions.

Discussion Character

  • Exploratory
  • Technical explanation
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • One participant asks for a function with a domain of all real numbers and a range of [0,1].
  • Another participant suggests that if the function is an identity function, it could be expressed as "y=x for all x from 0 to 1," and mentions piecewise functions as a possibility.
  • Multiple functions are proposed, including f(x) = x - floor(x) and g(x) = ceiling(x) - x, noting their relationship where f(x) + g(x) = 1 under certain conditions.
  • Additional examples include h(x) = |sin x|, i(x) = |cos x|, j(x) = (sin x)^2, and k(x) = (cos x)^2.
  • A family of functions is introduced with (l_n)(x) = exp(-x^2n) for any even integer n, and (m_q,n)(x) = x^n / (q+x^n) for any even integer n and positive real number q.
  • One participant proposes a function n(x) that equals 0.5 for rational x and 1.0 otherwise, and another function o(x) related to probabilities, questioning its closed-form solution and base case.
  • A later reply humorously dismisses the complexity of the last question, suggesting that the only such function is o(x) = 1.

Areas of Agreement / Disagreement

Participants present multiple competing views and examples of functions that meet the criteria, indicating that there is no consensus on a single function or approach.

Contextual Notes

Some functions proposed depend on specific definitions of floor and ceiling functions, and the discussion includes speculative elements regarding the closed-form solution for the probability function.

cahiersujet
Messages
5
Reaction score
0
What function has a domain consisting of all real numbers and a range from [0,1]?
 
Physics news on Phys.org
what kind of functions is it?

for example, if its an identity function, you can say "y=x for all x from 0 to 1"

also, if its a piecewise function, you can say "sin(x) for all x from 0 to pi, and sin(-x) for all x from pi to 2pi"I`m just answering the question for fun, and sure to help u; but wait others for more reliable answers
 
There are many you can define.

f(x) = x - floor(x) is one.
g(x) = ceiling(x) - x is another.

(notice that f(x) + g(x) = 1, except perhaps in the case of x an integer, depending on the particular definitions of floor and ceiling you're using).

Other examples?

h(x) = |sin x|
i(x) = |cos x|
j(x) = (sin x)^2
k(x) = (cos x)^2

Not feeling like a periodic answer?

(l_n)(x) = exp(-x^2n), for any even integer n, defines a family of such functions.

(m_q,n)(x) = x^n / (q+x^n), for any even integer n and any positive real number q

Looking for something more exotic?

let n(x) be the function which equals 0.5 if x is rational, and 1.0 otherwise.

let o(x) be the function which gives the probability of two events both occurring if they are independent and have probabilities o(x/2) and o(2x).

(just for fun, could somebody find a closed-form solution for this last function, if there is one? does it make sense, or is it missing a necessary "base case"? one can tell that that o(0) = 1, but... can the rest be found uniquely?)

So, in response to the OP's question... pick your favorite.
 
Lol, nevermind about that last question.

It turns out the only such function is o(x) = 1...
 

Similar threads

  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 28 ·
Replies
28
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
Replies
2
Views
1K
  • · Replies 18 ·
Replies
18
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K