Methyl esters are often prepared by the reaction of carboxylic acids with diazomethane.
Amides are compounds that contain the following group:
Substituted amides can contain the following groups:
An amide name is based on the name of the carboxylic acid of the same number of carbon atoms, but the ‐oic ending is changed to amide. Amides with alkyl groups on the nitrogen are substituted amides and are named the same as N‐substituted amides, except the parent name is preceded by the name of the alkyl substituent and a capital N precedes the substituent name.
Amides are ordinarily prepared by a reaction of acid chlorides with ammonia or amines.
An amide is prepared by reacting an acid halide with ammonia.
An N‐substituted amide is prepared by reacting an acid halide with a primary amine.
An N,N‐disubstituted amide is prepared by reacting an acid halide with a secondary amine.
You can also react ammonia with esters to prepare primary amides.
The mechanism for amide formation proceeds via attack by the ammonia molecule, which acts as a nucleophile, on the carboxyl carbon of the acid chloride or ester. The alkoxide ion that forms assists with the displacement of the chloride ion or alkoxy group.