1
$\begingroup$

I am looking for a function $f(x)\in[0,1]$ when $x\in(−\infty,+\infty)$.

I bumped up on this question (A function $f(x)$ that increases from $0$ to $1$ when $x$ increases from $-\infty$ to $\infty$.) when I searched for it but the only difference here is the rate of increase.

$f(x)$ should increase slowly when $x$ starts from $−\infty$ until $0$, should increase fast once $x$ crosses zero and then the rate should keep on decreasing fast eventually approaching $1$ when $x$ is $\infty$.

$\endgroup$
  • $\begingroup$ Please read this tutorial on how to typeset mathematics on this site. $\endgroup$ – N. F. Taussig Dec 24 '15 at 14:28
  • $\begingroup$ "the rate should keep on decreasing fast": I am afraid this is not possible. $\endgroup$ – Yves Daoust Dec 24 '15 at 14:35
2
$\begingroup$

The common logistic function $$f(x) = \frac{1}{1+e^{-x}}$$ has the desired limits. We can add some parameters to manipulate it's exact growth rates around 0. We can take $$g(x) = \frac{1}{1+e^{-m(x-a)}}$$ and then play around with $m$ and $a$ until we get desired values. The bigger $m$ is the steeper the rise from 0 to 1 will be. And $a$ will be the center point of the rise.

I've set up a calculator at desmos where you can play around with the function.

| cite | improve this answer | |
$\endgroup$
1
$\begingroup$

$f(x)=\frac{x}{\sqrt{1+x^2}}$ goes to $(-1,1)$, so you can rescale it to make it go to $(0,1)$: $$g(x)=\frac{1}{2}\left(1+\frac{x}{\sqrt{1+x^2}}\right)$$

The function $f$ has a geometric interpretation. Take the point on the unit circle that intersects the ray from $(0,0)$ to $(x,1)$. Then take the $x$ value of that point. I forget the name of this projection.

Another such function is: $$\arctan x$$ which sends $(-\infty,\infty)$ to $(-\pi/2,\pi/2)$, so again you'd have to rescale.

You can possibly find more examples by looking for cumulative distribution functions on the real line. Such functions can be seen as describing a way to pick a random real number.

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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