# Partial derivatives when the function's inputs are dependent on the same variable

at 53:13 of this lecture by mit ocw, the prof. Moungi Bowendi writes,

$$(\frac{\partial U}{\partial T})_{p} = (\frac{\partial U}{\partial T})_{v} + (\frac{\partial U}{\partial T})_{T} (\frac{\partial V}{\partial T})_{p}$$

Before this he wrote,

$$U(T,V(p,T) )$$

i.e: U is a function of both temperature and volume with volume being dependent on temperature and pressure. Now if this is so, how is it possible to take partial derivative of internal energy with respect to temperature at fixed volume because as soon as you change the temperature aren't you changing the volume?

• Minor comment to the post (v1): Please consider to mention explicitly speaker, title, etc. of link, so it is possible to reconstruct link in case of link rot. Sep 5 '20 at 8:10
• Perhaps it should be $$(\frac{\partial U}{\partial T})_{p} = (\frac{\partial U}{\partial T})_{v} + (\frac{\partial U}{\partial V})_{T} (\frac{\partial V}{\partial T})_{p}$$ Sep 5 '20 at 8:30
• how is that different from what I have written... or am I missing something? Sep 5 '20 at 8:30
• You are assuming that a system cannot receive/transfer energy To/from its surroundings? Why? There are isochoric or constant volume processes. Sep 5 '20 at 8:35
• you didn't get me, in that video he says that volume is a function of the temperature itself, so if you change the temperature then by the definition, if you physically change the temperature, the volume MUST change unless it is at a saddle point Sep 5 '20 at 8:43

Initially you're considering $$U$$ as a function of $$T,V$$, i.e you have a function $$U:\Bbb{R}^2\to \Bbb{R}$$, $$(T,V)\mapsto U(T,V)$$. Physically you interpret this as telling you the internal energy of a system in terms of the temperature and volume.

Next, you have volume as a function of temperature and pressure. Formally, this means you have a function $$\xi:\Bbb{R}^2\to \Bbb{R}$$, where the physical interpretation is that for every $$(p,T)\in \Bbb{R}^2 = \text{domain}(\xi)$$, the value $$\xi(p,T)\in \Bbb{R}$$ gives the volume of the system when it is at a pressure $$p$$ and temperature $$T$$. And just so we're crystal clear on the notation, $$\xi(a,b)$$ is a real number which tells you the volume of the system when it is at a pressure of $$a$$ and at temperature $$b$$ (in whatever units you fancy).

Finally, you're constructing a new function which you're obtaining via composition, $$\zeta:\Bbb{R}^2\to \Bbb{R}$$ defined as \begin{align} \zeta(p,T):= U(T, \xi(p,T)). \end{align} Now, you have to apply the chain rule, which says that for all $$(p,T)\in \Bbb{R}^2$$, \begin{align} (\partial_2\zeta)_{(p,T)} &= (\partial_1U)_{(T,\xi(p,T))} + (\partial_2U)_{(T,\xi(p,T))} \cdot (\partial_2\xi)_{(p,T)}, \tag{i} \end{align} where I'm using the notation $$(\partial_if)_{(\alpha,\beta)}$$ to mean the partial derivative of the function $$f$$ with respect to it's $$i^{th}$$ entry, evaluated at the point $$(\alpha,\beta)$$.

Now, another way to write this same equation is to say that for all $$(p,T) \in \Bbb{R}^2$$, \begin{align} \dfrac{\partial \zeta}{\partial T}\bigg|_{(p,T)} &= \dfrac{\partial U}{\partial T}\bigg|_{(T, \xi(p,T))} + \dfrac{\partial U}{\partial V}\bigg|_{(T, \xi(p,T))} \cdot \dfrac{\partial \xi}{\partial T}\bigg|_{(p,T)} \tag{ii} \end{align}

Throughout this answer I have intentionally used weird letters like $$\xi, \zeta$$ to emphasize that there are several different functions involved, and your confusion comes from the fact that you don't realize this (because the notation you use hides this fact, so it's very difficult to decipher unless you already know what you're doing).

The function $$(p,T)\mapsto \xi(p,T)$$ is physically what we interpret as "volume expressed as a function of pressure and temperature". You have denoted this as $$V(p,T)$$. I intentionally used the weird letter $$\xi$$ in order to distinguish between the function vs the letter $$V$$ you use in order to denote an input of the function $$U$$.

Similarly, the function $$(p,T)\mapsto \zeta(p,T)$$ is physically what we interpret as "internal energy expressed as a function of pressure and temperature". I intentionally used the weird letter $$\zeta$$ in order to distinguish between the $$\zeta$$ and $$U$$. Even though these have the same physical interpretation as giving the internal energy of the system, mathematically these are very different functions. We obtain $$\zeta$$ from $$U$$ via composition; we're composing $$U$$ with the function $$(p,T)\mapsto (T,\xi(p,T))$$ in order to get $$\zeta$$.

In the equation (note that your post has a typo)

\begin{align} \left(\dfrac{\partial U}{\partial T}\right)_p &= \left(\dfrac{\partial U}{\partial T}\right)_V + \left(\dfrac{\partial U}{\partial V}\right)_T \cdot \left(\dfrac{\partial V}{\partial T}\right)_p, \tag{iii} \end{align} the notation $$\left(\frac{\partial U}{\partial T}\right)_p$$ means consider "$$U$$ as a function of $$p,T$$, and then differentiate with respect to $$T$$ while keeping $$p$$ fixed". But now you may be wondering that initially, $$U$$ was a function of $$T,V$$ so how is this possible? Well the answer is that if you interpret this statement literally like a robot (which is unfortunately how I interpreted it for most of my introductory thermodynamics course) then it's a completely nonsensical statement. How can $$U$$ be a function of $$T,V$$ initially and then suddenly become a function of $$p,T$$ later? The resolution to this "paradox" is to realize that we're talking about completely different mathematical functions $$U$$ vs $$\zeta$$.

One final remark is that people are lazy with regards to introducing new letters for new functions (especially in the context of chain rule), so that they'll use a letter like $$V$$ to mean both an independent variable and also to mean a function, or the same letter $$U$$ can mean two different functions. This double usage can be very confusing if you're unaware that this is being done... the only way around this is to practice writing statements in absolutely crystal clear unambiguous notation and then see how this relates to the more common statements.

For instance, (i) is the most unambiguous statement, and it is impossible to misinterpret (I honestly can't see anyway to misinterpret it). Next, (ii) is about as clear as (i), and really it's the best you can do with Leibniz's notation. Finally, you have (iii), which is easy to misinterpret for beginners because it repeatedly uses the same letter $$U$$ to mean two different functions, and the $$U$$ on the LHS has a completely different meaning from the $$U$$ on the RHS. You just have to practice until all three versions of the statement become just as obvious, so that you can translate back and forth between any of the notations.

• This explains how the two things can be equal but my question of how we can change temperature while keeping volume constant still holds.. even this mathematical introduction doesn't explain how that thing is physically achievable Sep 5 '20 at 9:50
• @Buraian Consider an ideal gas, whose equation is $PV=NkT$. If I keep $P,N$ all constant, and I increase $T$ then of course $V$ will increase. But, if I double $T$ and I double $P$, while keeping $N$ constant, then of course $V$ will not change. So, to answer your question, if you want to change the temperature and keep the volume fixed, you HAVE to change the pressure appropriately. More generally, it is experiments which tell us that for every (most?) thermodynamical systems, we can always take any two of $V,P,T$ as independent variables to describe the system. Sep 5 '20 at 9:58
• For example, think of yourself as an ant moving on the surface of the sphere $x^2+y^2+z^2 = 1$. Now, if you're on the "upper half" of the sphere, then you can say that $z_{+}(x,y)= \sqrt{1-x^2-y^2}$. In this case, you can certainly move on the sphere so that you change $x$ while keeping $y$ constant. If this happens then you will necessarily change what $z_{+}(x,y)$ is. Similarly, you can change $y$ while keeping $x$ constant, but the consequence is that $z_{+}(x,y)$ will change. In this situation, we are regarding $x,y$ as "independent variables", and using this we are able to find $z_{+}$. Sep 5 '20 at 10:04
• But of course, depending on where you are on the sphere (suppose that you're on the "left side" of the sphere) so that $x<0$. Then, you can say $x_{-}(y,z) = -\sqrt{1-y^2 - z^2}$. Notice that if you're on the "left side" of the sphere, you do not need to know all three $x,y,z$ to determine where you are. You only need $y$ and $z$, and then you can easily figure out what the $x$ is. Once again, you can clearly vary $y$ while keeping $z$ fixed (which as a consequence implies $x_{-}$ will change); this is what we mean by independent variables. Sep 5 '20 at 10:09
• Mathematically what I have described about the sphere says that the sphere is a $2$-dimensional smooth manifold. Roughly speaking, this just says that wherever you are on the sphere, you only need two coordinates to fully describe your location (for example, $(x,y)$ allows you to determine $z$ or $(y,z)$ allows you to determine $x$ or for example (longitude, latitude) tells you where you are etc). This is the same thing with $P,V,T$: experiments tell us that the state space is a $2$-dimensional manifold (so that we can always choose two independent variables to fully describe the situation) Sep 5 '20 at 10:14