*modified* 2017-03-27.
The virial theorem as it is applied to elliptical and disc galaxies, the mass is calculated out of the potential energy and out of the kinetic energy. However, the equation reads M = 2 R v2/G, with R defined as the total radius of the system.
For non-rotating systems, the virial theory is also assumed to be applicable.
There are two issues: 1) the validity of the evaluation of the mass by the virial theorem; 2) the validity of the virial theorem for non-rotating systems (pulsing).
Is my following reasoning correct?
1) Disc galaxies: mass evaluation
The problem resides in the definition of the value of R as average. For the velocity (Kinetic energy) it is the position vector, and for the Potential energy it should be the mutual average distance between all the masses, two by two.
For a spherical 3D system with randomly oriented orbits, that average distance R between masses, two by two, will be expected to be much larger than that of a thick 2D disc that has only prograde orbits, and where many stars mutually approach very closely, at distances that are fractions of the galaxy's radius.
2) Non-rotating systems: infinite time-averaging
Then, the value of each term of (Sum pi.ri) is indeed a scalar, different from zero, because their angle is zero at average, hence, its sum is also different from zero.
Therefore, the mainstream trick for trying to get a zero result is “time-averaging”. When looking at the deduction, it is clear that the time averaging of the left side (Sum pi.ri) of the equation in one of the steps, becomes only zero by making the time cycle go to an infinite time, which in the denominator makes the left side zero.
Of course, the same time averaging should be performed at the right side of the equation, which has not been done, avoiding that these terms would also become zero, resulting in the equation 0=0. Now, since here, we only speak of radially moving masses, for non-cyclic systems, setting the time to infinite will physically make either a collapse to a singularity (no infinite time), or a widening to infinite radius, making the system unbound at infinite time.