Inexact differential

An inexact differential or imperfect differential is a differential whose integral is path dependent. It is most often used in thermodynamics to express changes in path dependent quantities such as heat and work, but is defined more generally within mathematics as a type of differential form. In contrast, an integral of an exact differential is always path independent since the integral acts to invert the differential operator. Consequently, a quantity with an inexact differential cannot be expressed as a function of only the variables within the differential. I.e., its value cannot be inferred just by looking at the initial and final states of a given system. Inexact differentials are primarily used in calculations involving heat and work because they are path functions, not state functions.

Definition
An inexact differential $$ \delta u $$ is a differential for which the integral over some two paths with the same end points is different. Specifically, there exist integrable paths $$ \gamma_1, \gamma_2: [0,1]\to\mathbb{R} $$ such that $$\gamma_1(0) = \gamma_2(0)$$, $$\gamma_1(1) = \gamma_2(1)$$ and $$ \int_{\gamma_1} \delta u \not= \int_{\gamma_2} \delta u $$ In this case, we denote the integrals as $$ \Delta u|_{\gamma_1} $$ and $$ \Delta u|_{\gamma_2} $$ respectively to make explicit the path dependence of the change of the quantity we are considering as $$ u $$.

More generally, an inexact differential $$ \delta u $$ is a differential form which is not an exact differential, i.e., for all functions $$ f $$, $$ \mathrm{d}f \ne \delta u $$

The fundamental theorem of calculus for line integrals requires path independence in order to express the values of a given vector field in terms of the partial derivatives of another function that is the multivariate analogue of the antiderivative. This is because there can be no unique representation of an antiderivative for inexact differentials since their variation is inconsistent along different paths. This stipulation of path independence is a necessary addendum to the fundamental theorem of calculus because in one-dimensional calculus there is only one path in between two points defined by a function.

Thermodynamics
Instead of the differential symbol $d$, the symbol $&delta;$ is used, a convention which originated in the 19th century work of German mathematician Carl Gottfried Neumann, indicating that $Q$ (heat) and $W$ (work) are path-dependent, while $U$ (internal energy) is not.

Statistical Mechanics
Within statistical mechanics, inexact differentials are often denoted with a bar through the differential operator, đ. In LaTeX the command "\rlap{\textrm{d}}{\bar{\phantom{w}}}" is an approximation or simply "\dj" for a dyet character, which needs the T1 encoding.

Mathematics
Within mathematics, inexact differentials are usually just referred more generally to as differential forms which are often written just as $$ \omega $$.

Total distance
When you walk from a point $$ A $$ to a point $$ B $$ along a line $$ \overline{AB} $$ (without changing directions) your net displacement and total distance covered are both equal to the length of said line $$ AB $$. If you then return to point $$ A $$ (without changing directions) then your net displacement is zero while your total distance covered is $$ 2 AB $$. This example captures the essential idea behind the inexact differential in one dimension. Note that if we allowed ourselves to change directions, then we could take a step forward and then backward at any point in time in going from $$ A $$ to $$ B $$ and in-so-doing increase the overall distance covered to an arbitrarily large number while keeping the net displacement constant.

Reworking the above with differentials and taking $$ \overline{AB} $$ to be along the $$ x $$-axis, the net distance differential is $$ \mathrm{d}f = \mathrm{d}x $$, an exact differential with antiderivative $$ x $$. On the other hand, the total distance differential is $$ |\mathrm{d}x| $$, which does not have an antiderivative. The path taken is $$ \gamma : [0,1] \to \overline{AB} $$ where there exists a time $$ t \in (0,1) $$ such that $$ \gamma $$ is strictly increasing before $$ t $$ and strictly decreasing afterward. Then $$ \mathrm{d}x $$ is positive before $$ t $$ and negative afterward, yielding the integrals, $$\Delta f = \int_\gamma \mathrm{d}x = 0 $$ $$\Delta g|_\gamma = \int_\gamma |\mathrm{d}x| = \int_A^B \mathrm{d}x + \int_B^A (-\mathrm{d}x) = 2 \int_A^B \mathrm{d}x = 2AB $$ exactly the results we expected from the verbal argument before.

First law of thermodynamics
Inexact differentials show up explicitly in the first law of thermodynamics, $$\mathrm{d}U = \delta Q - \delta W$$ where $$U$$ is the energy, $$\delta Q$$ is the differential change in heat and $$\delta W$$ is the differential change in work. Based on the constants of the thermodynamic system, we are able to parameterize the average energy in several different ways. E.g., in the first stage of the Carnot cycle a gas is heated by a reservoir, giving us an isothermal expansion of that gas. Some differential amount of heat $$\delta Q = TdS$$ enters the gas. During the second stage, the gas is allowed to freely expand, outputting some differential amount of work $$\delta W = PdV$$. The third stage is similar to the first stage, except the heat is lost by contact with a cold reservoir, while the fourth cycle is like the second except work is done onto the system by the surroundings to compress the gas. Because the overall changes in heat and work are different over different parts of the cycle, there is a nonzero net change in the heat and work, indicating that the differentials $$\delta Q$$ and $$\delta W$$ must be inexact differentials.

Internal energy $U$ is a state function, meaning its change can be inferred just by comparing two different states of the system (independently of its transition path), which we can therefore indicate with $U_{1}$ and $U_{2}$. Since we can go from state $U_{1}$ to state $U_{2}$ either by providing heat $Q = U_{2} − U_{1}$ or work $W = U_{2} − U_{1}$, such a change of state does not uniquely identify the amount of work $W$ done to the system or heat $Q$ transferred, but only the change in internal energy $ΔU$.

Heat and work
A fire requires heat, fuel, and an oxidizing agent. The energy required to overcome the activation energy barrier for combustion is transferred as heat into the system, resulting in changes to the system's internal energy. In a process, the energy input to start a fire may comprise both work and heat, such as when one rubs tinder (work) and experiences friction (heat) to start a fire. The ensuing combustion is highly exothermic, which releases heat. The overall change in internal energy does not reveal the mode of energy transfer and quantifies only the net work and heat. The difference between initial and final states of the system's internal energy does not account for the extent of the energy interactions transpired. Therefore, internal energy is a state function (i.e. exact differential), while heat and work are path functions (i.e. inexact differentials) because integration must account for the path taken.

Integrating factors
It is sometimes possible to convert an inexact differential into an exact one by means of an integrating factor. The most common example of this in thermodynamics is the definition of entropy: $$\mathrm{d}S = \frac{\delta Q_\text{rev}}{T}$$ In this case, $δQ$ is an inexact differential, because its effect on the state of the system can be compensated by $δW$. However, when divided by the absolute temperature and when the exchange occurs at reversible conditions (therefore the rev subscript), it produces an exact differential: the entropy $S$ is also a state function.

Example
Consider the inexact differential form, $$\delta u = 2y\,\mathrm{d}x+x\,\mathrm{d}y.$$ This must be inexact by considering going to the point $(1,1)$. If we first increase $y$ and then increase $x$, then that corresponds to first integrating over $y$ and then over $x$. Integrating over $y$ first contributes $\int_0^1 x\,dy |_{x=0}=0$ and then integrating over $x$ contributes $\int_0^1 2y \, \mathrm \mathrm{d}x|_{y=1}=2$. Thus, along the first path we get a value of 2. However, along the second path we get a value of $\int_0^1 2y\,\mathrm{d}x|_{y=0}+\int_0^1 x\,\mathrm{d}y|_{x=1}=1$. We can make $$\delta u$$ an exact differential by multiplying it by $x$, yielding $$x\,\delta u = 2xy\,\mathrm{d}x+x^2\,\mathrm{d}y = \mathrm \mathrm{d}(x^2y)$$. And so $$x\,\delta u$$ is an exact differential.