 Mechanically,
a potential A(r) was the difference A(r_{2}
) – A(r_{1}) and equal to the work needed
to go from r_{1} to r_{2}. 
  The decisive point was that A(r
) did not depend on the particular way chosen
to go from r_{1} to r_{2} as long
as the acting forces F (r) were given as the derivative of the
potential A(r) with respect to the coordinates. We have 
 
F( r)  = 
– grad [A(r)] = –  [A(r)] = – 
æ è  ¶ A ¶x
 ,  ¶
A ¶y 
,  ¶A
¶z 
ö ø   
 These are the well known relations for mechanic (and electrostatic) potentials.
If one knows the potential and the momentum of a massive (and charged) particle, one knows
everything one can know and needs to know. 
  The
history, i.e. how the particle came to its present position r with the
potential A( r) and momentum, is totally irrelevant. 
  Potential and momentum together
then define the state of the particle. 

We may first generalize the idea of a potential by allowing generalized coordinates, i.e. any variables (and
not just space coordinates) that describe the state of a system. 


This allows to treat thermodynamic systems consisting of many
particles, where individual coordinates loose significance and average values describing
the system take precedence. 
 Lets consider the free energy as a first example. It is a thermodynamic potential and at the same time a state function,
i.e. it describes completely the state of systems with
the generalized coordinates temperature T, volume V and particle
numbers N_{i}. The mechanical potential by itself, in contrast, is not a state function (we would need the momentum, too, to describe
the state of a mechanical system). 
  A change
of state thus necessarily demands a change in at least one of the three generalized coordinates
from the above example. 
  In formulas we
write 
 
F  =  thermodynamic
potential  =  F(V,
T, N_{1}, ... N_{i})  

  The N_{i} denote
the number of particles of kind i. 
 Is it that easy? Can we elevate all kinds of functions to the state of thermodynamic
potentials and state functions? 

The answer, of course, is No! The statement that the function
P(x_{i}) is a potential with respect to the generalized coordinates
x_{i} is only true if a number of
conditions are met. For the case of equilibrium (which
requires that nothing changes and therefore that all ¶P/¶x_{i} = 0) those requirements are: 
  The values of the generalized coordinates describe the state of the
system completely (this means you have the right number
and the right kinds of coordinates). 
  The value of P(x_{i}) for a set of values
of the generalized coordinates is independent from the path chosen
to arrive at the particular state and thus from the history of the system. In formulas: 
 
DP
 =  change
in P between a state 1 and a state 2 
=  2 ó
õ 1  dP  =
 2 ó õ
1  ¶P
¶x_{1}  ·
dx_{1} +  2 ó
õ 1  ¶P ¶x_{2} 
· dx_{2} + ...  :=
P_{2} – P_{1}  

  i.e. the difference depends
only on the starting and end state. 
 This can only be true if dP is a total differential of P, i.e. 
 
dP  =
 ¶P ¶x_{1}  · dx_{1}
+  ¶P
¶x_{2}  · dx_{
2} +  ....  

  i.e. the changes in the generalized
coordinates describe unambiguously the total change in P. 
 The numerical values of the partial derivatives of the thermodynamic
potentials describe the "effort" it takes to change the potential by fiddling with
the particular coordinate considered. This can be understood as a generalized
force. If the derivative happens to be taken with respect to a space
coordinate of the system, the generalized force
is a real mechanical force  it describes the change of
energy with space as it should. 
  If the
derivative happens to be taken with respect to a particle number,
however, the resulting quantity is not called, e.g., "particle
number changing force" (which would have been a perfectly good name), but chemical potential, which
might be a bit confusing at times. 
 How do we know
if a given function is a thermodynamic potential and a state function? For a given function
(in differential form), it is not necessarily obvious if it is a total differential. You have
to resort to physical or mathematical
reasoning to find out. Lets first look at an example of physical reasoning: 

The first law of thermodynamics
was defined as follows: 
  

Are these three differential quantities total
differentials and thus state function and thermodynamic potentials, or are they not? 
  Physical reasoning tells us that
dU must be a total differential because U
must be a thermodynamic state function  otherwise we can construct a perpetuum
mobile! Lets see why: 
  If we start from
some value U_{1}, characterized by as many variables x_{i}
(= coordinates) as you like (e.g. pressure p_{1}, volume V_{1}
, temperature T_{1} ) and than move to a second value U_{2}
by adding, for example, a heat quantity Q; we have described a path 1
to move from U_{1} to U_{2}. 
  If we return to the same values of the generalized coordinates by a
different path; e.g. by now extracting some mechanical work, but have a value U_{1}
' that is not identical to U_{1}, we are now in a position to construct
a cycle between the states 1 and 2 as characterized by the generalized coordinates
that allows us to extract work in every cycle  we have a perpetuum
mobile. 
  So dU must be
a total differential  and this requires that dQ and dW are not total differentials! Because it is entirely possible to go from
one state of U to another one by adding different amounts of Q
and W  the path described by these circumstances must not matter! 
  DQ = Q_{2} –
Q_{1} or DW = W_{2}
– W_{1} thus are not independent of the path, therefore they are not state functions and their differentials cannot be total differentials.
This is essentially tied to the fact that the system entropy may change in these cases. 

Now lets turn to mathematical
reasoning. Obviously, if a function P(x_{i}) of several variables
x_{i} is given, it is always possible to calculate the total differential
dP(x_{i} ). But the reverse is not necessarily
true: 
  If P is given
in differential form, it always can be written as 
  d P(x,y)  =
 g(x,y ) · dx + f(x,y)
· dy   


We used only two variables x and y for simplicities
sake. The functions g(x,y) and f(x,y) are arbitrary functions
 what ever you like is allowed. 

If dP is a total differential, we have necessarily

 
g(x,y)  = 
¶P ¶x 
  
f( x,y)  = 
¶ P
¶y   


On the other hand for all functions P(
x,y) the following equalities must obtain 
  ¶
¶y  æ
ç è  ¶P ¶ x  ö ÷ ø  =
 ¶
¶x  æ ç
è  ¶ P
¶y  ö
÷ ø   
 
This requires that 
 
¶g(x,y) ¶ y  =
 ¶ f(x,y)
¶x   

Only if the above relation is fulfilled, is dP(x,y)
= g(x,y)dx + f(x,y)dy a total differential. So we have a simple checking
procedure for a given differential function (a mathematical rule) to find out if it is indeed
a total differential. 
 