Solution to the inverse problem of the 1‐D wave equation