Monotonic function that multiply input by a factor but is limited to (0,1) in both input and output.

17 Views Asked by At

I want to construct a monotonic function that takes two inputs:

  • a number between 0 and 1 (input)
  • a factor (a)

It should have f(0)=0 and f(1)=1

The output is the input times the factor a but limited by the "headroom" between the input and 1. So for numbers approaching 0 it would be the input number times the factor. So for an input of 0.001 and an factor of 2 the output should be just shy of 0.002 because the "headroom" is 0.999. For input numbers approaching 1 the output should also approach 1.

I have a solution that works for factors between 0 and 2:

(a-1)*(1-(x))+x

This solution follows from the logic that only the headroom should be multiplied by the factor.

But when the factor is above 2, the function is not monotonic anymore and the output goes above 1 for some input ranges.

Another solution is a power function:

x^(1/a)

Here the output is between 0 and 1 for inputs of 0 and 1. But here the factor isn´t directly linked to the growth.