The usual theory of calculus of variations, as far as I know, is concerned with lagrangian densities which depend on the function and its gradient, namely we try to minimise $\int L(Dw,w,x) dx$. Sometimes in differential geometry, however, one runs into problems in which some function of second derivative is involved. One can, of course, introduce new variables and reduce the order of system and demand that a certain compatibility be satisfied. Namely, we can substitute $D^2 w$ by n vectors, each representing a row of the hessian matrix, and add a constraint, and possibly use the method of Lagrange multipliers. My question is whether there is a more `intrinsic' approach to this kind of variational problem.