Can anyone suggest a non-piecewise function within the interval (0,1)?

  • Thread starter rbzima
  • Start date
  • Tags
    Function
In summary, a function that is contained in the open interval of (0,1) and is one-to-one and onto the set of all real numbers is tan(-pi/2+ pi x). This function covers all real numbers for x between -pi/2 and pi/2 and has a domain of (0,1).
  • #1
rbzima
84
0
I'm just wondering if anyone can think of a function that is contained in (0,1). I've been brainstorming for awhile and I can't think of anything particularly. Furthermore, it would be fantastic if it was not piecewise defined as well. Help would be appreciated!
 
Mathematics news on Phys.org
  • #2
what do u mean it is contained, that for any values of x the values of the function varie from y=0 to y=1 or what?
 
  • #3
I'm essentially looking for a function where x is contained in the open interval of (0,1). Someone suggested tan(x) might work, but I would rather not use trigonometric functions.
 
  • #4
You can give any function you think of, and then restrict the domain of the function to be (0, 1), like this:

f: (0, 1) --> R
x |--> x2 + x - 5

That means, your f now, is only defined in (0, 1), and undefined everywhere else.

Or, if you want some other nicer function, then square root is a function to look for:

In the reals, the function [tex]y = \frac{1}{\sqrt{-x(x - 1)}}[/tex] is only defined on the interval (0, 1), and undefined everywhere else.
 
  • #5
Sorry, I should have clarified. I'm trying to prove that there exists a function between (0,1) that is 1-1 and onto, therefore the range of this function must span all y values, and the domain is contained in (0,1).

For example, between (-1,1) f(x) = x/(x^2-1) works, but when I tried converting that into a form that is simply between (0,1), the inverse function looks exceptionally nasty! Using the inverse, I'm basically proving the function is onto, which in turn is proving that the (0,1) ~ R. Proving the function is 1-1 simply requires that the derivative is either always positive or always negative.
 
  • #6
One to one and onto? Onto what? If I were talking about a function with domain between 0 and 1 and said it was "onto" the reasonable assumption would be it was "onto" (0, 1). The function y= x does that nicely!

As for a function that is one-to-one and onto from (0, 1) to the set of all real numbers, I would think a variation on tan(x) would work nicely. tan(x) covers all real numbers for x between [itex]-pi/2[/itex] and [itex]\pi/2[/itex] so [itex]f(x)= tan(-\pi/2+ \pi x)[/itex] should work nicely: when x= 0, [itex]-\pi/2+ \pi (0)= -pi/2[/itex]. When x= 1, [itex]-pi/2+ \pi (1)= \pi/2[/itex]. Unless I have misunderstood what you are looking for, that should be exactly what you want.
 
  • #7
HallsofIvy said:
One to one and onto? Onto what? If I were talking about a function with domain between 0 and 1 and said it was "onto" the reasonable assumption would be it was "onto" (0, 1). The function y= x does that nicely!

As for a function that is one-to-one and onto from (0, 1) to the set of all real numbers, I would think a variation on tan(x) would work nicely. tan(x) covers all real numbers for x between [itex]-pi/2[/itex] and [itex]\pi/2[/itex] so [itex]f(x)= tan(-\pi/2+ \pi x)[/itex] should work nicely: when x= 0, [itex]-\pi/2+ \pi (0)= -pi/2[/itex]. When x= 1, [itex]-pi/2+ \pi (1)= \pi/2[/itex]. Unless I have misunderstood what you are looking for, that should be exactly what you want.

You are pretty much the man! Thanks a whole heap. And yes, I was looking for a 1-1 correspondence between (0,1) and R. I might have neglected to mention that.
 

FAQ: Can anyone suggest a non-piecewise function within the interval (0,1)?

What is a function?

A function is a reusable block of code that performs a specific task. It takes in inputs, performs operations, and produces outputs, making it a fundamental building block of programming.

How do you define a function?

To define a function, you use the "function" keyword followed by the name of the function and a set of parentheses. Inside the parentheses, you can specify any parameters that the function will take in. After the parentheses, you use curly braces to enclose the code that makes up the function.

What is the difference between parameters and arguments?

Parameters are the variables that are used as placeholders for the values that will be passed into a function. Arguments are the actual values that are passed into the function when it is called. Parameters are defined when the function is created, while arguments are specified when the function is called.

How do you call a function?

To call a function, you simply use the function's name followed by a set of parentheses. Inside the parentheses, you can pass in any arguments that the function requires.

What is the return statement in a function?

The return statement is used to specify the value that a function will produce and send back to the code that called it. It is typically the last statement in a function and is used to terminate the function's execution and return the specified value.

Similar threads

Replies
23
Views
8K
Replies
6
Views
2K
Replies
1
Views
1K
Replies
1
Views
1K
Replies
8
Views
1K
Replies
2
Views
2K
Replies
11
Views
2K
Back
Top