Mathematical modeling of dynamic systems