The original continuity equation (CE) used for the interpretation of the power law energy spectra of beam electrons in flares was written and solved for an electron beam flux while ignoring an additional free term with an electron density. In order to remedy this omission, the original CE for electron flux, considering beam's energy losses in Coulomb collisions, was first differentiated by the two independent variables: depth and energy leading to partial differential equation for an electron beam density instead of flux with the additional free term. The analytical solution of this partial differential continuity equation (PDCE) is obtained by using the method of characteristics. This solution is further used to derive analytical expressions for mean electron spectra for Coulomb collisions and to carry out numeric calculations of hard X-ray (HXR) photon spectra for beams with different parameters. The solutions revealed a significant departure of electron densities at lower energies from the original results derived from the CE for the flux obtained for Coulomb collisions. This departure is caused by the additional exponential term that appeared in the updated solutions for electron differential density leading to its faster decrease at lower energies (below 100 keV) with every precipitation depth similar to the results obtained with numerical Fokker-Planck solutions. The effects of these updated solutions for electron densities on mean electron spectra and HXR photon spectra are also discussed.