Determination of molecular formulas

Exercise 1

A non-cyclic organic substance has only one carboxylic acid function. its molar mass is $144\;\frac{g}{mol}$. Find its molecular formula.

1st method: General molecular formula:: $C_nH_{2n}O_2$ $12n$ $+$ $2n$ $+$ $2\cdot 16$ $=$ $144$ $n$ $=$ $8$ $C_8H_{16}O_2$ 2nd method: General molecular formula:: $C_nH_{2n+1}COOH$ $12n$ $+$ $2n$ $+$ $1$ $+$ $12$ $+$ $2\cdot 16$ $ +$ $1$ $=$ $144$ $n$ $=$ $7$ $C_7H_{15}COOH$ (Good method only for simple substances!)