Extremal boundary value problems of the dynamics of a viscous incompressible fluid