  The inverse problem of the calculus of variations consists in determining if
the solutions of a given system of second order differential equations
correspond with the solutions of the Euler-Lagrange equations for some regular
Lagrangian. This problem in the general version remains unsolved. Here, we
contribute to it with a novel description in terms of Lagrangian submanifolds
of a symplectic manifold, also valid under some adaptation for the
non-autonomous version. One of the advantages of this new point of view is that
we can easily extend our description to the study of the inverse problem of the
calculus of variations for second order systems along submanifolds. In this
case, instead of Lagrangian submanifolds we will use isotropic submanifolds,
covering both the nonholonomic and holonomic constraints for autonomous and
non-autonomous systems as particular examples. Moreover, we use symplectic
techniques to extend these isotropic submanifolds to Lagrangian ones, allowing
us to describe the constrained solutions as solutions of a variational problem
now without constraints. Mechanical examples such as the rolling disk are
provided to illustrate the main results.
