Parallels
Interesting parallels but in my opinion both accounts (Livy and Bible) could be describing real events. I mean history tends to repeat itself and it would be strange if there were no parallels at all. So there are some similarities but not enough for me to see a dependence on one source. But let's analyze the similarities:
1) Champion warfare (single combat)
Is champion warfare in antiquity so unique? According to Wikipedia, it was quite common:
Champion warfare refers to a type of battle, most commonly found in the epic poetry and myth of ancient history, in which the outcome of the conflict is determined by single combat, an individual duel between the best soldiers ("champions") from each opposing army.
Numerous instances of champion warfare can be observed in Homer's Iliad, most notably the climactic battle between Achilles and Hector, although there are many more.
Champion warfare is a common theme in the early books of Livy's history of Rome Ab Urbe Condita (From the Founding of the City), including the story of the famous triplets of the Horatii and Curiatii families and the great champion Horatius Cocles.
More cases here:
https://en.wikipedia.org/wiki/Champion_warfare
2) Young vs strong
If champion warfare was not uncommon in antiquity there should be at least a few cases when an underdog beats a stronger opponent. These cases would be also more famous than others and therefore they would be written down. Let's look at some examples:
An important episode in "The Tale of Sinuhe", one of the most well-known works of Ancient Egyptian literature, concerns the protagonist – an Egyptian exile in Upper Retjenu (Canaan) – defeating a powerful opponent in single combat.
https://en.wikipedia.org/wiki/Single_combat#Antiquity
A story very similar to that of David and Goliath appears in the Iliad, written circa 760–710 BCE, where the young Nestor fights and conquers the giant Ereuthalion. Each giant wields a distinctive weapon—an iron club in Ereuthalion's case, a massive bronze spear in Goliath's; each giant, clad in armor, comes out of the enemy's massed array to challenge all the warriors in the opposing army; in each case the seasoned warriors are afraid, and the challenge is taken up by a stripling, the youngest in his family (Nestor is the twelfth son of Neleus, David the seventh or eighth son of Jesse). In each case an older and more experienced father figure (Nestor's own father, David's patron Saul) tells the boy that he is too young and inexperienced, but in each case the young hero receives divine aid and the giant is left sprawling on the ground. Nestor, fighting on foot, then takes the chariot of his enemy, while David, on foot, takes the sword of Goliath. The enemy army then flees, the victors pursue and slaughter them and return with their bodies, and the boy-hero is acclaimed by the people.
https://en.wikipedia.org/wiki/Goliath#G ... the_Greeks
3) Beheading
Because of the unambiguous way in which beheading signals death, decapitation was a common practice in the ancient world, especially in the context of war.
https://www.bibleodyssey.org/passages/r ... ent-world/
Solution for 2 Samuel 21:19 and 1 Chronicle 20:5
I think 2 Samuel 21:19 and 1 Chronicle 20:5 are about the brother of Goliath. I know that there are issues:
The fourth-century BC 1 Chronicle 20:5 explains the second Goliath by saying that Elhanan "slew Lahmi the brother of Goliath", constructing the name Lahmi from the last portion of the word "Bethlehemite" ("beit-ha’lahmi"), and the King James Bible adopted this into 2 Samuel 21:18–19, but the Hebrew text at Goliath's name makes no mention of the word "brother". Most scholars dismiss the later 1 Chronicles 20:5 material as "an obvious harmonization" attempt.
https://en.wikipedia.org/wiki/Goliath#E ... nd_Goliath
... but I think John2 found a solution here:
So the addition of the name Lahmi could be just an attempt to avoid future ambiguity between ăḥî (אחי) and ēt (את).
Historicity of Goliath
In the 2005 season, below the late 9th-century BCE destruction level, in a stratum dating to an earlier phase of the Iron Age IIA, an important inscription was found. Scratched on a shard typical of the Iron Age IIA, two non-Semitic names written in Semitic "Proto-Canaanite" letters were found. These two names, "ALWT" (אלות) and "WLT" (ולת), are etymologically similar to the name Goliath (גלית), the biblical Philistine champion who was a native of Gath.
These two name fragments might indicate that names similar to the name Goliath were in use in Philistia during the Iron Age IIA, approximately the same time as Goliath is described in the Bible. Although not proof of Goliath's existence, the ostracon provides evidence of the cultural milieu of this period. In any case, they provide a useful example of the names used by the Philistines during that time, and the earliest evidence for the use of an alphabetic writing system in the Philistine culture.
https://en.wikipedia.org/wiki/Gath_(city)#Goliath_shard
Tell es-Safi, the biblical Gath and traditional home of Goliath, has been the subject of extensive excavations by Israel's Bar-Ilan University. The archaeologists have established that this was one of the largest of the Philistine cities until destroyed in the ninth century BC, an event from which it never recovered. The Tell es-Safi inscription, a potsherd discovered at the site, and reliably dated to between the tenth to mid-ninth centuries BC, is inscribed with the two names ʾLWT and WLT. While the names are not directly connected with the biblical Goliath (גלית, GLYT), they are etymologically related and demonstrate that the name fits with the context of the late tenth- to early ninth-century BC Philistine culture. The name "Goliath" itself is non-Semitic and has been linked with the Lydian king Alyattes, which also fits the Philistine context of the biblical Goliath story. A similar name, Uliat, is also attested in Carian inscriptions. Aren Maeir, director of the excavation, comments: "Here we have very nice evidence [that] the name Goliath appearing in the Bible in the context of the story of David and Goliath… is not some later literary creation."
https://en.wikipedia.org/wiki/Goliath#Goliath's_name
Previous approaches have viewed the description of Goliath as modeled on an infantry man, be it a Mycenaean warrior of the Iron Age I, a Greek hoplite of the sixth century, or something of a mix of the two. However, if he is understood as a chariot warrior, a member of the Philistine elite warrior class, there is nothing in the description of his equipment that demands a late date for the text's origin. In fact, all his gear matches well with what might be expected of an Aegean-Levantine chariot warrior of the Iron I period.
https://www.journals.uchicago.edu/doi/a ... OR41104416