Answer
$C_{5}H_{10}O_{2}$
Work Step by Step
Assume 100g of the compound. Convert the mass of each constituent element into moles by dividing by its molar mass:
$58.80g\ C\times\frac{1mol}{12.01g}=4.896mol\ C$
$9.87g\ H\times\frac{1mol}{1.01g}=9.77mol\ H$
$31.33g\ O\times\frac{1mol}{16.00g}=1.958mol\ O$
Formulas have whole number subscripts so divide all the amounts by the smallest and round if the number is really close.
$\frac{4.896mol\ C}{1.958}=2.5\times2=5$
$\frac{9.77mol\ H}{1.958}=5\times2=10$
$\frac{1.958mol\ O}{1.958}=1\times2=2$
So the empirical formula for this compound is:
$C_{5}H_{10}O_{2}$