Function to apply to a linearly increasing positive real number to reach an arbitrary limit I've got a friend who is making a browser game and he's trying to figure out how to make a function that acts like a logarithm in that it returns higher values quickly but eventually mellows out and reaches a limit.

For example, say someone invests "points" into a characters speed. This person should get less and less speed boost for every point they put in. 1 point gives maybe .10 back as a direct modifier on speed things (this character would now be 10 percent faster than other characters with no points).  2 points might give back .19 total(.1 + .09), 3 would be .26 total(.1 + .09 + .07), etc (only an example, not the expected results).

Is there a way someone can help us understand a good way to come about this so that we can play with the numbers a bit and tweak bonuses for balance?

I have a feeling someone will have to help me with tags and whether this is the right place to ask this question :)
You mention log but I think a reflected and shifted exp function might work better for what you describe. For example 

$$f(x)=1-e^{-x}$$ 



More generally you may vary this idea introducing and adjusting some parameters, say $a,b,c$ and consider the function 

$$f(x)=a-b e^{-c x}$$
A logarithmic function will do. In fact, any increasing, concave-down function will do. That is, the function must have a positive but decreasing derivative. See Diminishing Returns.

I'm not here to give you an exact function. You'll have to tweak it yourself to get the numbers right. However if you start with $f(x) = \ln(x)$ and provide necessary transformations (translations, dilations, etc.) then you should be able to tweak it as necessary.

Go to Desmos.com, type in
$$ y= a \ln (bx - h) + k $$
and add sliders for $a$, $b$, $h$, and $k$. Play around with them and see what happens.



I might add that if you're looking for a linear decrease in returns, your function must be quadratic. For example, if your returns are
$$ 1.0, 0.9, 0.8, 0.7, \dots $$
then this means your function's derivative is decreasing at a constant rate (it is linear) so your original function must be of the form
$$ y = ax^2 + bx + c $$
where $a &lt; 0$.