I'm looking for a function y = f(x) that grows quickly at first, and slowly later, asymptotically approaching 100.
I need it to hit certain specific points...
What I need is:
f(0) = 0
f(10) = 70
f(20) = 100
f( > 20) = 100 - I can cap this manually by capping the input, if necessary
f( < 0) = I don't care, it'll never happen in my use case
I know this probably should take the shape of:
y = 100 - e ^ (-ax + b)
Or something like that, but I have no idea how to find out the right coefficients to get it to have the shape I need.
Thank you!
Daniel

Let's construct an interpolating polynomial with the conditions:
Since you want to set $f(x) = 100$ for $x > 100$ this condition will make it differentiable in $20$:
Also let $0$ be the point with the maximum growing rate. (This is just a guess and depends and what you really mean with "grows quickly at first". If you drop this condition then a polynomial of degree 3 will work. Comparison with bubbas answer: $f''(0) = -\frac{1}{10} \neq 0 $ is not even visible to the eye. )
Any polynomial that satisfies all this must at least have degree 4. So a sufficient approach is:
$ f(x) = a x^4 + b x^3 + c x^2 + d x + e $
$ f'(x) = 4a x^3 + 3b x^2 + 2cx + d $
$ f''(x) = 12a x^2 + 6b x + 2c $
With our conditions that leads to this system of linear equations:
$ \begin{pmatrix} 0 & 0 & 0 & 0 & 1 \\ 10000 & 1000 & 100 & 10 & 1 \\ 160000 & 8000 & 400 & 20 & 1 \\ 32000 & 1200 & 40 & 1 & 0 \\ 0 & 0 & 2 & 0 & 0 \\ \end{pmatrix} \begin{pmatrix} a \\ b \\ c \\ d \\ e \end{pmatrix} = \begin{pmatrix} 0 \\ 70 \\ 100 \\ 0 \\ 0 \end{pmatrix} $
The solution is:
$ f(x) = 0.0000625 x^4 - 0.008125 x^3 + 7.75x $
Lastly, to address the approach suggested in the question: $ f(x) = 100 - e ^{-ax + b} $ will not work, because it will never actually reach 100.