# Inexact differential

Thermodynamics :
The classical Carnot heat engine :
Branches
Classical
Statistical
Chemical
Quantum thermodynamics
Equilibrium / Non-equilibrium :
Laws
Zeroth
First
Second
Third :
Systems
Closed system
Open system
Isolated system
State
Equation of state
Ideal gas
Real gas
State of matter
Phase (matter)
Equilibrium
Control volume
Instruments
Processes
Isobaric
Isochoric
Isothermal
Adiabatic
Isentropic
Isenthalpic
Quasistatic
Polytropic
Free expansion
Reversibility
Irreversibility
Endoreversibility
Cycles
Heat engines
Heat pumps
Thermal efficiency :
System propertiesNote: Conjugate variables in italics
Property diagrams
Intensive and extensive properties
Process functions
Work
Heat
Functions of state
Temperature / Entropy (introduction)
Pressure / Volume
Chemical potential / Particle number
Vapor quality
Reduced properties :
Material properties
Property databases
Specific heat capacity 
$c=$
$T$$\partial S$$N$$\partial T$
Compressibility 
$\beta =-$
$1$$\partial V$$V$$\partial p$
Thermal expansion 
$\alpha =$
$1$$\partial V$$V$$\partial T$ :
Equations
Carnot's theorem
Clausius theorem
Fundamental relation
Ideal gas law
Maxwell relations
Onsager reciprocal relations
Bridgman's equations
Table of thermodynamic equations :
Potentials
Free energy
Free entropy
Internal energy $U(S,V)$Enthalpy $H(S,p)=U+pV$Helmholtz free energy $A(T,V)=U-TS$Gibbs free energy $G(T,p)=H-TS$ :
HistoryCulture
History
General
Entropy
Gas laws
"Perpetual motion" machines
Philosophy
Entropy and time
Entropy and life
Brownian ratchet
Maxwell's demon
Heat death paradox
Loschmidt's paradox
Synergetics
Theories
Caloric theory
Vis viva ("living force")
Mechanical equivalent of heat
Motive power
Key publications
An Inquiry Concerning the Source ... Friction
On the Equilibrium of Heterogeneous Substances
Reflections on the Motive Power of Fire
Timelines
Thermodynamics
Heat engines
ArtEducation
Maxwell's thermodynamic surface
Entropy as energy dispersal :
Scientists
Bernoulli
Boltzmann
Bridgman
Carathéodory
Carnot
Clapeyron
Clausius
de Donder
Duhem
Gibbs
von Helmholtz
Joule
Kelvin
Lewis
Massieu
Maxwell
von Mayer
Nernst
Onsager
Planck
Rankine
Smeaton
Stahl
Tait
Thompson
van der Waals
Waterston :
Other
Nucleation
Self-assembly
Self-organization
Order and disorder :
Category :
vte :
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\neq \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 an unnecessary 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.

## Notation
### Thermodynamics

Instead of the differential symbol d, the symbol δ 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$.

## Examples
### 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 $2AB$. 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 ∫$_0$$^1$xdy|$_{x=0}$=0{\textstyle \int _{0}^{1}x\, dy|_{x=0}=0} and then integrating over x contributes ∫$_0$$^1$2ydx|$_{y=1}$=2{\textstyle \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 ∫$_0$$^1$2ydx|$_{y=0}$+∫$_0$$^1$xdy|$_{x=1}$=1{\textstyle \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 {d} (x^{2}y).$ And so $x\,\delta u$ is an exact differential.