Euler-Lagrange and Hamilton equations