I did an experiment where I analyzed the amount of caffeine and benzoate in soda via spectroscopy. I've got the absorbances and did all the math for everything, but I'm having a hard time figuring out why we had to add an acid to protonate the benzoate to form benzoic acid before running the spec.
I've been able to find many similar procedures and many with various pre-lab questions, but none seem to address the reason for the conversion from benzoate to benzoic acid. Here is one such procedure: UV Spectroscopic Analysis of Caffeine & Benzoic Acid in Soft Drinks
The only thing I can think of is that it was in an aqueous solution (soda), so perhaps some benzoate will be in the form of benzoic acid and some will still be in the form of benzoate. By adding $\ce{HCl}$, we can force all the benzoate to be in the form of benzoic acid for better quantification.
Is this the correct line of thinking or am I missing something?