The principle of energies summation of an arbitrary system sets the order of inclusion of various types of energy, associated with the system, into energy functions that describe the state of the system. Energy summation is most frequently used in theoretical physics, where the principle of least action is used, the total energy of systems is calculated and the law of energy conservation is taken into account. The principle of energies summation on the one hand is a methodological principle, but on the other hand – is the result of complexity of systems, consisting of matter in different states, and of the fields available in these systems. The complexity increases due to the motion of matter and fields during transitions of matter from one phase state to another, and during transformation of energies of fields and matter into each other. Energy functions have different meaning depending on their purpose. To estimate the change in the total energy of the system we need to take into account that some components increase energy, and others reduce it, which leads to different signs before the energy components. If the energy functions are used to find the equations of motion, the signs before the energy components are chosen according to the condition of conforming to the equations of motion of matter and fields. As a result, for each energy function its own order of energies summation is used.
o 1.6.1 Einstein-Hilbert equations
o 1.6.2 Equations of CTG
To calculate the energy functions in thermodynamics such physical quantities are used as pressure , volume , absolute temperature , heat capacity , mass , amount of substance . These quantities can be well measured, in contrast to entropy , chemical potential , amount of heat , which are characteristic of the substance. Internal energy and its increment for multiphase substance in a quasi-static process are given by:
where is the increment of the amount of heat, is the work done by the system, is the number of substance phases, is the work done on the system.
Besides the internal energy in thermodynamics there are other energy functions associated with it, such as Helmholtz free energy:
Accordingly, the increment of the Helmholtz free energy is:
Enthalpy and its increment are as follows:
Gibbs free energy and its increment:
Grand thermodynamic potential and its increment:
Bound energy and its increment:
Two thermodynamic potentials and their increments are also possible:
The order of addition of energy components is of such kind that we obtain the corresponding thermodynamic potential, which has its own meaning. Thus, the internal energy reflects the law of energy conservation, and the change in the Helmholtz free energy in an isothermal process is determined only by the difference in the work done by the system on the environment and by the environment on the system.
Many relations of thermodynamics hold well not only for gas, but also for fluids and substance in the solid state.
One of the ways to find the equations of motion of systems and the laws of their existence is variation of the action functional, that is, variation by different variables of the time integral of Lagrangian, in order to determine the extreme and most probable states. Lagrangian consists of several energy components, which in mechanics are either part of kinetic energy or of potential energy . In order to find the Lagrangian in mechanics the difference between the kinetic and potential energies is written as follows:
It is generally assumed that the Lagrangian depends only on time, coordinates and velocities, but does not depend on the higher time derivatives.
Since each mechanical system itself is a source of field, in general case a term is added in the right side of the equation which is associated with the energy of this field. In special relativity, the Lagrangian of a particle with mass and charge in an electromagnetic field has the following form: 
where is the speed of light, is the spacetime interval, is the electromagnetic 4-potential with lower (covariant) index, is 4-displacement vector of the particle, is the electric constant, is the electromagnetic field tensor, is the 4-volume, is the velocity of the particle, and are scalar and vector potentials of the electromagnetic field, respectively, and are electric field strength and magnetic induction, respectively.
In this case, the Lagrangian includes three components with dimension of energy, which are associated with the relativistic energy of the particle, with the energy of the particle in the electromagnetic field, and with the electromagnetic field energy. The expressions for the energy components and the signs before them are chosen so that by varying the action functional we would obtain the equations of the particle’s motion in the field and Maxwell's Equations for field strengths.
Similarly, the Lagrangian is written for a single particle in the gravitational field in Lorentz-invariant theory of gravitation: 
where is the speed of gravitation, close to the speed of light, is the gravitational four-potential with lower (covariant) index, is the gravitational constant, is the gravitational tensor, and are scalar and vector potentials of the gravitational field, respectively, and are the gravitational field strength and the gravitational torsion field, respectively, and the mass not only takes into account the sum of nucleons masses of matter, but also the contribution of mass-energy of fields interacting with the matter and changing particle mass.
After varying the action functional we obtain the equations of motion of the particle in the gravitational field and Maxwell-like gravitational equations for the gravitational field strength and the torsion field. To use the Lagrangian in any frames of reference, it should be written in the covariant form. In curved spacetime the interval can be expressed using the metric tensor :
and instead of the component of 4-volume during the integration over the 4-volume we should use the product , where is the determinant of the metric tensor.
In classical mechanics, the Hamiltonian of the system of particles can be defined with the Lagrangian: ,
where is the generalized momentum of the i-th particle, and is its generalized velocity.
For conservative systems in which the energy is conserved, the Hamiltonian as the function of generalized coordinates and momenta is equal to the total energy of the system and has the following form:
In this case, we see that the distinction between the Lagrangian and Hamiltonian is in the different signs before the potential energy of the system.
Invariant energy of a body is defined as the relativistic energy, measured by an observer who is fixed relative to the body’s center of mass. The standard approach involves summation of all the types of energy of the body:
where is the rest energy of the individual matter particles, is the pressure (compression) energy of the matter understood as the potential energy of interatomic interactions, is thermal energy, which being summed with yields the internal energy, is the total gravitational energy of the body, including the energy of the proper field in the body matter and beyond it and the gravitational energy in the field from external sources, is the total electromagnetic energy of the body, is the energy of emission interacting with the body matter.
In general relativity this leads to the fact that a heated body should increase its mass, and the mass of a gravitationally bound body should be less than the total mass of the particles of matter that forms this body.
There is an alternative point of view that the energy components are included in the equation for the invariant energy with negative signs:     
As a result, heated bodies should have less mass than cold, and the mass of a star must be greater than the mass of scattered matter from of which it was made up during the gravitational collapse.
The third approach involves rethinking the nature and order of summation energies in covariant theory of gravitation (CTG). Method of calculating the invariant energy depends essentially on how to account for the scalar curvature and the cosmological constant in the Hamiltonian. In particular, the cosmological constant can be calibrated in such a way as to exclude the scalar curvature, and thus find a unique expression for the Hamiltonian.  Another innovation is that instead of the standard stress-energy tensor of matter, taking into account the inner pressure, in consideration introduces two new vector fields – the acceleration field and pressure field, with the corresponding stress-energy tensors. If we add the electromagnetic and gravitational fields, then obtained four fields symmetrically involved in the Lagrangian and the Hamiltonian. The calculation of the invariant energy in the spherical body shows that the components of the energy of all four fields cancel each other. Therefore the contribution to the invariant energy of system makes only potential energies of the particles which are under the influence of fields.  These energies are also partially reduced, and for the invariant energy can be written:
The relation for the mass is as follows:
where mass and charge are calculated by integrating the corresponding density by volume of the body with the radius , the system mass equals the total mass of particles , the mass equals the gravitational mass , and excess over is due to the fact that particles move inside the body and are under pressure in the gravitational and electromagnetic fields.
A more accurate expression is presented in the following articles,   where for energy and mass there is the following:
Here the gauge mass is related to the cosmological constant and represents the mass-energy of the matter’s particles in the four-potentials of the system’s fields; is the inertial mass; the auxiliary mass is equal to the product of the particles’ mass density by the volume of the system; the mass is the sum of the invariant masses (rest masses) of the system’s particles, which is equal in value to the gravitational mass .
In contrast to the invariant energy, the relativistic energy generally includes additional energy components associated with the motion of the system as a whole. As a result, in the formulas for the energy dependence on velocity can be determined, such as on the velocity of the center of mass of the system. If in Minkowski space the invariant energy is known, then the relativistic energy in an arbitrary inertial reference frame is found using the Lorentz transformation by the following formula:
Einstein-Hilbert equations of general relativity (GR) are aimed to find metric in curved spacetime and are written in tensor form:
where is the Ricci curvature tensor, is the scalar curvature, is the cosmological constant, and is a stress-energy tensor with dimension of volumetric energy density, is Newton's gravitational constant.
In GR and the tensor usually includes the stress-energy tensor of matter and the stress-energy tensor of electromagnetic field :
Absence of stress-energy tensor of gravitational field as the source affecting the metric in GR is due to the fact that the gravitational field is identified with the geometrical field in the form of the metric field, and this field does not generate itself (absence of self-action of the metric field).
Equations of CTG
In the covariant theory of gravitation (CTG) equations for the metric are as follows: 
where the coefficient is found from the equations of motion of particles and waves in any given form of the metric, and the tensor is the sum of four tensors:
This means that in CTG the gravitational field is a physical field and along with the electromagnetic field, the acceleration field and pressure field it is the source forming the spacetime metric.
For the case of continuously distributed matter we obtain the equality for the cosmological constant:
where and are the mass and electromagnetic 4-currents, respectively, and – 4-potentials of acceleration field and pressure field.
The covariant derivative of the left side of equations for metric due to calibration of the cosmological constant and the scalar curvature is zero. This allows us to write the equation of matter motion as equality to zero of the covariant derivative of the sum of the tensors in the right side, taken with the contravariant indices:
In the concept of general field it is assumed that all vector fields associated with the matter are the components of this field. 4-potential of the general field is the sum of 4-potentials of particular fields.  As a result, the sum of terms in the Lagrangian responsible for the energy of the matter in various fields, up to a sign is simply the product of . With regard to energy themselves particular fields, then these energies are included in the Lagrangian by means of the general field tensor , obtained as a 4-curl of the 4-potential of the general field. For the Lagrangian we obtain the relation:
where and are the constants to be determined; is the invariant 3-volume expressed in terms of the product of space coordinates’ differentials and the square root of the determinant of the metric tensor, taken with a negative sign.
The relativistic energy of the system is:
where and denote the time components of the 4-vectors and .
The feature of the expression for the energy is that in it the general field energy in the tensor product includes not only energies of particular fields, but also cross-terms in the form of a sum of products of particular fields strengths in various combinations. We can say that the energy of the particles in particular fields is included in the energy of the system linearly, and the energy fields themselves – approximately quadratically.