In this study, using Gateaux differential, functionals of circular and straight space bars are presented and corresponding mixed finite element matrices are given. This formulation is also applicable to variable cross-section bars. Besides the shear effects, all types of loading and boundary conditions (geometric and dynamic) are taken into account. The proposed finite element has two nodes with 2×12 degrees of freedom and isoparametric linear interpolation functions are used. Problems are solved with the generated element and convergence of the results in view of the number of variables, as well as precision is found satisfactory.