  The study of problems of the calculus of variations with compositions is a
quite recent subject with origin in dynamical systems governed by chaotic maps.
Available results are reduced to a generalized Euler-Lagrange equation that
contains a new term involving inverse images of the minimizing trajectories. In
this work we prove a generalization of the necessary optimality condition of
DuBois-Reymond for variational problems with compositions. With the help of the
new obtained condition, a Noether-type theorem is proved. An application of our
main result is given to a problem appearing in the chaotic setting when one
consider maps that are ergodic.
