© 2019 A new approach to analytically generate the electronic energy functional expression for free or confined multi-electronic atoms via the Direct Variational Method (DVM) is presented. The electronic energy functional expression which is independent of both the basis set and confinement symmetry of the system is obtained through a new approach which is based on the orthonormality of spin functions, in which the DVM is applied. With this proposal the computation time is drastically reduced when getting the energy functional analytical expression for free or confined atoms either for its ground state or any excited state. The analytical expression to the electronic energy functional for Be atom generated in this work was compared with the expression for Be atom obtained in a previous work, where the DVM was used in its standard form. Due to lack of the electronic energy functional expression for the Li and B atoms, we were forced to calculate the energy values for these systems, to verify that the functional expressions generated in this work are correct and checked that its accuracy is within the results reported by other authors. In addition, a comparison between the response times is made by using the DVM in its standard form and the new approach proposed in this work.