This paper presents exact closed-form solutions for free vibration of discretely supported Euler-Bernoulli (DEB) and Timoshenko beams (DTB) in the presence of an arbitrary number of intermediate elastic constraints. The exact eigenvalue equations and mode shapes of the DEB and DTB are derived using the generalized function method for the first time, which expands the general solution of mode shapes as a combination of the standard trigonometric/hyperbolic functions with integration constants extended to generalized functions. The second-order eigenvalue equation is formulated from the perspective of the entire domain of the beam without enforcement of any continuity conditions. Several typical constraints of interest in practical engineering are investigated and other cases can be achieved by following similar methodologies elucidated in this paper. The accuracy of present solutions is validated by numerical results obtained from the finite element method (FEM) and previous literature adopting the transfer matrix method (TMM) and Green's function method (GFM). The exiting frequency equation and mode shape of a beam with elastic end constraints are proved to be the degenerate solutions of current study. Courant's maximum-minimum principle is reproduced with detailed discussions on the support stiffnesses and positions, bimodal behavior, and sensitivity to geometrical variations. As an extended application, a new method based on rigorous mathematical deduction is proposed to efficiently determine the critical stiffness leading to the maximum fundamental frequency of a beam with multiple intermediate supports. This study is of significance to the support optimization and dynamic analysis of discretely supported beam-like structures.