Closed‐form solutions are presented for fundamental natural frequencies of inhomogeneous vibrating beams under axially distributed loading. The mode shape is postulated as coinciding with the static deflection of the associated homogeneous beam without distributed axial loading. Then the inverse problem of determining the stiffness and mass density distributions, producing the above mode shape, is solved. To describe these variations, the family of polynomial functions is used. Several sets of boundary conditions are considered. It is shown that the natural frequency vanishes when the intensity of the axially distributed loading equals the critical buckling value. A linear relationship is established between the square of the natural frequency and the load ratio for all reported sets of boundary conditions, in contrast to uniform beams where the exact linear relationship holds for columns with simply supported and/or sliding ends.