Function inverse mapping [0, +inf) to [0, 1) I have a measure ($x$) which the domain is $[0, +\infty)$ and measure some sort of variability. I want to create a new measure ($y$) that represents regularity and is inverse related to $x$.
It is easy, just make $y = -x$. However I want this new measure to be positive, to make it more interpretable. Linearly, it is impossible, because I would have to map 0 to $+\infty$. However I can create a non-linear measure that follows:
$$
f(x) = y
$$
$$
f(0) = 1
$$
$$
x \to +\infty => y \to 0
$$
The logarithmic transformation almost do this, but it does not inverse the relation. What function would do this mapping?
Would be interesting if I could set a "precision", like if $x > 100$, the step in $f(x)$ can be smaller than 0.01.
 A: Try something like $y=f(x)= \dfrac{1}{1+x}$.
This has the properties:


*

*$f(x)$ decreases as positive $x$ increases 

*$f(0)=1$

*$f(1)=\frac12$

*$f(x)\lt 0.01$ for $x \gt 99$ and so also for $x \ge 100$

*$f(x) \to 0$ as $x \to +\infty$


Its inverse is $x=g(y)=\dfrac{1}{y}-1$. 
A: Try more generally: $$ y = f_a(x) = (1+x^a)^{-1/a} , a \in R^+ $$
For example: $$ f_3(x) = \frac {1} {\sqrt[3]{1+x^3}} $$
$$ f_1(x) = \frac {1} {1+x} $$
$$ f_{5/3}(x) = \frac {1} {\sqrt[5]{(1+x^{5/3})^3}} $$
The previous functions have a polynomial decrease. If you want an exponential decrease from 1 to 0 you can use the hyperbolic tangent.
$$ f(x) = 1 - \tanh(x) $$
A: As Angel Moreno has noted, we can use $1-\tanh x$. Of course, that also means we can use $1-\tanh^2 x=\operatorname{sech}^2 x$, which in turn means we could instead use $\operatorname{sech} x$.
To be even more general, let $F$ denote your favourite cumulative distribution function of support $[0,\,\infty)$; maybe it's the $\lambda=1$ exponential, viz. $F=1-e^{-x}$. Then $1-F$ will do nicely. Or if you can only think of a support-$\mathbb{R}$ choice for $F$, just use $1-F(\ln x)$ instead. For example, my previous suggestion couldn't use a normal $F$, but it could use a log-normal one.
