Consider the interface as a curve  for  where  is a free parameter. The free energy to be minimized is 
with the constraints  which we can write as  and fixed volume .
The modified Lagrangian, taking into account the constraints is therefore 
where  are Lagrange multipliers. By definition,  the momentum  and the Hamiltonian  which is computed to be: 
Now, we recall that the boundary is free in the  direction and  is a free parameter. Therefore, we must have: 
At the boundary  and , therefore we recover the Young equation.