Abstract
A modified trial solution of Roberts's function, depending on two parameters, is chosen in such a way that it can satisfy the boundary conditions and the subsidiary condition that the electron density be normalized. The proposed solution is used to calculate the total ionization energy of atoms, and also the repulsive interaction energy between rare-gas atoms. The results obtained by the proposed function are better than those obtained from Csavinszky's function and from Kesarwani and Varshni's function for medium-atomic-number elements, and the numerical values of the parameters are easier to optimize.