  We generalize Ehrenfest's equations to systems having two work terms, i.e.
systems with three degrees of freedom. For black holes with two work terms we
obtain nine equations instead of two to be satisfied at the critical point of a
second order phase transition. We finally generalize this method to a system
with an arbitrary number of degrees of freedom and found there is
$\frac{N(N+1)^{2}}{2}$ equations to be satisfied at the point of a second order
phase transition where $N$ is number of work terms in the first law of
thermodynamics.
