solving a differential equation with jumps