First law of thermodynamics

The first law of thermodynamics states that the change in energy of a closed system equals the sum of heat transferred to it and work done to it

 ⁣dU= ⁣dˉQ+ ⁣dˉW. \d U = \db Q + \db W.

This is basically a statement of conservation of energy.

Here  ⁣dˉ\db denotes an inexact differential. This means that there are no functions QQ and WW of which  ⁣dˉQ\db Q and  ⁣dˉW\db W are differentials. There is no measurement of a system I could perform which would tell me it’s “heat” or it’s “work”.  ⁣dU\d U is an exact differential, so I could on the other hand measure the energy or temperature.

In other words, UU is a state function, while QQ and WW are not.

Entropy is also a state function. Since there exists some S(U,V)S(U,V) we can write U(S,V)U(S,V) to say

 ⁣dU=USV ⁣dS+UVS ⁣dV=1T ⁣dSp ⁣dV. \begin{align*} \d U &= \left.\frac{\partial U}{\partial S}\right|_V \d S + \left.\frac{\partial U}{\partial V}\right|_S \d V \tag{generally} \\ &= \frac 1T \d S - p \d V. \tag{quasistatic} \end{align*}