# What is the interpretation of the following version of the first law: $\sum p_i E_i = \sum p_i dE_i + \sum E_i dp_i$

The first law of thermodynamics can be written as:

$$U= = \sum p_i E_i = \sum p_i dE_i + \sum E_i dp_i$$ $$U= E = \delta Q + \delta W$$

Where

$$\delta W = \sum_{i=1}^N p_i\,dE_i$$ $$\delta Q = \sum_{i=1}^N E_i\,dp_i$$

Looking at: $$U = \sum p_i E_i$$ it is clear that the internal energy is the expected value of the energies.

However what does $$\sum_{i=1}^N p_i\,dE_i$$ relate to work, it means the expected change in energy? And for heat it is the expected change in 'probability' $$p_i$$?

• The third equality in the first line of your question does not make sense. The quantity on the LHS is finite and the quantities on the RHS are infinitesimal.
– hft
May 5 at 19:17
• See for example the box here. May 5 at 19:19

The first law of thermodynamics can be written as:

$$U= = \sum p_i E_i = \sum p_i dE_i + \sum E_i dp_i$$

Not sure what this is, but it is definitely not the first law of thermodynamics. For example, you have finite quantities like $$U$$ on the LHS and you have infinitesimal quantities like $$dE_i$$ on the RHS. You can't equate finite and infinitesimal things.

$$U= E = \delta Q + \delta W$$

This is the first law of thermodynamics in terms of the work done on the system $$\delta W$$.

Looking at: $$U = \sum p_i E_i$$ it is clear that the internal energy is the expected value of the energies.

And furthermore $$dU= \sum_i d(p_i E_i)$$, which might be what you want to have on the LHS of your equation quoted above.

However what does $$\sum_{i=1}^N p_i\,dE_i$$ relate to work, it means the expected change in energy?

From the Wikipedia entry on Entropy (specifically, the box labelled "Entropy changes for systems in a canonical state"), we read that: "If the changes are sufficiently slow, so that the system remains in the same microscopic state, but the state slowly (and reversibly) changes, then $$\sum_i dE_i p_i$$ is the expectation value of the work done on the system through this reversible process..." (Emphasis added).

You can see this more explicitly by working the steps backwards in the wikipedia article box. Namely (for sufficiently slow changes): $$dW = \sum_i dE_i p_i$$ $$=\sum_i d(E_i p_i) - E_i dp_i$$ $$=dU - \sum_i dp_i(E_i + T\ln(Z))$$ (since $$T\ln(Z)\sum_i dp_i = 0$$) $$=dU + \sum_i dp_i(T\ln(p_i))\;.$$ (for the canonical ensemble, and where I have chosen units such that the Boltzmann constant is 1.) $$=dU + T\sum_i d(p_i\ln(p_i))$$ (since $$\sum_i dp_i = 0$$) $$=dU - TdS = dU - dQ\;,$$ which is the infinitesimal form of the first law of thermodynamics: $$dW = dU - dQ$$

As noted elsewhere, you need an integral or a derivative operator somewhere in your First Law formulation to avoid equating finite and infinitesimal quantities.

I quote from McQuarrie's Statistical Mechanics:

"...we used the fact that the average work done on a system was $$P_j \,dE_j$$. We do work, then, by changing the energies slightly, but keeping the population of these states fixed (the $$P_j$$'s do not change). A molecular interpretation of thermodynamic work, then, is a change in the quantum mechanical energy states of the system, keeping the population over them fixed. That a molecular interpretation of the absorption of heat is the inverse of this can be seen from $$d\bar{E} = \sum_j E_j \,dP_j + \sum_j P_j\,dE_j =\delta q_\text{rev}-\delta w_\text{rev}.$$ Thus when a small quantity of heat is absorbed from the surroundings, the energy states of the system do not change ($$N$$ and $$V$$ are fixed), but the population of these states does. "

Is this the type of interpretation you're looking for?

First law of thermodynamics can be extrapolated from an ideal gas law, which states that internal energy of gas is : $$pV = nRT = 2/3U = U'$$

Differentiating both sides:

$$dU' = d(pV)$$

Using product rule :

$$dU' = Vdp + pdV$$

Noticing that second term is work done by gas, when it expands, namely $$dW=-pdV$$ :

$$dU' = Vdp - dW$$

When enthalpy of gas does not change, then $$|Vdp|=|TdS|=dQ$$, so we arrive at : $$dU' = dQ-dW$$

It's not an exact explanation of your question, but may give some ideas which will put you on the right path. Here's a good book about theory of heat which you can check more.