# nonlinear ODE's involving heaviside step functions: The bouncy ball as an example

The dynamical equation for a ball bouncing on a plate (located at $$x=0$$) can be represented as $$\ddot{x}(t) = -g - (k_1 x + k_2 \dot{x})H(-x),$$ where $$H(x)$$ is a heaviside step function and the collisions between the ball and the plate are represented with a spring-dashpot model. I would like to solve this equation for $$x(0) = x_0$$ and $$\dot{x}(0) = v_0$$. One can solve this by calculating the velocity and time of the first collision, evaluating the Newtonian dynamics during the collision, then repeating this process iteratively through collisions. Obviously the resulting piecewise trajectory would be something like the following:

This approach is somewhat unsatisfactory because I would ideally like to solve for the trajectory $$x(t)$$ at any arbitrary time, and this approach only yields a piecewise solution. A priori I do not know how many collisions have occurred up to a given time at which $$x(t)$$ is desired, so I would need to iterate an arbitrary number of times to find a solution.

I wonder if there are specialized approaches to solve such ordinary differential equations analytically. The above equation is nonlinear and defined only in the sense of a distribution (since $$H(x)$$ is not exactly a function). Clearly the solution exhibits discontinuities. Are there any approaches I might read about to better understand such equations or solve such equations with more powerful tools than piecewise integration?

• Have you solved the Newtonian dynamics during the collision?
– Sal
Aug 8, 2021 at 7:28
• Provided $k_1$ is large enough to neglect $g$, it's just a damped harmonic oscillator during collision until $x$ hits $0$ again. Aug 8, 2021 at 7:32
• Wouldn't it take infinitely many bounces to stop in an idealized model such as this? Aug 8, 2021 at 23:08
• yes @Eli. That's not an issue as far as I'm concerned. such approaches are regularly used to describe granular materials for example icevirtuallibrary.com/doi/10.1680/geot.1979.29.1.47 Aug 8, 2021 at 23:49
• @kevinkayaks That is true, for any given bounce. But compare the time spent below the axis in one bounce: $T_-=\pi/\sqrt{k_1-k_2^2/4}$ (constant) to the time spent above the axis $T_+=2v_0/g$ where $v_0$ is the velocity at the beginning of that bounce. Since $v_0 \to 0$ for large $t$, there will always be a time beyond which $T_-$ is not negligible compared to $T_+$
– Sal
Aug 10, 2021 at 20:30

parms = {g -> 9.81, k1 -> 1, k2 -> 0.1, x0 -> 10, mu -> 0.95}