What is the percentage of cocaine in the mixture?

hey

A sample of cocaine, C17H21O4N, is diluted with sugar, C12H22O11. When a 1.00 mg sample of this mixture is burned, 2.00 mg CO2 is formed. What is the percentage in this mixture?

A good question 

 mg  of C = 2.00mg of CO2 * 1mmolCO2/44mg CO2  * 1mmolC/1mmol CO2    * 12mg C /1mmol CO2 = 0.545 mg of C 

If we assume X mg of cocaine 

mass of sugar will be 1mg- X

mg of C in X mg of cocaine =  Xmg *1mmol cocaine /303.3mg   *  17mmol C /1mmol cocaine *   12mg C /1mmol C

                                             

 

mg of C in 1- X mg of sugar=   1-Xmg *1mmol sugar /342.3mg   *  12 mmol C /1mmol sugar *   12mg C /1mmol C

   Solve it for X 

get the % cocaine = Xmg / 1mg   *100%