I come from a programming background and I can’t find a simple math function. The request might seem strange, but I needed it a graphical context to alter some points locations:
I need a function $f(x) = y$ defined for $x \ge 0$ such that:
- $f(x) \in [0, x)$
- $f(0) = 0$
- $f(x) \approx x$ as $x\to \infty$.
- It has to slowly grow at first — sort of like $x^2$ — and then get closer and closer to x.
The simplest equation form that satisfies this restrictions will do.
I tried to plot this so that I can make myself better understood:
http://www.wolframalpha.com/share/clip?f=d41d8cd98f00b204e9800998ecf8427eo8stqhpe1s

Actual values don’t matter, just the shape of the plot.
None of the basic functions (and combinations of them) that I tried were doing this (e.g. $x^2, \log x, \sqrt x, 1/x$).


This one fulfills your requirements: $$f(x)=\frac{x^2+x^3}{1+x+x^2}.$$ We have: $$\forall x>0,\ 0<f(x)<x$$ $$f(0)=0,$$ $$f(x)-x^2=-\frac{x^4}{1+x+x^2}$$ so that $f(x)$ and $x^2$ are very close for small values of $x$, and $$f(x)-x=-\frac{x}{1+x+x^2}$$ so that $f(x)$ and $x$ get closer and closer as $x\to+\infty$.
It's also cheap to compute with 2 additions, 2 multiplications and 1 division if you proceed thus: