Now use integration by parts on the first term of that integral:
(because vanishes at the ends of the interval).
You want to show that (and therefore is constant). So you want that last integral to be zero. I'm guessing that the form of the wave equation relevant for this problem is , in which case everything works nicely.