Put and . The chain rule turns the wave equation into . Integrating first in and then in gives the D'Alembert formula
At the left endpoint, for . At the right endpoint, , hence
Thus the travelling waves can be represented by , with and both -periodic. More precisely, the positive-time boundary conditions constrain only on and on ; their unused arguments may be filled in by this periodic extension. They do not constrain arbitrary pre-existing choices outside those ranges. This is periodic reflection for a fixed-end string.
Using , differentiation gives and . The cross terms in the wave energy cancel, so
This integrates a -periodic function over exactly one period. is constant. Equivalently, the wave equation gives , because the fixed endpoint values imply there.