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 need a function which initially falls slowly, then quickly and then slowly again.

Shape should be like tan but I want to be able to control the gradient

Properties needed:

$x = 0, y=0$

As $x$ increases $y$ decreases

As $x \rightarrow \infty$, $y \rightarrow -1$

(No definition for negative $x$ needed)

share|improve this question
    
Did you try searching before asking? Even the Wikipedia has a page about similar functions, you would need to do just a small modification. –  dtldarek Jan 9 '13 at 19:07
    
Thanks for pointing to that page . my math skills are non-existent. I know I would need to tweak that sigmoid function, but I have no other option but trial and error :/ –  arahant Jan 9 '13 at 19:10
1  
Your description does not match tan. Perhaps you need to post a picture. –  Maesumi Jan 9 '13 at 19:18
    
@Maesumi Perhaps a generic S shape curve is a better description. See the sigmoid function link posted by dtldarek –  arahant Jan 9 '13 at 19:24

2 Answers 2

up vote 1 down vote accepted

$$y = e^{-ax}-1$$ $$y = \dfrac{1+e^{-ab}}{1+e^{a(x-b)}}-1$$ should do the job. You can play with the factor $a$ to control the gradient.

share|improve this answer
    
@RahulNarain Thanks. Updated. –  user17762 Jan 9 '13 at 19:28
    
Thanks, the 2nd one works nicely –  arahant Jan 9 '13 at 20:23

You can build on sample formulas on the wiki page you mentioned. For example $y=-kx/\sqrt{1+(kx)^2}$ for different values of $k$.

share|improve this answer

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.