When an ester is washed with 2M sodium carbonate, the purpose is to neutralize any remaining acidic impurities, particularly unreacted carboxylic acid or acid by-products from the esterification reaction.
The reaction involved in this neutralization is the reaction between the sodium carbonate and the acidic impurities.
By washing the ester with sodium carbonate, any remaining acidic impurities are neutralized, and the solution becomes more basic. This is important in subsequent steps of the reaction or purification processes, as many reactions are sensitive to the presence of acidic impurities. Additionally, the formation of carbon dioxide gas helps in removing any volatile acidic components from the solution.