Regarding the infinitesimal form of the First Law of Thermodynamics First Law of Thermodynamics is expressed as[1]


  The internal energy of an isolated system is constant.


If $w$ denotes the work done on a system, $q$ for the energy transferred as heat to the system, and $\Delta U$ for the resulting change in internal energy, then it follows that $$\Delta U = q + w \label{1}\tag{1}$$

$$\mathrm{d}U = \mathrm{d}q + \mathrm{d}w \label{2}\tag{2}$$

What I don't understand is how does $\eqref{2}$ follow mathematically from $\eqref{1}$. Taking the limit $\Delta U \rightarrow 0$ gives the left-hand side but how does $q$ change into $\mathrm{d}q$ and $w$ into $\mathrm{d}w$? I understand the interpretation of both the equations physically. Is this related to the fact that $U$ is a state function whereas $q$ and $w$ are not?

Reference:

[1] Atkins, P.; de Paula, J. Physical Chemistry, 10th ed; Oxford UP: Oxford, U.K., 2014.
The first law of thermodynamics is a statement of energy conservation thus and defines the internal energy E as an extensive state function. In an infinitesimal transformation, the first then law reduces to
$$\mathrm{d}E = \mathrm{d}Q + \mathrm{d}W$$

where $\mathrm{d}E$ is a total (exact) differential for infinitesimal transformation. 

However, $\mathrm{d}Q$ and $\mathrm{d}W$ are not exact ($Q$ and $W$ are not state functions); $Q$ and $W$ in a thermodynamics transformation are process-dependent. All of these are properties of functions of more than one variables