rate equation for the photon density