Boundary layer variational principles: a case study.