On Wikipedia derivation on Timoshenko beam equation we arrive at this:
$$ \delta U = \int_L \left[-M_{xx}\frac{\partial (\delta\varphi)}{\partial x} + Q_{x}\left(-\delta\varphi + \frac{\partial (\delta w)}{\partial x}\right)\right]~\mathrm{d}L $$
then:
Integration by parts, and noting that because of the boundary conditions the variations are zero at the ends of the beam, leads to
$$ \delta U = \int_L \left[\left(\frac{\partial M_{xx}}{\partial x} - Q_x\right)~\delta\varphi - \frac{\partial Q_{x}}{\partial x}~\delta w\right]~\mathrm{d}L $$
But I don't understand what are the boundary conditions. Here we are just deriving the general differential equation, I don't see what boundary conditions we have imposed yet. They are not mentioned earlier in the article either. So what am I missing here?