In this paper we describe a new way to understand the formation of galaxies via the infall of baryonic matter (BM) and dark matter (DM) onto a pre-existing over density. Unlike BM, DM particles can fly through this area without being captured. In this case it is impossible to explain the existence of a dark halo around galaxies, which contains most of the mass of the galaxy. We propose a simple model for DM capture. If during the flight the mass of the galaxy has increased, then slow DM particles are captured by the galaxy, further increasing its mass, while faster particles slow down, transferring part of their energy to the galaxy.
This model allows to estimate the minimum initial velocity of a particle required for a passage without capture through the center of the galaxy and derive an nonlinear equation describing the rate of galaxy mass increase. An analysis carried out using the ideas of catastrophes theory shows that for intensive capture of dark matter, an increase in the mass of galactic baryonic matter is necessary, exceeding a certain threshold value. It may be associated with the accretion of matter or the merger of galaxies. Additionally, the density of intergalactic DM must exceed some threshold value. Then the rate of increase in the mass of DM can be much higher than the one of baryonic matter. The capture sharply decreases after the DM density drops below the threshold value due to expansion.