From LibreTexts, under CC BY-NC-SA 4.0, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.
The direct reaction of a carboxylic acid with an amine would be expected to be difficult because the basic amine would deprotonate the carboxylic acid to form a highly unreactive carboxylate. However when the ammonium carboxylate salt is heated to a temperature above 100 oC water is driven off and an amide is formed.
Conversion of Carboxylic acids to amide using DCC as an activating agent
The direct conversion of a carboxylic acid to an amide is difficult because amines are basic and tend to convert carboxylic acids to their highly unreactive carboxylates. In this reaction the carboxylic acid adds to the DCC molecule to form a good leaving group which can then be displaced by an amine during nucleophilic substitution.
DCC induced coupling to form an amide linkage is an important reaction in the synthesis of peptides.
Mechanism
1) Deprotonation
2) Nucleophilic reaction with carboxylate acting as the nucleophile
3) Nucleophilic reaction with the amine acting as the nucleophile
4) Proton transfer
5) Leaving group removal
Exercise
7. Complete the reaction map below proposing two different ways to synthesize benzoic acid from benzene.