Issue 3198: implement Euler-Lagrange equations