# What is this function?

This topic is 2680 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I'm trying to find a continuous 1-parameter function that transitions smoothly between f(x)=x on one extreme, and at the other extreme, f(0)=0 and f(1)=1...
Picture tying a string between (0,0) and (1,1) and then pulling the string from the midpoint towards the corner (0,1). Can anyone think of such a function?

##### Share on other sites
There are many such functions, such as a quadratic curve f(x)=x[sup]2[/sup] (or any power larger than 1) , a cosine shape f(x)=1-cos(x*pi/2), or a circular shape f(x)=1-sqrt(1-x[sup]2[/sup]) for example. Do you have any additional constraint on the shape of the curve to narrow down the options if these ones are not what you're looking for?

##### Share on other sites

I'm trying to find a continuous 1-parameter function that transitions smoothly between f(x)=x on one extreme, and at the other extreme, f(0)=0 and f(1)=1...
Picture tying a string between (0,0) and (1,1) and then pulling the string from the midpoint towards the corner (0,1). Can anyone think of such a function?

f_k(x) = x^k

has f_k(0) = 0 and f_k(1) = 1 for all k and f_1(x) = x and pointwise converges to the other function you describe for k->infinity.

edit: how do I make this latex stuff work? If I use the image tag is says I'm not allowed to use that image extension.

##### Share on other sites
Hidden

I'm trying to find a continuous 1-parameter function that transitions smoothly between f(x)=x on one extreme, and at the other extreme, f(0)=0 and f(1)=1...
Picture tying a string between (0,0) and (1,1) and then pulling the string from the midpoint towards the corner (0,1). Can anyone think of such a function?

<img src="http://www.codecogs.com/eq.latex? f_k(x) = x^k" />has f_k(0) = 0 and f_k(1) = 1 for all k and f_1(x) = x and pointwise converges to the other function you describe.

There are many such functions, such as a quadratic curve f(x)=x[sup]2[/sup] (or any power larger than 1) , a cosine shape f(x)=1-cos(x*pi/2), or a circular shape f(x)=1-sqrt(1-x[sup]2[/sup]) for example. Do you have any additional constraint on the shape of the curve to narrow down the options if these ones are not what you're looking for?

The key criterion that I have not found any function to satisfy yet is:

"Picture tying a string between (0,0) and (1,1) and then pulling the string from the midpoint towards the corner (0,1)"

In other words, the functions should look like the attached picture (poor drawing but you should get the idea):

##### Share on other sites
So my functions bent the curve to the wrong corner according to your picture, but that's just a matter of inverting them. Looks like you want the power function japro and I suggested, and you adjust k depending on how much you want the function to approach the corners. If k approaches 0, it is bent towars the upper left corner in your graph, and if it approaches infinity it is bent towards the lower right corner.

##### Share on other sites

So my functions bent the curve to the wrong corner according to your picture, but that's just a matter of inverting them. Looks like you want the power function japro and I suggested, and you adjust k depending on how much you want the function to approach the corners. If k approaches 0, it is bent towars the upper left corner in your graph, and if it approaches infinity it is bent towards the lower right corner.

Sorry, I guess I'm not explaining myself clearly enough. When I said "pulled from the midpoint towards (0,1)" I meant that the curves should be symmetric about the line X-1 for all parametric values.
The circle equation you gave is just a single function, it does not describe a parametric family of curves that includes the line f(x)=x.

I can think of a way to do this but it uses a Bezier spline segment, with vertices at (0,0) and (0,1), and then define a parametric path for the control points. ie, the parametric value could slide a reference point along the line X-1, and then the control points could be defined by the vector from this reference point to the starting vertex, with the length of this vector being a hard-coded value. I just feel like there has to be a simpler way to define this family of curves.[attachment=4967:funcs2.jpg]

##### Share on other sites
f_k(x) = 0.5*(x^k + 1 - (1-x)^(1/k)) maybe?

##### Share on other sites

f_k(x) = 0.5*(x^k + 1 - (1-x)^(1/k)) maybe?

Nice! Modified to fit the coordinate system I described,
f_k(x) = 1 - 0.5*((1-x)^k + 1 - x^(1/k))

It's not perfectly symmetric, but close enough for me!

##### Share on other sites
Hidden
you could use:

f_k(x) = (1-abs(x-1)^k)^(1/k)

for k = 1 -> infinity

These 'are' perfectly symmetrical: Examples

1. 1
2. 2
Rutin
19
3. 3
khawk
18
4. 4
5. 5
A4L
11

• 12
• 16
• 26
• 10
• 44
• ### Forum Statistics

• Total Topics
633767
• Total Posts
3013739
×