Number of moles is defined as the ratio of given mass in g to the molar mass.
First, convert the given mass of carbon dioxide in mg to g:
1 mg = 0.001 g
17.61 mg = 0.01761 g
Number of moles of carbon dioxide =
=
Mass of carbon = number of moles of carbon dioxide \times molar mass of carbon
=
=
Number of moles of water=
=
Since, water contains two hydrogen atoms. Thus,
Moles of hydrogen =
=
Mass of hydrogen =
=
Mass of oxygen =
=
Number of moles of oxygen =
=
Now,
Divide the smallest number to get the whole number,
we get,
Now, multiply all the subscript by 3 to get the whole number,
(empirical fomula)
Molar mass of the compound =
=
Divide given molar mass of the compound with the molar mass of the compound.
=
=
Thus, multiply the subscripts of empirical formula by 2 to get the molecular formula, we get:
Hence, empirical formula is and molecular formula is