Identification of the potential term of the wave equation