2 Samuel 1:17 (ESV)

17 And David lamented with this lamentation over Saul and Jonathan his son,

A lament is a formal and thoughtful expression of grief following the death of an individual.1 Words are carefully chosen by the author to express his loss as closely and completely as possible. It is likely that David took some time to compose these words and that they are thus not the words he sang in 2 Samuel 1:12.