Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I'm stuck on a mathematical problem in a small feature I'm building for a website. I need a function that starts out with exponential growth and than levels out as x grows. I've drawn this wonderful picture to communicate what I'm looking for since my math lingo isn't the best.

Any help appreciated.

curve

share|improve this question
add comment

2 Answers

up vote 20 down vote accepted

I think you want a sigmoid function.

share|improve this answer
    
Thanks, solved my problem :) –  Oscar Kilhed Jun 15 '11 at 12:44
    
Use these all the time for programming, easiest to use are logistic and atan –  BlueRaja - Danny Pflughoeft Jun 15 '11 at 17:35
    
You say "starts out with exponential growth", so you want the logistic function. –  starblue Jun 15 '11 at 20:13
add comment

Perhaps you are looking for something like ${\rm erf}(x-2)+1$, where erf is the error function, ${\rm erf}(x) = \frac{2}{{\sqrt \pi }}\int_0^x {e^{ - t^2 } dt} $. You can use WolframAlpha to watch the graph: plot $f(x)={\rm erf}(x-2)+1$, say from $0$ to $5$. Further see Wikipedia's plot of the error function, here, to understand the reason for choosing ${\rm erf}(x-2)+1$.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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