Partial derivative function definition paradox

I've pondered this question over quite alot and haven't been able to find an answer anywhere. I'm going to ask this question from the standpoint of basic thermodynamics. Let's say I define $p(\rho,T) = \rho R T$ where $R$ is a constant.

$\dfrac{\partial T}{\partial \rho}=0$ since T and $\rho$ are defined independent

Later on lets say we rearrange the function definition and define $T(\rho,p)=\dfrac{p}{\rho R}$

then

$\dfrac{\partial T(\rho,p)}{\partial \rho}=-\dfrac{p}{\rho^2 R}$ = $\dfrac{\partial T}{\partial \rho}$

$0\neq-\dfrac{p}{\rho^2 R}$

How am I supposed to know which derivative to use when using equations online where definitions are mixed like seen above? Furthermore, it appears that $p(\rho,T)$ and $T(\rho,p)$ leads to $T(\rho,p(\rho,T))$ a seemingly recursive definition. If you can, please elaborate. Thank you!!

When you differentiate $p(\rho,T)$ with respect to $\rho$, you vary $\rho$ while you hold $T$ fixed, which you can do because $T$ is not a function of $\rho,$ and as a result, $p$ varies. On the other hand, when you differentiate $T(\rho,p)$ with respect to $\rho,$ now $p$ is not allowed to vary at all, and instead $T$ varies.

In other words, clamp $p$ to a fixed value and wiggle $\rho$ around, and $T$ varies. Clamp $T$ to a fixed value and wiggle $\rho$ around, and $T$ doesn't vary. Surprising? Hardly.

One viewpoint is that partial differentiation tells you what happens to a function defined in a particular way with respect to its parameters, as you vary the values of those parameters. The function $T(\rho,p) = \dfrac p{\rho R}$ --that is, $T$ as a function of independent parameters $\rho$ and $p$-- is a completely different animal from the independent parameter $T$ of the function $p(\rho,T) = \rho RT.$ If it were not, you could write

$$p(\rho,T(\rho,p)) = \rho RT = \rho R\left(\dfrac p{\rho R}\right) = p,$$

in other words, $p$ is what it is no matter what value of $\rho$ you plug in on the left side of that equation. This is just silly. (And it shows that the concerns expressed about a "recursive definition" in the original question are not silly at all.)

If you are dealing with a problem domain in which you must simultaneously define partial derivatives in different ways with respect to the same variables, then it's useful to keep track of how you defined those derivatives. For example, when you took the partial derivative of $T(\rho,p)$ with respect to $\rho,$ you found that $$\left(\dfrac{\partial T}{\partial \rho}\right)_p = -\dfrac{p}{\rho^2 R}.$$ The subscript $p$ on the left side of this equation denotes the fact that you found this partial derivative by holding $p$ fixed. When you first took a partial derivative of $T$ with respect to $\rho$ --that is, when you were considering them as independent parameters of $p(\rho,T)$-- what you actually found was that $$\left(\dfrac{\partial T}{\partial \rho}\right)_T = 0.$$

• It isn't silly. The use case for this is thermodynamics in terms of the triple product rule. en.wikipedia.org/wiki/Triple_product_rule That second proof switches the dependencies around z(x,y), x(y,z)... – Matt Aug 28 '14 at 4:40
• What I meant was, it's silly to define a function $p$ using an expression whose only independent parameters are $\rho$ and $p$ itself. That's quite different from an application of the triple product rule. – David K Aug 28 '14 at 4:45
• If you use the notation of the Wikipedia page on the triple product rule, by the way, then the partial derivatives found by the OP are $\left(\dfrac{\partial T}{\partial \rho}\right)_T=0$ and $\left(\dfrac{\partial T}{\partial \rho}\right)_p=-\dfrac{p}{\rho^2 R}.$ The subscripts indicate that these two partial derivatives are really not the same thing at all, and it's not so surprising that they have different values. – David K Aug 28 '14 at 4:49
• What led me to this question today was this proof en.wikipedia.org/wiki/Relations_between_heat_capacities. It appeared that functional dependencies were switching which appears to not be case. Thank you!! – Matt Aug 28 '14 at 5:19

It's a pretty interesting question, think of it in the followin way. You're working in two different scenarios! In the first, $T,\rho$ are both independent of each other. In the second, you're defining $T$ as something that depends on $\rho$; it's now a function of $\rho$. It's no wonder you're getting different answers - you're working in different scenarios!

• BTW, I think that this answer summarizes @DavidK's answer, which came up a minute before my answer, but which I did not notice. – user122283 Aug 28 '14 at 4:35
• How do you reconcile the triple product rule as posted above? The varying functional dependencies are considered separate? – Matt Aug 28 '14 at 4:45
• @Matt May I answer your question tomorrow? I am in a phone call now. – user122283 Aug 28 '14 at 4:47

In a one-phase, one-component thermodynamic system there are two independent state variables.

Any state function (e.g., entropy, pressure, density, etc.) can be formulated as a function of any two (take-your-pick) variables. In your example, you start with density and temperature as the independent variables but it could have been pressure and entropy.

When taking partial derivatives it is best to use the subscript notation to indicate which other variable is held fixed. You can only allow one to be held fixed as another changes.

For example the differential of temperature using density and pressure as independent state variables is

$$dT= \left(\frac{\partial T}{\partial \rho}\right)_p d \rho+ \left(\frac{\partial T}{\partial p}\right)_{\rho} d p$$

Whence,

$$1=\left(\frac{\partial T}{\partial T}\right)_{\rho}= \left(\frac{\partial T}{\partial \rho}\right)_p \left(\frac{\partial \rho}{\partial T}\right)_{\rho} + \left(\frac{\partial T}{\partial p}\right)_{\rho} \left(\frac{\partial p}{\partial T}\right)_{\rho}=\left(\frac{\partial T}{\partial p}\right)_{\rho} \left(\frac{\partial p}{\partial T}\right)_{\rho}\\ \implies\left(\frac{\partial T}{\partial p}\right)_{\rho} = 1/\left(\frac{\partial p}{\partial T}\right)_{\rho}$$