  We present a method for the approximate propagation of mean and covariance of
a probability distribution through ordinary differential equations (ODE) with
discontinous right-hand side. For piecewise affine systems, a normalization of
the propagated probability distribution at every time step allows us to
analytically compute the expectation integrals of the mean and covariance
dynamics while explicitly taking into account the discontinuity. This leads to
a natural smoothing of the discontinuity such that for relevant levels of
uncertainty the resulting ODE can be integrated directly with standard schemes
and it is neither necessary to prespecify the switching sequence nor to use a
switch detection method. We then show how this result can be employed in the
more general case of piecewise smooth functions based on a structure preserving
linearization scheme. The resulting dynamics can be straightforwardly used
within standard formulations of stochastic optimal control problems with chance
constraints.
