Carboxylic acids are a class of organic compounds that contain a carboxyl functional group (-COOH) …