  In this work, we reinvestigate the electron fraction $Y_{e}$ and electron
Fermi energy $E_{F}(e)$ of neutron stars, based on our previous work of Li et
al.(2016), in which we firstly deduced a special solution to $E_{F}(e)$, and
then obtained several useful analytical formulae for $Y_{\rm e}$ and matter
density $\rho$ within classical models and the relativistic mean field(RMF)
theory using numerically fitting. The advantages of this work include the
following aspects:(1) The linear functions are substituted for the nonlinear
exponential functions used in the previous work. This method may be more
simple, and closer to realistic equation of state\,(EoS) of a neutron star(NS),
because there are linear or quasi-linear relationships between number fractions
of leptons and matter density, which can be seen by solving NS EoS; (2)we
introduce a dimensionless variable $\varrho$\,($\varrho=\rho/\rho_0$,
$\rho_{0}$ is the standard saturated nuclear density), which greatly reduces
the scope of the fitting coefficients;(3)we present numerical errors including
absolute and relative deviations between the data and fit. By numerically
simulating, we have obtained several analytical formulae for $Y_{e}$ and $\rho$
for both APR98 and RMF models. Combining these analytical formulae with the
special solution, we can calculate the value of $E_{\rm F}(e)$ for any given
matter density. Since $Y_e$ and $E_{ F}(e)$ are important in assessing cooling
rate of a NS and the possibility of kaon/pion condensation in the NS interior,
this study could be useful in the future study on the thermal evolution of a
NS.
