A direct method for solving inverse Sturm–Liouville problems*Research was supported by CONACYT, Mexico via the projects 222478 and 284470. Research of Vladislav Kravchenko was supported by the Regional mathematical center of the Southern Federal University, Russia. (24th December 2020)