simple (tan like shape) function needed

1.1k Views Asked by At

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)

2

There are 2 best solutions below

2
On BEST ANSWER

$$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.

0
On

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$.