Functionals depending on curvatures with constraints