text: Consider a small variation  in the velocity potential . Then the resulting variation in the Lagrangian is:
  Using Leibniz integral rule, this becomes, in case of constant density :
  The first integral on the right-hand side integrates out to the boundaries, in  and , of the integration domain and is zero since the variations  are taken to be zero at these boundaries. For variations  which are zero at the free surface and the bed, the second integral remains, which is only zero for arbitrary  in the fluid interior if there the Laplace equation holds:
  with  the Laplace operator.
  If variations  are considered which are only non-zero at the free surface, only the third integral remains, giving rise to the kinematic free-surface boundary condition:
  Similarly, variations  only non-zero at the bottom  result in the kinematic bed condition: