The variation  in the Lagrangian with respect to variations in the velocity potential Φ(x,z,t), as well as with respect to the surface elevation , have to be zero. We consider both variations subsequently.