the average negative potential energy This general result is useful for complex gravitating systems such as solar systems or galaxies. A simple application of the virial theorem concerns galaxy clusters. If a region of space is unusually full of galaxies, it is safe to assume that they have been together for a long time, and the virial theorem can be applied. Doppler effect measurements give lower bounds for their relative velocities, and the virial theorem gives a lower bound for the total mass of the cluster, including any dark matter. If the ergodic hypothesis holds for the system under consideration, the averaging need not be taken over time; an ensemble average can also be taken, with equivalent results. In quantum mechanics Although originally derived for classical mechanics, the virial theorem also holds for quantum mechanics, as first shown by Fock using the Ehrenfest theorem. Evaluate the commutator of the Hamiltonian with the position operator and the momentum operator of particle , Summing over all particles, one finds for the commutator amounts to where is the kinetic energy. The left-hand side of this equation is just , according to the Heisenberg equation of motion. The expectation value of this time derivative vanishes in a stationary state, leading to the quantum virial theorem, Pokhozhaev's identity In the field of quantum mechanics, there exists another form of the virial theorem, applicable to localized solutions to the stationary nonlinear Schrödinger equation or Klein–Gordon equation, is Pokhozhaev's identity, also known as Derrick's theorem. Let be continuous and real-valued, with . Denote . Let be a solution to the equation in the sense of distributions. Then satisfies the relation In special relativity For a single particle in special relativity, it is not the case that . Instead, it is true that , where is the Lorentz factor and . We have, The last expression can be simplified to . Thus, under the conditions described in earlier sections (including Newton's third law of motion, , despite relativity), the time average for particles with a power law potential is In particular, the ratio of kinetic energy to potential energy is no longer fixed, but necessarily falls into an interval: where the more relativistic systems exhibit the larger ratios. Generalizations Lord Rayleigh published a generalization of the virial theorem in 1903. Henri Poincaré proved and applied a form of the virial theorem in 1911 to the problem of formation