# Is the equation dU= TdS - PdV always valid (even for irreversible processes?)

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

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.

• 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/… – Rick Nov 27 '17 at 17:04
• @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. – a-cyclohexane-molecule Nov 27 '17 at 17:12
• Have a look at the second page here: ocw.mit.edu/courses/chemistry/… – Rick Nov 27 '17 at 17:13
• @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. – a-cyclohexane-molecule Nov 27 '17 at 17:16
• 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!! – Rick Nov 27 '17 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 two 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 \lt \delta Q_{irr}$ 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$.