= Solution
First, <proton transfer> from <acetic acid> to the <carbon> of <diazomethane> gives <methyldiazonium> and an <acetate ion>:
$$
\mathrm{CH_2N_2+CH_3CO_2H\longrightarrow[CH_3N_2]^++CH_3CO_2^-}.
$$
Draw an electron-pair arrow from <carbon>, using the carbon-negative <resonance contributor>, to the acidic <hydrogen>, and another from the acid O–H bond to <oxygen>. Second, an acetate <oxygen> attacks the diazonium methyl <carbon> by an <SN2 reaction>; an arrow from the C–N bond to <nitrogen> expels neutral $\mathrm{N_2}$:
$$
\boxed{\mathrm{CH_3CO_2^-+[CH_3-N^+\equiv N]\longrightarrow CH_3CO_2CH_3+N_2}.}
$$
The acid's hydroxyl <hydrogen> has become the third <hydrogen> of the newly installed <methyl group>. This is a methyl-transfer sequence driven by formation of <molecular nitrogen>, without forming a free methyl <carbocation> or invoking <Fischer esterification>.
\Image[/past-exam-of-the-chemistry-course-of-the-year-1-of-the-natural-sciences-course-of-the-university-of-cambridge/2022/paper-1-diazo-methylation.png]
{title=Original electron-flow drawing for carbon protonation followed by acetate displacement of nitrogen}
Back to article page