I really don't think it should be.

$dU = dQ + dW$ is the statement of the first law of Thermodynamics.

$dW$ can be put as $-pdV$ and $dQ $can be put as $TdS$ only if the process is reversible. (From the definition of entropy, the $dQ$ in $dS$ = $\frac{dQ}{T}$ is for reversible paths between the inital and final states.)

But when I checked on the net, it says $dU= TdS- pdV$ is always true for any type of process. How? Many say because it contains state variables?

We assumed the process to be reversible while deriving it, otherwise the most general equation should be $dU ≤ TdS - pdV$, right?

Where ever I see on the net, they used that equation $dU = TdS - PdV$ as something always valid and as a base to derive fancy new equations with partial differentials and stuff.

For example, in page 2 in this pdf: https://ocw.mit.edu/courses/chemistry/5-60-thermodynamics-kinetics-spring-2008/lecture-notes/5_60_lecture11.pdf


3 Answers 3


The differential statement of the first law, $$\mathrm{d}U = T\mathrm{d}S - p\mathrm{d}V,$$ is valid for all states---but not all processes---for the reasons you have described. When we apply it, we are always assuming that a reversible process connects the two states of interest; irreversible processes are outside the range of applicability of this equation. States and processes get muddled up a lot, because we can always find a reversible process that connects any two states.

The generalization of this equation for all processes is given by $$\mathrm{d}U = \delta q + \delta w,$$ which is just the statement of energy conservation. We cannot, however, write $$\mathrm{d}U \leq T\mathrm{d}S - p\mathrm{d}V,$$ for this would imply that $T$ and $p$ are defined for a system at all points during an irreversible process, which is not true.

  • 1
    $\begingroup$ So the answer is no, that dU=TdS−pdV equation is only valid for reversible processes, not irreversible ones, right? I don't get why all these links say it's valid for all processes.. -- google.com/… $\endgroup$
    – Rick
    Nov 27, 2017 at 17:04
  • $\begingroup$ @Rick, yes, that's correct: the differential statement of the first law is only valid for reversible processes. I presume the reason for the confusion is because states and processes are frequently (incorrectly) conflated. $\endgroup$ Nov 27, 2017 at 17:12
  • $\begingroup$ Have a look at the second page here: ocw.mit.edu/courses/chemistry/… $\endgroup$
    – Rick
    Nov 27, 2017 at 17:13
  • $\begingroup$ @Rick, yes? That page states that the first law is always correct and valid for (states of) a closed system, regardless of the nature of the process, and that agrees with what my answer has stated. $\endgroup$ Nov 27, 2017 at 17:16
  • 1
    $\begingroup$ Ohhhh....ok. I understood. I was in a really confused state, just calmed down and re-read your answer carefully. I understood now. Thanks alot. I just realized how stupid my many follow up questions look now :P Sorry for bothering you with all that. Thanks alot!! $\endgroup$
    – Rick
    Nov 27, 2017 at 18:36

For any two processes (reversible or irreversible) connecting two equilibrium states that are described by the state variables $U,T,S,V,p$ it is always true that $$dU=TdS-pdV.$$ If during the processes the transferred heat and work performed are $\delta Q$ and $\delta W$ then it is always true that $$dU=\delta Q + \delta W.$$

Both equations are just the 1st law of thermodynamics applied to any processes connecting two equilibrium states described by the given thermodynamic variables. The 2nd law comes into play by postulating an equality $TdS = \delta Q_{rev}$ for any reversible processes and an inequality $TdS > \delta Q_{irrev}$ for any irreversible process. Note that this does not say anything about quasi-static processes. The only requirement is that the beginning and end of the processes have well defined thermodynamic parameters and during the process one should be able tell the amount of work and heat transferred.

Since for all processes $dU=TdS-pdV = \delta Q + \delta W$ and $$TdS \ge \delta Q$$ we also have the inequality $$pdV \ge \delta W $$ between any two equilibrium states.

If now we demand that during any instant of the process between the end equilibrium states we are able to define the thermodynamic variables $U,T,S,p,V$ then during the whole process we will have these (in)equalities.

Occasionally, you do see the inequality $dU < TdS-pdV$ but in this form $p$ is not the state variable we call system pressure, it is instead the external pressure needed to overcome both the system and some friction or similar cause to affect the compression $dV$.


$dU = TdS-pdV$ is not always valid. Furthermore, the reason it's not generally valid isn't because of the distinction between reversible and irreversible processes. There's an easy workaround for that*. Rather, it's because it only applies to closed systems. If the system is open, it is necessary to use the more general expression $dU = TdS-pdV+\sum_i \mu_i dn_i$.

*Here's the workaround for irreversible processes: $dU = TdS-pdV+\sum_i \mu_i dn_i$ can be used to calculate $dU$ for any process, reversible or irreversible, since if there is an irreversible path that connects two states, it is always possible to find a reversible path that connects them.

Likewise, $dU = \text{đ}q + \text{đ}w$ is not always valid for the same reason $dU = TdS-pdV$ isn't: it only applies to closed systems.

The following will illustrate why the idea that we must use $\text{đ}q \text{ and } \text{đ}w$ for irreversible processes is an artificial one: To calculate $\Delta U$ for one of the most common types of irreversible processes we study, namely chemical reactions in open systems, we typically don't use an expression for $dU$ that contains $\text{đ}q \text{ and } \text{đ}w$. Instead, we rely on $dU = TdS-pdV+\sum_i \mu_i dn_i$. That's because $dU = \text{đ}q + \text{đ}w$ can't be straightforwardly extended to reacting open systems. I.e., the following equation is not valid, period:

$dU = \text{đ}q + \text{đ}w + \sum_i \mu_i dn_i$

For more on this, see:

Jan T. Knuiman, Peter A. Barneveld, and Nicolaas A. M. Besseling. On the Relation between the Fundamental Equation of Thermodynamics and the Energy Balance Equation in the Context of Closed and Open Systems. Journal of Chemical Education 2012 89 (8), 968-972. DOI: 10.1021/ed200405k


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.