  We show that for n>2 the following equivalence problems are essentially the
same: the equivalence problem for Lagrangians of order n with one dependent and
one independent variable considered up to a contact transformation, a
multiplication by a nonzero constant, and modulo divergence; the equivalence
problem for the special class of rank 2 distributions associated with
underdetermined ODEs z'=f(x,y,y',..., y^{(n)}); the equivalence problem for
variational ODEs of order 2n. This leads to new results such as the fundamental
system of invariants for all these problems and the explicit description of the
maximally symmetric models. The central role in all three equivalence problems
is played by the geometry of self-dual curves in the projective space of odd
dimension up to projective transformations via the linearization procedure
(along the solutions of ODE or abnormal extremals of distributions). More
precisely, we show that an object from one of the three equivalence problem is
maximally symmetric if and only if all curves in projective spaces obtained by
the linearization procedure are rational normal curves.
