Euler-Lagrange equations for high energy actions in QCD and in gravity