What calculations show that Comet Shoemaker-Levy 9 orbited Jupiter for several decades before its spectacular impact? (Chodas, Sekanina & Yeomans)
Chodas and Yeomans published a paper called The orbital motion and impact circumstances of Comet Shoemaker-Levy 9.  In it they describe the algorithms and techniques they used to reconstruct the orbit backwards from the discovery of the comet.  SL9 had an incredibly chaotic orbit in the mathematical sense in that small perturbations in the position would result in large effects in reverse-time orbital simulations.  In the words of the paper authors:

Unfortunately, SL9'sorbit about Jupiter was among the most chaotic of
any known solar system body, with an effective Lyapunov time on the
order of 10 years (Benner and McKinnon 1995). As a result, a single
backward numerical integration does not provide definitive answers on
the orbital history of this object. A better approach is to account
for the uncertainties in the initial conditions of the backward
integrations, and to investigate the motion in a statistical manner
using a Monte Carlo analysis (Chodas and Yeomans 1995).

For comparison, the Lyapunov time for the Solar System is on the order of millions of years.  An orbit trajectory plot for SL9 is the most complicated I've ever seen (excluding human-built craft)!

I don't know if precovery data was ever used to refine the orbit, though papers are still being published on SL9's orbit.  Unfortunately, Invariant Manifolds and the Capture of Comet Shoemaker-Levy 9, published in 2019, is behind a paywall.