8

The first law of thermodynamics states that

$$dU=\delta Q - \delta W$$

I have only just graduated high school and I am finding the above form of the equation rather difficult to understand due to the fact that I don't understand what inexact differentials are. Is it possible for anybody to please explain this to me? (I have taken an A.P course in calculus in school).

ACuriousMind
  • 132,081

2 Answers2

14

The mostly math-free explanation:

The internal energy $U$ is a function of state. It depends only on the state of the system and not how it got there. The notions of heat $Q$ and work $W$ are no such functions - they are properties of a process, not of a state of the thermodynamic system. This means that we can compute the infinitesimal change $\mathrm{d}U$ as the actual change $U$ of the function between two infinitesimally close points, but the infinitesimal changes in heat and work $\delta Q,\delta W$ depend on the way we move from one such point to the other.

More formally:

Now, you should imagine the state space of thermodynamics, and the system taking some path $\gamma$ in it. We call the infinitesimal change in internal energy $\mathrm{d}U$, which is formally a differential 1-form. It's the object that when integrated along the path gives the total change in internal energy, i.e. $U_\text{end}-U_\text{start} = \int_\gamma \mathrm{d} U$. You may think of this as completely analogous to other potentials in physics: If we have a conservative force $F = -\nabla U$, then integrating $F$ along a path taken gives the difference between the potential energies of the start and the end of the path. This is why $U$ is sometimes called a "thermodynamic potential", and this means that the $\mathrm{d}U$ is an actual differential - it is the derivative of the state function $U$.

Since $W$ and $Q$ are not state functions, there are no differentials $\mathrm{d}W$ or $\mathrm{d}Q$. However, along any given path $\gamma$, we can compute the infinitesimal change in work and heat, and also the total change $\Delta W[\gamma]$ and $\Delta Q[\gamma]$, so heat and work are functionals on paths. It turns out that, together with linearity - the work along two paths is the sum of work along each of them - this is enough to know that there are two differential 1-forms representing heat and work on the entire state space (for a formal derivation of this claim, see this excellent answer by joshphyiscs). These forms we call $\delta W$ and $\delta Q$, where we use $\delta$ instead of $\mathrm{d}$ to remind us that these are not differentials of state functions.

ACuriousMind
  • 132,081
5

The operative question here is: did your course cover multi-variate calculus, or just the calculus of one variable? If not, then you're dealing with something new. (Or ... were. This is 7 years past, now, at the time of writing.)

All differential relations are exact for univariate calculus. That means, if you write: $$dy = A dx$$ then you can express $y = f(x)$, for some function $f$ of $x$, such that $f'(x) = A$. So, when you see the term "inexact differential" that means you have multiple variables involved and you're dealing with multi-variate calculus.

If $z = f(x,y)$ is a function of two variables $x$ and $y$, then its differential $dz$ is expressed in terms of the differentials $dx$ and $dy$ as: $$dz = f_x(x,y) dx + f_y(x,y) dy,$$ with the differential coefficients written as: $$\frac{∂z}{∂x} = f_x(x,y), \quad \frac{∂z}{∂y} = f_y(x,y).$$ Thus, for instance, if $z = x^2y + 2y$, then the differential relation can be written as $$dz = (2xdx)y + x^2 dy + 2 dy = (2xy) dx + (x^2 + 2) dy,$$ and the corresponding differential coefficients are: $$\frac{∂z}{∂x} = 2xy, \quad \frac{∂z}{∂y} = x^2 + 2.$$ These are the partial derivatives of $z$ with respect to $x$ and $y$.

A differential form $A dx + B dy$ is exact if there is function $f(x,y)$, such that $A = f_x(x,y)$ and $B = f_y(x,y)$. The hallmark condition for that arises from the fact the order of mixed partial derivatives commute. For instance $$\frac{∂}{∂y}\frac{∂z}{∂x} = \frac{∂}{∂y}(2xy) = 2x,\quad \frac{∂}{∂x}\frac{∂z}{∂y} = \frac{∂}{∂x}(x^2 + 2) = 2x.$$ Thus $$\frac{∂}{∂y}\frac{∂z}{∂x} = \frac{∂}{∂x}\frac{∂z}{∂y}.$$

So, a test for the exactness of $A dx + B dy$ is that $$\frac{∂A}{∂y} = \frac{∂B}{∂x}.$$ The test and condition can be directly and cleanly stated using Grassmann algebra with differential forms. The formalism of differential forms and its associated algebra are best explained by illustrating its use here: $$\begin{align} d(A dx) &= dA∧dx + A d(dx)\\ &= \left(\frac{∂A}{∂x} dx + \frac{∂A}{∂y} dy\right)∧dx + A d^2x\\ &= \frac{∂A}{∂x} dx∧dx + \frac{∂A}{∂y} dy∧dx & \text{since }d^2x = 0,\\ &= -\frac{∂A}{∂y}dx∧dy & \text{since }\left\{\begin{matrix}dx∧dx = 0,\\dy∧dx = -dx∧dy\end{matrix}\right\};\\ d(B dy) &= \left(\frac{∂B}{∂x} dx + \frac{∂B}{∂y} dy\right)∧dy + B d^2y\\ &= \frac{∂B}{∂x}dx∧dy;\\ d(A dx + B dy) &= d(A dx) + d(B dy)\\ &= \left(\frac{∂B}{∂x} - \frac{∂A}{∂y}\right) dx∧dy. \end{align}$$

A differential form $ω = A dx + B dy$ is closed if $dω = 0$. It is exact if $ω = dz$, for some $z = f(x,y)$, and the process of finding the function $f(x,y)$ that produces the differential equation - as in the univariate case - is called integrating the differential equation and the differential form $ω$. All exact differential forms are closed; so checking closure is a test for exactness. With the right extra assumptions, it's also a watertight test for exactness.

A central hypothesis of thermodynamics is that the inexact differential form $δQ$, as you denoted it, can be made exact with an integrating factor: $$dS = \frac{δQ}{T}.$$ The extra factor $T$ is identified as the temperature, and the variable $S$ that it integrates to, when the factor is included, is the entropy.

An example of an inexact differential form that can be made exact with an integrating factor is $$x dy - y dx.$$ It becomes exact with $$\frac{x dy - y dx}{x^2}.$$ You can verify this by showing that it is closed, i.e. that: $$\frac{∂}{∂x}\frac{x}{x^2} = \frac{∂}{∂x}\frac{1}{x} = -\frac{1}{x^2} = \frac{∂}{∂y}\frac{-y}{x^2}.$$ Its integration can be made transparent by rewriting it as: $$\frac{x dy - y dx}{x^2} = \frac{1}{x}dy + \left(\frac{-dx}{x^2}\right)y = \frac{1}{x}dy + d\left(\frac{1}{x}\right)y = d\left(\frac{y}{x}\right).$$

So, it is exact -- except in the vicinity of $x = 0$. So, in any region of the $(x,y)$-plane that stays away from the $y$ axis - which is where $x = 0$ - the differential form is exact.

NinjaDarth
  • 2,850
  • 7
  • 13