on that particle, and is the total kinetic energy of the system according to the velocity of each particle Connection with the potential energy between particles The total force on particle is the sum of all the forces from the other particles in the system where is the force applied by particle on particle . Hence, the virial can be written Since no particle acts on itself (i.e., for ), we split the sum in terms below and above this diagonal and we add them together in pairs: where we have assumed that Newton's third law of motion holds, i.e., (equal and opposite reaction). It often happens that the forces can be derived from a potential energy that is a function only of the distance between the point particles and . Since the force is the negative gradient of the potential energy, we have in this case which is equal and opposite to , the force applied by particle on particle , as may be confirmed by explicit calculation. Hence, Thus, we have Special case of power-law forces In a common special case, the potential energy between two particles is proportional to a power of their distance where the coefficient and the exponent are constants. In such cases, the virial is given by the equation where is the total potential energy of the system Thus, we have For gravitating systems the exponent equals −1, giving Lagrange's identity which was derived by Joseph-Louis Lagrange and extended by Carl Jacobi. Time averaging The average of this derivative over a duration of time, , is defined as from which we obtain the exact equation The virial theorem states that if , then There are many reasons why the average of the time derivative might vanish, . One often-cited reason applies to stably-bound systems, that is to say systems that hang together forever and whose parameters are finite. In that case, velocities and coordinates of the particles of the system have upper and lower limits so that , is bounded between two extremes, and , and the average goes to zero in the limit of infinite : Even if the average of the time derivative of is only approximately zero, the virial theorem holds to the same degree of approximation. For power-law forces with an exponent , the general equation holds: For gravitational attraction, equals −1 and the average kinetic energy equals half of