Mathematical modeling of electrical activity of the heart