Mathematical modeling of systems