Lagrangian method