Why are variations zero on the endpoints of a beam?

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 why are the variations on the angle $$\delta\varphi$$ and displacement $$\delta w$$ zero at the ends? If we have a beam resting on two supports at the ends, then I can understand why the displacement variation would be zero since the beam is bound there, but I don't see how the angle variation could be zero, since more the beam is displaced along its length, bigger the change in angle at the ends. And if we are dealing with a beam, say, attached to a wall with one end free, the one of the ends experiences a difference in both the angle and the vertical displacement.

• Have you studied the calculus of variations? Your question suggest that you have read the Wikipedia page but you don't really understand what a "variation" is. Jun 24 '19 at 9:09
• @alephzero I think I do have an understanding. The principle of virtual work says that if the beam is in equilibrium, then when the beam is subject to virtual displacements the internal and external work are equal. What I don't understand is why the virtual angle change and virtual displacement are necessarily zero at the endpoints. Jun 24 '19 at 9:36
• The virtual angle is not 0 but the contribution of the infitesimally small sliver at the end is zero. The one does not follow the other. Jun 24 '19 at 13:05
• @joojaa I think I'm close to understanding it, but you could you explain more about what you mean by 'contribution'? Contribution to what? Jun 25 '19 at 8:22