Clarification about the difference of internal energy formula I am trying to understand the concept of internal energy and it's difference. My textbook said that the difference in internal energy of a system is 

$$
\Delta U=Q+W
$$
where $Q$ is the heat absorbed or released by system and $W$ is the work done by system to the surrounding or by the surrounding to the system. After that, it mentioned that the signs of $W$ and $Q$ are determined like this:


  The work done by surrounding to system: $(+)$. The work done by system to surrounding: $(-)$. Same on heat.


After that general definitions, it started to explain the internal energy differences in various systems like isochoric system, isobaric system. In the section of isobaric system it says that:


  If a system were free that can expand against external pressure, when heat is given to that system, it will give some energy by doing some work. So the internal energy difference is:$$
\Delta U=Q_p-W
$$ where $Q_p$ is the heat given to a isobaric system.


It is completly OK till the new formula, but isn't the new formula bizarre? Because if we give heat to a system and it will do work. As a result the difference would be like:

$$
\Delta U_{example}=Q_{p_{example}}-(-W_{example})
$$
So, does the work done by system increase its internal energy?
Your book has driven you crazy with its stupid sign convention.  If the gas is expanding against constant pressure, then the equation is still $$\Delta U=Q+W$$ but, in this case, the work done on the system by the surroundings is negative (i.e., W is a negative number, because the system is doing work on the surroundings).  So not all the heat added to the system is being used to increase its internal energy.  The increase in internal energy is less than if the gas was not pushing back its surroundings.