# Differentiating the ideal gas law

In reading Fermi's Thermodynamics, to show that $C_p = C_v + R$, the author differentiates the ideal gas law for a mole of gas ($PV = RT$) to obtain: $PdV + VdP = RdT$. Now, the only way I am able to interpret this, is by assuming that all three variables depend on time, so that one could differentiate both sides, yielding $$\frac{d}{dt}(PV)=\frac{d}{dt}RT \equiv P\frac{dV}{dt} + V\frac{dP}{dt} = R\frac{dT}{dt}$$

You could then "multiply both sides with $dt$" to get the desired result. (I apologize if this last phrase is non-sense, but I am still very bad working with infinitesimals). Is this the correct reasoning, or is there some completely different path to the same result?

-
I'm not going to write an answer, since Adam Zalcmans answer is already a very good and formal. I just wanted to add that the assumption the variables depend on time is not justified since the book is probably working in an equilibrium framework at this point. And even if these system parameters would depend on time, a partial time derivative would suffice. –  NikolajK Dec 20 '11 at 8:32
The problem with your reasoning is that you are implicitly assuming that the system is evolving along some path $(V(t), P(t), T(t))$ and you know that some thermodynamic relations are only valid for certain kind of paths (like isothermal, adiabatic...). Your reasoning should still work fine as long as you realize that the equation should be valid for any path. –  Edgar Bonet Dec 20 '11 at 10:15

The notation df denotes differential of function f. The differential df is a map

$$df:\mathbb{R}\rightarrow \Omega^1(\mathbb{R})$$

where Ω1(ℝ) is the set of linear maps from ℝ to ℝ. The linear map corresponding to point p∈ℝ is often written as dfp

$$df(p)=df_p$$

Note that in less formal settings p is often omitted altogether.

You are probably used to thinking about differentiation in a somewhat different way: given a function f from ℝ to ℝ, you create a different function f' also from ℝ to ℝ. This way for every point p on the real line ℝ you get a number f'(p). In order to introduce infinitesimal quantities more formally one needs to realize that a number, like f'(p) can be regarded as a linear map from ℝ to ℝ. This is more abstract, but what we're doing is identifying real number a with the linear map from ℝ to ℝ which takes its sole argument and returns its product with a. The simplest case to consider is the identity function which maps x to x. It's derivative is equal to 1 for every point on the real line. Therefore, dxp is equal to an identity transformation for every point p on the real line.

Now, in order to define dfp explicitly for an arbitrary function f, we notice that the set of all linear maps from ℝ to ℝ is a one-dimensional vector space. Any non-zero linear map from ℝ to ℝ can be chosen to be its sole base vector, but the choice of dxp, i.e. the differential of the identity function, is most convenient. The differential of an arbitrary differentiable function f is then defined as

$$df_p=f'(p)dx_p$$

This equation can be used to prove that d operator obeys similar laws to those for ordinary derivative. In particular,

$$d(f \cdot g)_p = (f \cdot g)'dx_p = f'(p)\cdot g(p) dx_p + f(p)\cdot g'(p)dx_p = g\cdot df_p + f\cdot dg_p$$

Similarly, for constant c one obtains

$$d(c\cdot f)_p = c \cdot df_p$$

If you apply these to the gas equation, you're going to obtain exactly the same result as in your book.

The purpose of differentials is to provide a formal way to think about infinitesimal quantities. For many practical purposes your intuitive reasoning and "division by dt" is often sufficient.

The usefulness of this construction becomes more apparent for the general n-dimensional case.

For more details see wikipedia articles on differential, differential forms and exterior algebra.

-
@Ron, your criticism of this answer is completely incoherent gibberish. "Differential" (noun) is the correct word for ${\rm d}f$ which, in calculus (and physics), always means exactly the same thing that you terminologically incorrectly represent by the (noun?) "infinitesimal". See the first line under "mathematics" at en.wikipedia.org/wiki/Differential - All these differentials (and this is the only correct word!) are always and by definition infinitesimal (adjective) quantities so it's nonsensical to say that the agreement holds only to the leading order: there's no other order. –  Luboš Motl Dec 21 '11 at 21:12
@Lubos: You are just wrong about this. The notion of infinitsimal does not coincide with the notion of differential, as can be seen from the case in my comment above, where $dn^2 = dt$. How do you interpret a second-order infinitesimal coinciding with a first order? You just never studied Ito calculus. It is important to learn this, because it can be interpreted as the first rigorous path integral construction. –  Ron Maimon Dec 21 '11 at 23:15
@Ron (Finally got time to read all this) Don't you see the irony here? You downvoted this answer despite it being correct also by your own judgement and only because you disliked the mathematical formalism (your word: "obscurantism") and now you come brandishing Itō calculus. In an attempt to elucidate what this answer has so unbearably obscured, I suppose? –  Adam Zalcman Dec 22 '11 at 21:16
@Adam: The point of the Ito calculus is not obscurantism, just the opposite! The Ito calculus makes it clear that you need to use infinitesimal increments, and not falsely pretend that the concept is captured by linear algebra on tangent spaces. The Ito calculus, expressed correctly, is as transparent as ordinary calculus, it just requires you to note that $dn^2$ is an infinitesimal of the same order of magnitude as $dt$, and this doesn't happen in the realm of differentiable stuff. I wish there were a differentiable example of cases where differential orders don't match. But there can't be. –  Ron Maimon Dec 23 '11 at 1:22
@Adam: I hope you will come to understand that the interpretation of "dV" and "dP" as "coordinate projecting one forms" is 20th century dipshits taking a dump on the great classical work of Cavalieri and Leibnitz, that it is motivated by snobbery and stupidity (because Cavalieri was not an academic) and that absent the genius of Abraham Robinson, the issue could have festered indefinitely. I hope you take the time to learn Ito calculus to the point where you will see that my example is apropos, and this is not smoke and mirrors. –  Ron Maimon Dec 23 '11 at 1:25

The meaning of the "d"s is that the are comparing two states with infintesimally different state variables. The change in the quantity PV is PdV + V dP, meaning P times the infinitesimal change in V plus V times the infinitesimal change in P. This is for the same reason that 2.001*3.001 = 6.005 up to an error which is of a much smaller order of magnitude.

Calculus is a method of classifying infinitesimal quantities into orders corresponding to their power, and knowing which ones are negligible compared to which other ones. It is pointless to hide this interpretation, it is the working idea that people have when writing down these formulas, and it is the original interpretation.

Any other interpretation is a later attempt to remove the notion of infinitesimal, because it is logically suspect, because a true infinitesimal number, a number which is smaller than $1\over N$ for all integers $N$, does not exist in certain interpretations.

### Differential operators are a crude approximation

The metamorphosis from infinitesimals to differential operators appears through the following pointless chain of ideas. In the rest, I will switch notations, so that "$\delta V$" means an actual infinitesimal change in V, while "$dV$ is now a linear operator which takes a vector whose V,P components are (a,b) and returns the component a. The two are algebraically equivalent for linear operations, as I will explain below.

Let us consider V and P as a (trivial, two dimensional) manifold. Then you can consider at each point $(V,P)$ an actual infinitesimal change in V and P, which produce $(V+\delta V , P + \delta P)$. Given any function F(V,P), the infinitesimal change in F will be

$$\delta F = {\partial F\over \partial V} \delta V + {\partial F\over \partial P}\delta P$$

This is a formula for infinitesimal changes, valid to first infinitesimal order. It means "the change in F is equal to the V-partial times the change in V plus the P-partial times the change in P". Mathematicians didn't like infinitesimals between 1820 and 1940, so they strive to eliminate the infinitesimal language.

For differentiable F, where the above makes sense, the infinitesimal changes always are linear and additive to lowest order, unlike finite changes. So you can consider the changes $(\delta V,\delta P)$ to make a vector space. Now you can imagine the linear operator dV, called a differential operator, which projects out the V-component of the vector. Then, for a general vector U of infinitesimal quantities (\delta V, \delta P), consider the non-infinitesimal operator

$${\partial F \over \partial V} dV + {\partial F\over \partial P} dP$$

acting on the vector with infinitesimal components $(\delta V, \delta P)$, it produces $\delta F$, so it is reasonable to say

$$dF = {\partial F \over \partial V} dV + {\partial F\over \partial P} dP$$

This is the correct law for combining the linear projection operators dV and dP to make the projection operator dF.

But these linear component-projecting operators, dF,dV,dP are not infinitesimals. They are purely linear operators. These are the stunted version of infinitesimals mathematicians are allowed to reveal to students. Physicists cannot waste their time this way, and they introduce infinitesimals early, and use them often, without comment.

Infinitesimals may be consistently squared, cubed, etc. producing quantities of smaller infinitesimal order, which also linearly combine. You can take the square-root of an infinitesimal, which is necessary for Ito calculus, or the fractional root of an infinitesimal, which physicists will do while analyzing Levy flights.

Differentials do not do powers. The expression "dV^2" is meaningless, although it can mean $dV\otimes dV$, which is the tensor product, this is an operation on two vectors. It can also mean "apply dV to a noninfinitesimal vector and square the result", but this is also pretty meaningless, because the infinitesimal order is lost. If you try to talk about $\sqrt{dV}$, as you must for random walks on V,P space, forget it.

### Higher order infinitesimals

Fermi and other physicists often use this when discussing quantities which are quadratic, like the extra length in a guitar string in the shape $\delta Y(x)$, where $\delta Y$ is infinitesimal.

$$\delta L = \int \sqrt{1+\delta Y^2 } - L = \int {1\over 2} (\delta Y)^2$$

$\delta Y$ is a second order infinitesimal.

The rigorous version of infinitesimal arguments is given by Abraham Robinson, one of the truly great mathematicians of the 20th century. This theory is the best formal match to the manipulations with infinitesimals that physicists do. It is not really necessary to learn the formal theory to work with infinitesimals, however, because they are very simple formally, in the cases that physicists use.

### Fractional order infinitesimals

To give an example where infinitesimal reasoning is essential, consider a Brownian random walk x(t). This walk has a velocity at any time, defined by a finite difference

$${dx \over dt} \approx {\Delta X \over \Delta t}$$

the limit as $\Delta t$ approaches zero is not regular, because the Brownian motion is not differentiable. In time $\delta t$ it goes an amount proportional $\sqrt{\delta t}$. So the velocity of a Brownian motion is divergent at every time, it doesn't have a limit. But it does have a well defined limit as a distribution, because its integral is continuous.

Now you can ask, what is the distributional difference of

$$x(t+\epsilon) {dx\over dt} - x(t) {dx\over dt}$$

This evaluates to

$${(dx)^2 \over dt}$$

which is effectively constant, it is equal to 1 as a distribution, because it is a rapidly fluctuating quantity with mean 1 in a lattice approximation (say). This means that, identifying time order with operator order,

$$XV - VX = 1$$

which is the Euclidean canonical commutation relation. This identity is known as Ito's lemma in mathematics.

If you do not understand that $dx^2$ is proportional to $dt$, you will never understand Ito's lemma, and you will never understand how the path integral works, because this is how the path integral makes the canonical commutation relations. The paths are continuous and not differentiable, and there is a correlation between the future value and the current velocity which doesn't vanish in the limit that the interval shrinks to zero, because the velocity is infinity.

I challenge anybody to explain this clearly without using "dx" and "dt" as infinitesimal quantities (or limiting quantities), rather than differentials. It is plainly impossible, because the walk is not differentiable.

I went throught this tedious explanation, already contained in several places on Wikipedia, because of the downvotes precipitated by Lubos Motl's ignorant comments. I normally don't care about downvotes, but this answer is for elementary students, who might.

-
It is ridiculous to downvote this answer without explanation. –  Ron Maimon Dec 22 '11 at 3:36
-1 This post obscures the answer to the original question. None of the limitations of differentials invoked here are actually applicable to the issue at hand. The entire deliberation on Brownian motion and square roots is at best a lengthy digression with a significant dose of mathematical obscurantism and the closing remarks just make it a mere vehicle for personal argument. –  Adam Zalcman Dec 22 '11 at 22:00
@Adam: The use of differentials as a stand in for infinitesimals is no good. The example of Ito's lemma is important for a case where you use fractional powers of infinitesimals, something which is not captured by the idea of differentials. But I appreciate the explanation, and I believe people can honestly disagree about the best explanations. I hope you will awaken to the joy of infinitesimals someday. Cheers. –  Ron Maimon Dec 23 '11 at 1:08
This "fractional powers of infinitesimals" is NOT ordinary calculus nor topology, it is a COMPLETELY different notion that is irrelevant for these questions... differentials = infinitesimals here, WITHOUT QUESTION. What you're doing is like saying "why only pay attention to countable-infinity of $\mathbb{Z}$ when there is uncountable-infinity of $\mathbb{R}$" -- well because we are not working with $\mathbb{R}$. –  Chris Gerig Jan 29 '12 at 23:53
@Chris Gerig: It is not a completely different notion, it is always the same thing--- infinitesimal increments. It only is superficially different when you consider linear infinitesimals as differentials (because you are familiar with the theory) but ignore fractional power infinitesimals because they are "completely different". The infinitesimal notion is not going away, it is central to mathematics, and this person's confusion entirely relates to its application. –  Ron Maimon Jan 30 '12 at 2:19

Hope the following take on this question is of interest. It goes beyond the above answers in that it resolves the problem for a general thermodynamical substance with equations of state $T=f(p,V)$, $S=g(p,V)$. A simple application of the chain rule and the inverse function theorem shows that $C_p-C_V=\dfrac f{f_1f_2}$ (the subscripts denote partial derivatives with respect to $p$ and $V$ respectively). For a systematic treatment which places this in a very general context, see the arXiv article 1102.1540). This immediately gives the required formula and, indeed, the corresponding one for more elaborate models such as the van der Waals gas.

-