Dynamical equations involving step functions This is not a specific problem, but a question about the application of a theory. We have these equations of the form $dx/dt=f(x_t)$ where a given point $x$ moves along some path over time. 
I am currently facing a modelling problem where $x(t)$ is a sequence of step functions: $x(t)$ takes the value of the constant $c$ in some period $(t_k,t_{k+1})$ and takes another value from $t_{k+1}$ based on the dynamic evolution. I am mainly interested in the stability notions of dynamical systems (Lyapunov, uniform, etc). 
The step functions I have in my equation are semi-differentiable only, so it may not be mathematically appropriate to describe them by $dx/dt$. Is there any other way to adapt the usual results involving differential equations and to use them for such $x$?
PS: I do not want to transform to a discrete system, because I am typically interested in the rate of convergence - which depends upon the exponent.
 A: The usual way to deal with non regular functions $f$ is to define a solution $x$ of such a differential equation as any function such that, for every $t$ in a suitable interval around the initial time $t_0$,
$$
x(t)=x(t_0)+\int_{t_0}^tf(x(s))\mathrm ds.
$$
As an example, if $f$ is the integer part and $x(0)=1$, one gets
$$
x(t)=n+(n+1)\cdot(t-H_n),
$$
for every $t$ in the interval $[H_n,H_{n+1}]$, where $H_0=0$ and $H_k=\sum\limits_{i=1}^k\frac1i$ for every $k\geqslant1$. 
One sees that the function $x$ is differentiable everywhere except at the time points $(H_n)_{n\geqslant1}$, when the function $x$ crosses an integer and the function $t\mapsto f(x(t))$ is discontinuous.
A: It seems to me that what you are looking at is a discrete dynamical system: if $x(t) = c_k$ for $t \in (t_k, t_{k+1})$, then $c_{k+1} = f(c_k)$ for some function $f$. 
A: Try replacing your step functions with alternative representations like 
$\frac{1}{1+e^{-\lambda x}}$
in the limit of $\lambda$ tending to infinity. This might make you eqns. more workable.
Also consider the fourier series representation of the step function. If infinite terms are bothering you then go for a discrete time fourier series (though it might not be a good choice as this will result in a kind of sinusoidal overfitting and the dynamical system will go all haywire). Also you have to limit your analysis to some periodic interval. If you can handle integrals well, I would suggest the use of the fourier transform of the step, as this will extend your analysis to the domain of all real numbers. 
