I was wondering if it's possible (and if so, how would you go about it) to write an explicit function for the position of a ball bouncing as a function of time (assuming a coefficient of restitution 0 < e < 1). It's certainly possible to find its location in time iteratively with small time steps, but I'm looking for a more elegant solution (i.e. can we write y(t) = ?
and then plot just that function to see several bounces?). It seems challenging because you need some kind of periodic behavior, but the period changes with each bounce. I'm trying to do this without piecewise functions.
Let's consider just the one-dimensional case here, where the ball bounces straight up and down.
Note that I don't mean just calculate the enveloping function of its height like this...I think this is related to the solution I'm after, but not the whole thing.
Answer
Assume that after each bounce the velocity decreases in a factor $\xi\in(0,1)$. This means: if the velocity before hitting the floor is $\dot y$, then the velocity after hitting it will be $\xi \dot y$.
Let $y(0)=0$ be the initial height and $\dot y(0)=v_0$ be the initial velocity. We choose the units so that $g=1$ and $v_0=1/2$, where $g$ is the gravitational acceleration.
Define $$ k(t)=\left\lfloor\log_\xi\!\bigg((\xi-1)t+1\bigg)\right\rfloor $$ where $\lfloor\cdot\rfloor$ is the floor function ($k(t)$ is just the number of bounces after a time $t$)
With this, the height at a time $t$ is given by $$ y(t)=\frac{1}{2}\xi^{k(t)}\left(t-\frac{\xi^{k(t)}-1}{\xi-1}\right)-\frac{1}{2}\left(t-\frac{\xi^{k(t)}-1}{\xi-1}\right)^2 $$
For example, if we take $\xi=0.9$ we get
Explanation
I'm just using the basic formula $$ y(t)=v\ (t-t_0)-\frac{1}{2}g(t-t_0)^2 $$ of parabolic motion. In this case, the initial velocity of each bounce is different, so $v=v(t)$. It is easy to see that before the first bounce we have $v=1/2$. After the first bounce we have $v=\xi/2$, then $\xi^2/2$, $\xi^3/2$, etc. In general, $v(t)=\frac{1}{2}\xi^k$, where $k$ is the number of bounces at a time $t$.
On the other hand, the time-origin $t_0$ also changes with time: before the first bounce we have $t_0=0$, after the first bounce, $t_0=1$, then $t_0=1+\xi$, $t_0=1+\xi+\xi^2$, etc. In general, $$ t_0=\sum_{i=0}^{k-1} \xi^i=\frac{\xi^k-1}{\xi-1} $$
In the general case $g\neq 1$, $v_0\neq 1/2$ the number $k(t)$ is $$ k(t)=\left\lfloor\log_\xi\!\bigg((\xi-1)\frac{gt}{2v_0}+1\bigg)\right\rfloor $$ so that $$ y(t)=v_0\xi^{k(t)}\left(t-\frac{2v_0}{g}\frac{\xi^{k(t)}-1}{\xi-1}\right)-\frac{1}{2}g\left(t-\frac{2v_0}{g}\frac{\xi^{k(t)}-1}{\xi-1}\right)^2 $$
Minimal Mathematica code to plot $y(t)$ for $g=1$ and $v_0=1/2:
\[Xi]=.9;
k[t_]:=Floor[Log[\[Xi],(\[Xi]-1)t+1]];
y[t_]:=1/2\[Xi]^k[t](t-(\[Xi]^k[t]-1)/(\[Xi]-1))-1/2(t-(\[Xi]^k[t]-1)/(\[Xi]-1))^2
Plot[y[t],{t,0,4.2},PlotRange->All]
No comments:
Post a Comment