I actually had a timeline where Archimedes survives and becomes a "guest" of Marcellus, but dies 4 years later when Marcellus himself dies in a Carthaginian ambush. In this timeline, Archimedes doesn't invent anything new, but sets things up so that future generations can readily discover calculus. 200 years later, all sorts of butterflies have happened. Ptolemy is a heliocentrist. Hero invents a more practical steam engine, and by 200 AD, there are Roman steamships and railroads. The Roman Empire gets an economic boost from this limited industrialization and averts the anarchy of the 3rd century. By the time of the barbarian invasions in the 4-5th centuries, the Romans have a military technological advantage again and are able to fend off the barbarian hordes, thus allowing the empire to survive well into the Middle Ages.
The problem with this scenario, as you can see, it many things.
First, the story of Archimedes' death is suspect. This "soldier" is never given a name and Marcellus' admiration for Archimedes is referenced seemingly from nowhere. I suspect that Archimedes had died of natural causes before the Romans even got to his house.
Second, if Archimedes is captured, I doubt he would've been all too concerned about any sense of betrayal for helping the Romans. He was always described as an eccentric, who was more concerned with studying his mathematics than any political interests. Besides, I doubt he could've come up with much to help the Romans.
Third, there's no way to know what he could've come up with because he was already pretty old (75) when he died, so it's not like he's got 1000's of ideas waiting to pop out. Be that as it may, it's amusing to speculate.