An analysis is made of the energy balance in the dynamics of systems subjected to the time-dependent constraints. Lagrangian equations are completed by the so-called energetical equation that assures the energy balance. These equations are applied to the motion of the system in the potential and dissipative field, and they are illustrated by an example.