functions that jump from zero to value k and then decay back to zero

67 Views Asked by At

I am looking for functions that are zero for all $x< a$ and then from a suddenly jump to a specified value $K$ and then drop back to zero either quickly or slowly and perhaps even not necessarily always decreasing for $x > a$ (I mean it could modulate up and down but still finally reach $0$. I want to find several categories of such functions. Does anyone have any ideas? I am not even sure what tags this question could have. Thanks.

1

There are 1 best solutions below

0
On

As has been said by A.G., there are a lot of functions like that (in fact, an infinite amount), though one particular form that came to mind was

$$f(x) = K\cdot\theta(x-a)e^{-\frac{x-a}{\tau}}$$

where $\theta(x)$ is the Heaviside/step function, and $\tau$ is a parameter for how fast your function will decay. If you want oscillations, two possible candidates would be

$$g(x) = K\cdot\theta(x-a)\cdot \cos\left(\frac{x-a}{\gamma}\pi\right)e^{-\frac{x-a}{\tau}}$$ or

$$h(x) = K\cdot\theta(x-a)\cdot \left(\xi\cos\left(\frac{x-a}{\gamma}\pi\right)e^{-\frac{x-a}{\lambda}}+1\right)e^{-\frac{x-a}{\tau}}$$

where $\gamma$ is a parameter for the frequency of the oscillations, $\lambda$ a parameter for the decay of the oscillations, and $\xi$ a parameter for the strength of your oscillations. $g(x)$ will decay but also fluctuate around $0$, while $h(x)$ will have fluctuations 'around the decay' that die out.

Here is an example of $h(x)$ made with Wolfram:

g(x) from x = 2 to 30

You could tweak $g(x)$ further if you'd like, for example, adding a parameter that slows down the frequency of the oscillations.