*Minor differences ignored. Grouped by changes, with first version listed as example.
In the day of my trouble I will call upon thee - That is, I do it now; I have done it; I will do it. The language implies a habit, or a steady purpose of mind, that in all times of trouble he would make God his refuge. It was this fixed purpose - this regular habit - which was now the ground of his confidence. A man who always makes God his refuge, who has no other ground of reliance, may feel assured that God will interpose and save him.
For thou wilt answer me - This also implies a fixed and steady assurance of mind, applicable not only to this case, but to all similar cases. He had firm confidence in God at all times; an unwavering belief that God is a hearer of prayer. This is a just foundation of hope when we approach God. Compare James 1:6-7.
Thou wilt answer me - Because thou art good, merciful, and ready to forgive; and I call upon thee fervently, and seek thee in thy own way.
In the day of my trouble I will call upon thee,.... David had his troubles, both inward and outward, before and after he came to the throne, in private and public life; and every good man has his troubles; and there are some particular times or days of trouble; which trouble arises from different causes; sometimes from themselves, their corruptions, the weakness of their grace, and the poor performance of their duties; sometimes from others; from the persecutions of the men of the world; from the wicked lives of profane sinners, and especially professors of religion, and from the spread of false doctrine; sometimes from Satan and his temptations; and sometimes from the more immediate hand of God in afflictions, and from the hidings of his face: these troubles do not last always; they are but for a day, for a particular time; and such a season is a fit one for prayer, and the Lord invites and encourages his people to call upon him in prayer when this is the case, Psalm 50:15. Christ had his times of trouble, in which he called upon his divine Father, John 11:33.
for thou wilt answer me; which the idols of the Gentiles could not do; Baal could not answer his priests, 1-Kings 18:26, this the psalmist concluded, both from the promise of God, Psalm 50:15, and from his frequent experience, Psalm 138:3, a very encouraging reason or argument this to call on the Lord: Christ was always heard and answered, John 11:41.
*More commentary available at chapter level.