where ΔE is the change in energy of the system, Q is the heat added to the system, and W is the work done by the system.