Energy Conservation for the One-Dimensional Wave Equation