Determination of the molecular formula by functional analysis

..knowing the molar mass..

Principle

1) Knowing the composition and the functions, we write the formula based on the number n of C atoms.
2) With this general formula, in terms of n, we calculate the molar mass.
3) We equalize this molar mass with the given molar mass.
4) We solve the equation determining n.

Example

The molar mass of a substance is $44\;\frac{g}{mol}$ .
Elemental analysis showed that it contains $C$, $H$ and $O$.
Functional analysis demonstrated that this is a non-cyclic alkane which contains an aldehyde function.
What is its empirical formula?

1) Knowing the composition and the functions, we write the formula based on the number n of C atoms.
2) With this general formula, in terms of n, we calculate the percentage in question.
3) This percentage equated to the given percentage
4) We solve the equation determining n

Example

A substance contains $62.1\;\%\;C$.
Elemental analysis shows that it contains $C$, $H$ and $O$.
Functional analysis shows that it contains a double bond, no ring, but an alcohol function.
What is its molecular formula?