In the presence of an $\mathrm{H}^+$ catalyst, compound X reacts with ethanoic acid to form the compound shown. What is the molecular formula of compound X?
- A$\mathrm{C}_2\mathrm{H}_6\mathrm{O}_2$
- B$\mathrm{C}_2\mathrm{H}_6\mathrm{O}_3$
- C$\mathrm{C}_4\mathrm{H}_8\mathrm{O}$
- D$\mathrm{C}_4\mathrm{H}_8\mathrm{O}_2$