# First Law of Thermodynamics and path-dependence of $dU = \bar{d}Q + \bar{d}W$

The first law of thermodynamics can be expressed mathematically as

$dU = \bar{d}Q + \bar{d}W$

Where $dU$ is an exact differential and $\bar{d}Q$ and $\bar{d}W$ are inexact differentials.

Now we know that $U$ is a state function, however $Q$ and $W$ are process functions (correct me if I'm wrong). Mathematically that means that $U$ is independent of path, whereas $Q$ and $W$ are path dependent.

Hence $\Delta U = U_f - U_i = c$ for all paths between the points $i$ and $f$. However $\Delta Q= Q_f -Q_i \neq a$ and $\Delta W= W_f -W_i \neq b$ for constants $a$ and $b$ for all paths between the points $i$ and $f$. How can that be possible?

How can a path independent function be the sum of two path dependent functions?

• Why should that not be possible? E.g. f(x)=x depends on x, g(x)=1-x depends on x, f(x)+g(x) does not. May 10, 2017 at 20:51

However $\Delta Q= Q_f -Q_i \neq a$ and $\Delta W= W_f -W_i \neq b$ for constants $a$ and $b$ for all paths between the points $i$ and $f$.
The key point is that there is no such thing as $\Delta Q= Q_f -Q_i$ and $\Delta W= W_f -W_i$.
The first law should be written as $\Delta U = Q-W$ where $\Delta U = U_{\rm final}-U_{\rm initial}$ is the change in internal energy of the system, $Q$ is the heat supplied to the system and $W$ is the work done by the system.
It is sometimes written as $\Delta U = \delta Q-\delta W$ where $\delta Q$ is the infinitesimal increment of heat supplied to the system and $\delta W$ is the infinitesimal increment of work done by the system.