# 19.3: Energy is a State Function

## Work and heat are not state functions

As the work depends on the external pressure, it is not the same in the two diagrams. From the two compressions above it should be clear that work depends on how exactly (e.g. how fast, pegged or not etc.) you do things. No work is not a state, but a path function. A reversible path costs a lot less work than an irreversible one.

For the irreversible sudden path we have

wirreversible = - PexternalΔV (the area of the rectangle)

The area under the hyperbola is not hard to find as long as the gas is ideal:

$w_{reversible} = \int_1^2 P_{ext}dV \approx - \int_1^2P_{int}dV = -\int_1^2 \dfrac{nRT}{V} dV = -nRT\ln \dfrac{V_2}{V_1}$

No wirreversible and wreversible are not the same. (See the green areas). In fact, the reversible work is always the minimum work to get from 1 to 2.

Without proof: Heat q is a path function also.

## The more complete first law

The more complete Definition of the First law of thermodynamics

Energy is the sum of $$w$$ and $$q$$. It is a state function

The above statement is a more complete formulation of the First law of thermodynamics. The realization that work and heat are both forms of energy undergoes quite an extension by saying that it is a state function. It means that although heat and work can be produced and destroyed (and transformed into each other), energy is conserved. This allows us to do some serious bookkeeping!

We can write the law as:

$U = w + q$

But the (important!) bit about the state function is better represented if we talk about small changes of the energy:

$dU = δw +δq$

We write a straight Latin d for U to indicate this is the change in a state function, where as the changes in work and heat are path-dependent. This is indicated by the 'crooked' δ.

We can represent changes as integrals, but only for U can we say that regardless of path we get ΔU = U2-U1 if we go from state one to state two. (I.e. it only depends on the end points, not the path).

Notice that when we write $$dU$$ or $$δq$$ we always mean infinitesimally small changes, i.e. we are implicitly taking a limit for the change approaching zero. To arrive at a macroscopic difference like $$\Delta U$$ or a macroscopic (finite) amount of heat $$q$$ or work $$w$$ we need to integrate