brand banner

Exact Equations and Entropy

M dx + N dy = 0 is exact when it is dF for some F. Then solutions are level curves of F, and Clairaut's theorem gives the test M_y = N_x. Entropy is the thermodynamic example: dQ is not exact, but dQ/T is.

Updated ยท 5 min read ยท #calculus ยท #differential-equations ยท #thermodynamics

Exact Equations and Entropy

M dx + N dy = 0 is exact when it is dF for some F. Then solutions are level curves of F, and Clairaut's theorem gives the test M_y = N_x. Entropy is the thermodynamic example: dQ is not exact, but dQ/T is.

The equation

Consider

๐‘€(๐‘ฅ,๐‘ฆ)d๐‘ฅ+๐‘(๐‘ฅ,๐‘ฆ)d๐‘ฆ=0.

Suppose there is a function ๐น(๐‘ฅ,๐‘ฆ) with ๐‘€=๐น๐‘ฅ and ๐‘=๐น๐‘ฆ. Then the left side is the total differential of ๐น:

d๐น=๐œ•๐น๐œ•๐‘ฅd๐‘ฅ+๐œ•๐น๐œ•๐‘ฆd๐‘ฆ=๐น๐‘ฅd๐‘ฅ+๐น๐‘ฆd๐‘ฆ.

So the equation says d๐น=0. When such an ๐น exists, the equation is called exact.

Why solutions are level curves

Write a step along a curve as d๐’“=(d๐‘ฅ,d๐‘ฆ), where ๐’“(๐‘ก)=(๐‘“(๐‘ก),๐‘”(๐‘ก)). Then

d๐น=โˆ‡๐นโ‹…d๐’“=0.

This is a directional derivative, but d๐’“ is not a unit vector, so it gives the change d๐น over the step rather than the rate per unit distance โˆ‡๐นโ‹…๐’–.

The step d๐’“ is always perpendicular to โˆ‡๐น, so ๐น never changes along the curve. The solution curves are the level curves ๐น(๐‘ฅ,๐‘ฆ)=๐ถ.

The test: Clairautโ€™s theorem

If the equation is exact, then ๐‘€=๐น๐‘ฅ and ๐‘=๐น๐‘ฆ, so ๐‘€๐‘ฆ=๐น๐‘ฅ๐‘ฆ and ๐‘๐‘ฅ=๐น๐‘ฆ๐‘ฅ. When ๐น has continuous second partials, Clairautโ€™s theorem gives ๐น๐‘ฅ๐‘ฆ=๐น๐‘ฆ๐‘ฅ, so

๐‘€๐‘ฆ=๐‘๐‘ฅ.

Clairaut only gives this direction: exact implies ๐‘€๐‘ฆ=๐‘๐‘ฅ. So the condition is necessary but not sufficient on its own. If the test fails, no ๐น exists. If it passes, ๐น is guaranteed only when the region is simply connected (no holes). On a region with a hole, such as the plane minus the origin, ๐‘€๐‘ฆ=๐‘๐‘ฅ can hold with no ๐น. On a simply connected region, you find ๐น by integrating ๐‘€ in ๐‘ฅ and matching the result against ๐‘.

Entropy

Heat d๐‘„ is not an exact differential: there is no function ๐‘„(๐‘‡,๐‘‰) whose differential is d๐‘„. So ๐‘„ is not a state function. The heat absorbed is path dependent: two processes between the same endpoints can absorb different amounts of heat. Dividing by temperature fixes this, and 1/๐‘‡ acts as an integrating factor. The result is the differential of a state function, the entropy:

ฮ”๐‘†=โˆซd๐‘„๐‘‡=โˆซ๐‘d๐‘‡๐‘‡.

The last form holds when the heat goes into raising the temperature, with heat capacity ๐‘. For constant ๐‘, ฮ”๐‘†=๐‘ln(๐‘‡๐‘“/๐‘‡๐‘–).

Why exactness matters:

  • An exact differential ๐‘€d๐‘ฅ+๐‘d๐‘ฆ=d๐น means the vector field (๐‘€,๐‘) is conservative: it is the gradient โˆ‡๐น of a potential function ๐น.
  • Then โˆซ๐ด๐ตd๐น=๐น(๐ต)โˆ’๐น(๐ด) for every path, and โˆฎd๐น=0 around every loop. That is path independence.
  • Path independence makes ๐น(๐ต)=โˆซ๐ด๐ตd๐น (from a fixed reference ๐ด) depend only on the state ๐ต. That is a state function. In thermodynamics, the potential function is the state function.
  • When a differential is not exact, there is no function ๐‘„ to differentiate: d๐‘„=(๐‘€,๐‘)โ‹…d๐’“ is just the small amount of heat absorbed over a step (like work along a displacement), and the field (๐‘€,๐‘) is not conservative. Physicists often write ฤ‘๐‘„ or ๐›ฟ๐‘„ to flag this.
  • d๐‘„ fails this test: a cycle can absorb net heat, so heat is path dependent. For reversible processes d๐‘„/๐‘‡ passes, giving ๐‘†.

Why the log:

  • ๐‘d๐‘‡๐‘‡ weighs heat by the relative change in temperature, not the absolute change. Heat added at low ๐‘‡ counts for more than the same heat at high ๐‘‡.
  • Summing relative changes gives a log, since d(ln๐‘ฅ)=d๐‘ฅ๐‘ฅ. Going from 100 K to 200 K adds the same entropy as going from 200 K to 400 K.
  • The same pattern shows up elsewhere. Each binary search step halves what remains, so the step count is log2๐‘›. Information โˆ’log๐‘ (the term in cross-entropy) counts surprise by proportion: halving ๐‘ always adds one bit. Perceived intensity, and arguably perceived time, scales with ratios (the Weberโ€“Fechner law).

Example: ideal gas

For a reversible step in (๐‘‡,๐‘‰) coordinates, an ideal gas obeys

d๐‘„=๐ถ๐‘‰d๐‘‡+๐‘›๐‘…๐‘‡๐‘‰d๐‘‰,

so the underlying vector field is (๐‘€,๐‘)=(๐ถ๐‘‰,๐‘›๐‘…๐‘‡๐‘‰):

  • ๐‘€=๐ถ๐‘‰ is the heat absorbed per degree at constant volume.
  • ๐‘=๐‘›๐‘…๐‘‡๐‘‰=๐‘ƒ is the heat absorbed per unit volume at constant temperature. For an ideal gas, internal energy depends only on ๐‘‡, so along an isothermal step all absorbed heat goes into work ๐‘ƒd๐‘‰.

Clairautโ€™s test fails:

๐‘€๐‘‰=๐œ•๐ถ๐‘‰๐œ•๐‘‰=0,๐‘๐‘‡=๐œ•๐œ•๐‘‡(๐‘›๐‘…๐‘‡๐‘‰)=๐‘›๐‘…๐‘‰โ‰ 0.

The field has nonzero curl and is not conservative, so no state function ๐‘„(๐‘‡,๐‘‰) exists and a cycle can absorb net heat.

Dividing by ๐‘‡ gives

d๐‘„๐‘‡=๐ถ๐‘‰๐‘‡d๐‘‡+๐‘›๐‘…๐‘‰d๐‘‰.

Now the cross-partials match:

๐œ•๐œ•๐‘‰(๐ถ๐‘‰๐‘‡)=0=๐œ•๐œ•๐‘‡(๐‘›๐‘…๐‘‰).

The rescaled field (๐ถ๐‘‰๐‘‡,๐‘›๐‘…๐‘‰) is conservative, so it is the gradient โˆ‡๐‘† of the entropy state function ๐‘†(๐‘‡,๐‘‰).



ยฉ 2026 James Yap

Personal Website and Knowledge Base