  In a previous work [Asymptotically quasiperiodic solutions for time-dependent
hamiltonians, arXiv preprint arXiv:2211.06623 (2022)], we consider
time-dependent perturbations of a Hamiltonian vector field having an invariant
torus supporting quasiperiodic solutions. Assuming the perturbation decays
polynomially fast as time tends to infinity, we prove the existence of a
non-autonomous KAM torus. A non-autonomous KAM torus is a time-dependent family
of embedded tori converging in time to the invariant torus associated with the
unperturbed system.
  In the first part of the present work, we generalise this theorem to the case
where the time decay is weaker but always polynomial, as it appears naturally
in physical problems. This requires the introduction of a generalization of the
definition of non-autonomous KAM torus. The proof relies on a Nash-Moser
theorem. In the second part, we apply this new theorem to the example of the
planar three-body problem perturbed by a given comet coming from and going back
to infinity asymptotically along a hyperbolic Keplerian orbit.
