Originally posted by @sonhouse
One thing I wonder about: So the universe as a whole is expanding and that makes light change wavelengths too If I am correct, and the wavelength gets longer. So the energy of that photon, say, is now lower, then how do you reconcile the reduced energy available with the idea of conservation of energy, somehow, I thought the energy content of the universe ...[text shortened]... en in total than the much larger universe of today. What happens to conservation of energy then?
Good question. I need to think about this because I'm not happy with the following. Suppose the universe were contracting, then the wavelength of light from distant stars would be blue-shifted and the question would be: where does the energy come from? The answer my counterpart in a contracting universe might try to give would be that the contraction does work on the photons and that the energy came from the gravitational field. In our expanding universe it's the other way round. The reason I'm not happy about this answer is that if we consider the gravitational potential energy between two galaxies it is increasing as the universe expands so there seems to be two opposing effects and one cause.
A technical answer is that conservation laws in Newtonian physics and Special Relativity are written, roughly speaking, by stating that the rate of change of a conserved quantity in a particular region of space is equal to the flux entering or leaving that region. This can be written as a differential equation. When one takes GR into account an extra term appears that modifies the conservation law. The quantity is said to be covariantly conserved. So in GR there is this extra term. Bear in mind that gravitational potential energy is a Newtonian concept, it doesn't really exist in General Relativity, so in GR kinetic energy is covariantly conserved which means that a given observer will see the kinetic energy of some particle change as it moves through a gravitational well.
One thing I'm not satisfied with in these answers is that the expansion would happen even if there were no light, the expansion changes the wavelength of light from distant stars, but does not depend on it to drive the expansion; but if the energy from the photons is going to the gravitational field then it really ought to be a driver of the expansion. So I'm somewhat confused about this.