In this study, a special class of closed-form solutions for inhomogeneous rod is investigated. Namely, the following problem is considered: determine the distribution axial rigidity when the material density is given of an inhomogeneous rod so that the postulated fundamental trigonometric mode shape serves as an exact vibration mode. In this study, the associated semi-inverse problem is solved that results in the distributions of axial rigidity that together with a specified law of material density satisfy the governing eigenvalue problem. For comparison, the obtained closed-form solutions are contrasted with approximate solutions based on an appropriate polynomial shapes, serving as trial functions in an energy method. The obtained results are utilized for vibration tailoring, i.e. construction of the rod with a given natural frequency.