Suppose I have the variable $t$ that represents the time, it starts in $0$ and increases infinitely.
My goal is to define a function $p(t, L, R)$ that acts like a pendulum:
- At $t = 0$, it is $0$
- At $t > 0$, it starts the pendulum movement:
- first it goes $L$;
- then it goes to the opposite site but walking a bit less;
- it continues until it goes to $0$.
I know that $sin(t)$ gives me a function that cross the $t$ axis regularly, but this function decreases the space between $2$ crossings, as if $t$ was being multiplied by something that is also increasing (it looks like $L \times sin(t^2))$.
As the peaks of the function get closer to $0$ over time, it seems like the function is also divided by something that is also increasing (something like $\frac{L * sin(t^2)}{t}$).
Anyway this isn't working so I'd like to know some approaches to get a function that looks like this.

What about $$Le^{-t}\sin (t^2)$$
The factor $e^-t$ makes the amplitude to decrease with time and eventually approaches to zero.