Application of Gyarmati principle to boundary layer flow