It is stated that the energy change of a "system" during a reaction = q + w
where q is the heat released / absorbed while w is the work done by or on the system.
I just don't quite understand.
For example, there is a stoppered conical flask connected to a syringe, where dilute HCl and Mg is in the flask to do reaction that produces hydrogen gas as product. Hydrogen gas would then push the syringe forward (away from the conical flask) because of the presure built up by the hydrogen gas. However, when we considered microscopically, it is the increase of kinetic energy that pushes the syringe forward, while the chemical reaction is exothermic, so it will heat up the gas.. while heating up the gas in turn means the kinetic energy of the gas, I just doubt it will not double count the energy when we use E = q + w
I know I must have something wrong with my concept because E = q+w won't be wrong, but I really can't understand this formula. Thank you very much