Local thermodynamics and the generalized Gibbs-Duhem equation in systems with long-range interactions

The local thermodynamics of a system with long-range interactions in d dimensions is studied using the mean-field approximation. Long-range interactions are introduced through pair interaction potentials that decay as a power law in the interparticle distance. We compute the local entropy, Helmholtz free energy, and grand potential per particle in the microcanonical, canonical, and grand canonical ensembles, respectively. From the local entropy per particle we obtain the local equation of state of the system by using the condition of local thermodynamic equilibrium. This local equation of state has the form of the ideal gas equation of state, but with the density depending on the potential characterizing long-range interactions. By volume integration of the relation between the different thermodynamic potentials at the local level, we find the corresponding equation satisfied by the potentials at the global level. It is shown that the potential energy enters as a thermodynamic variable that modifies the global thermodynamic potentials. As a result, we find a generalized Gibbs-Duhem equation that relates the potential energy to the temperature, pressure, and chemical potential. For the marginal case where the power of the decaying interaction potential is equal to the dimension of the space, the usual Gibbs-Duhem equation is recovered. As examples of the application of this equation, we consider spatially uniform interaction potentials and the self-gravitating gas. We also point out a close relationship with the thermodynamics of small systems.


I. INTRODUCTION
A great variety of systems in nature are dominated by long-range interactions. Examples are selfgravitating systems [1][2][3][4], two-dimensional vortices [5], nuclear physics [6], and also toy models such as the Hamiltonian mean-field model [7]. Among other physical properties, the remarkable thermodynamic behavior of systems with long-range interactions makes them extremely attractive. They are intrinsically nonadditive and may have negative heat capacity in the microcanonical ensemble leading to ensemble inequivalence [8][9][10]. For very instructive reviews on the subject with more examples and phenomena we refer the reader to [10,11].
The relaxation towards thermodynamic equilibrium in long-range systems proceeds in a different manner than that of systems with short-range interactions [12]. In short-range systems, internal collisions drive the system to a state characterized by a Maxwell-Boltzmann distribution function. To the contrary, in systems with long-range interactions with a large number of particles the evolution is collisionless and the system may remain trapped in a nonequilibrium quasistationary state that is not described by a Maxwell-Boltzmann distribution [12][13][14][15]. The time that the system remains in this quasistationary state depends on the number of particles and diverges if the number of particles is infinite. However, for a large but finite number of particles in a very long time limit, the system will evolve to a state of thermodynamic * ilatella@ffn.ub.edu equilibrium characterized by a Maxwell-Boltzmann distribution [16] if such a state exists. These states of thermodynamic equilibrium given by the theory of ensembles in Boltzmann-Gibbs statistical mechanics are those we will focus on throughout this paper.
Interactions in this kind of systems are characterized by slowly decaying pair interaction potentials that couple the constituent parts of the system at large distances. Formally, a potential that decays as 1/r ν is said to be long range if ν ≤ d, where d is the dimension of the embedding space [10]. Systems having such interaction potentials are sometimes called systems with strong longrange interactions [11]. The paradigmatic case of Newtonian gravity (ν = 1) has served as a basis for developing methods for studying an important part of the phenomenology concerning the thermodynamics of systems with long-range interactions. In this regard, the isothermal spheres model has been widely used to study selfgravitating systems in the mean-field (MF) limit [4,17]. Although in the MF approach correlations are ignored, this model offers a mathematical tool for a suitable treatment of self-interactions in the system and turns out to be very accurate for a large number of particles [18,19], except near the critical points where the system collapses. It is also well known that self-gravitating systems possess equilibrium states with negative heat capacity, provided the system is isolated (microcanonical ensemble). Equilibrium in that case is ensured in a certain range in the space of parameters because isothermal spheres correspond to local maxima of the entropy with an extremely large lifetime that scales like the exponential of the number of particles [20]. In the microcanonical ensemble the system becomes unstable when the heat capacity passes arXiv:1302.4903v3 [cond-mat.stat-mech] 30 Oct 2013 from negative to positive, leading to the gravothermal catastrophe [2,21]. When one of these systems is put in contact with a heat bath (canonical ensemble), the range in the space of parameters where the heat capacity is negative is replaced by a phase transition [3]. In the canonical ensemble, isothermal spheres correspond to states of local minima of the free energy and the isothermal collapse sets in when the heat capacity passes from positive to negative [17]. The self-gravitating gas has also been studied in the grand canonical ensemble with the MF approach and Monte Carlo simulations. There, the instability sets in at a critical value of the parameter controlling the state of the system that is different from the critical values in the microcanonical and canonical ensembles [18,19,22,23]. This illustrates the fact that different ensemble representations are, in general, inequivalent and the thermodynamic behavior of the system strongly depends on the control parameter used to specify its thermodynamic state. In addition, systems with an attractive interaction potential 1/r ν with 0 < ν < 3 in three dimensions were also considered in the microcanonical ensemble [24,25] and also there a critical energy was found below which these systems undergo a gravitational-like phase transition. Phase transitions in simplified models such as the ring model have also been studied [26,27].
Moreover, de Vega and Sánchez obtained [19] the equation of state of the self-gravitating gas and pointed out that it was customary to assume it without any derivation. To obtain the equation of state these authors took into account the condition of hydrostatic equilibrium and found that the system locally behaves as an ideal gas. The same behavior is obtained if the self-gravitating gas possesses two or more kinds of particles with different mass [28] and for a system with arbitrary long-range interactions in the MF limit [29].
In this framework, first, our aim here is to analyze the local thermodynamics of systems with strong long-range interactions in d dimensions by computing the local thermodynamic potentials per particle in the MF limit. The local equation of state is obtained by computing the local entropy per particle and using the condition of local thermodynamic equilibrium instead of assuming hydrostatic equilibrium. Although in this case the two equilibrium conditions lead to the same result, both approaches are conceptually different. Second, it is shown that the potential energy enters as a thermodynamic variable that modifies the global thermodynamic potentials. As a result, we find a generalized Gibbs-Duhem equation that relates the potential energy to the thermodynamic variables of the system. The rest of the paper is organized as follows. In Sec. II we consider a system with strong long-range interactions in d dimensions and compute the local entropy, Helmholtz free energy, and grand potential per particle in the microcanonical, canonical, and grand canonical ensembles, respectively. In Sec. III we obtain local relations satisfied by the thermodynamic potentials as well as the local equation of state. In Sec. IV the global equation of state is obtained for a d-dimensional system and, by integrating the local relations, an equation satisfied by the set of global thermodynamic potentials is found. We also obtain the generalized Gibbs-Duhem equation and consider some examples of its application. In connection with the latter, we point out a close relationship existing between our treatment and Hill's [30] thermodynamics of small systems. Finally, in Sec. V a discussion of our results is presented. We use units such that k B = 1.

II. MEAN FIELD LOCAL THERMODYNAMIC POTENTIALS
In this section we compute the MF local entropy, Helmholtz free energy, and grand potential per particle in the microcanonical, canonical, and grand canonical ensembles, respectively. Here we follow a standard approach in the formulation of statistical mechanics (see, e.g., [31] and references therein) and hence thermodynamic potentials obtained in the different ensembles are also standard. From these potentials, the formulation of the thermodynamics at the local level is performed in Sec. III and exploited in Sec. IV.
Since the long-range character of the interactions depends on the dimension of the embedding space, we consider that the system is d dimensional. Interactions are introduced through a long-range pair interaction potential φ(q i , q j ), which depends on q i and q j , the positions of particles i and j. It is formally assumed that at large enough distances the potential behaves as where κ is a coupling constant and 0 ≤ ν ≤ d. The potential must be regularized at short distances in order to avoid divergences and consistently define the statistical mechanics of the system [31]. Thus here we consider implicitly a small distance cutoff that will be taken to be zero once the MF equilibrium configurations are obtained in the large N limit [18,22,31]. In this way, short-range interactions are completely negligible in the MF limit and quantities such as the potential energy exist and are finite. Throughout the paper the potential energy has to be understood as an unknown or unevaluated quantity and in Sec. IV explicit examples are considered. The power law (1) for the interaction will also be utilized in Sec. IV to derive global thermodynamic properties of the system.

A. Local entropy: microcanonical ensemble
Consider a system of N classical pointlike particles of equal mass m enclosed in a container of d-dimensional volume V ∼ L d , L being a characteristic length defining the size of the system. Positions and momenta of particles are respectively described by q i = (q 1 i , q 2 i , . . . , q d i ) The Hamiltonian of the system is H N (q i , p i ) = E 0 + W , where the kinetic and potential energies E 0 and W , respectively, are given by In the microcanonical description the state of the system is characterized by a fixed value of the energy E and the number of accessible microstates is given by Σ The domain of spatial integrations extend over the d-dimensional volume V and there are no restrictions on the domain of the momentum; this will always be the case throughout the paper unless another domain is specified. Introducing ε ≡ 2π 2 m −1 V −2/d and integrating over momentum leads to is the Heaviside step function and Γ(x) is the Gamma function. Using the integral representation [18] x γ θ(x) = Γ(γ + 1) 2π with ik = εβ and defining the number of microstates becomes To evaluate (5), we assume N 1 and use the MF approach following Ref. [18]. In this way, (5) can be written as a functional integral over the number density n(x), x being a point in one-particle configuration space. We have (see the Appendix) Dn exp Ĵ [n; α, β] , where we have introduced Since the microcanonical entropy is given by S(E) = ln Σ(E), substituting (7) in (6) yields In the definition ofŜ we have neglected the term ln (εβ) coming from the exponential in (6), since it does not contribute in the large N limit. This is the same as assuming that the microcanonical entropy is given by the logarithm of the number of microstates or, equivalently, by the logarithm of the density of states. To proceed further, (9) will be evaluated using the saddle point approximation. The value of the integral will be then given by the exponential ofŜ[n s ; α s , β s ], where n s (x), α s , and β s are the number density and the value of the parameters that maximizê S[n; α, β]. Accordingly, the microcanonical entropy can be approximated by S(E) ≈Ŝ[n s ; α s , β s ]. In order to simplify the notation, in what follows we will omit the subscript s since we will only consider the stationary solutions given by the saddle point approximation.
The parameters α and β in (9) can be viewed as Lagrange multipliers that respectively restrict the value of the number of particles and the energy. Indeed, the MF equations in the saddle point approximation given by the extremal condition (δ n ; ∂ α , ∂ β )Ŝ[n; α, β] = (0; 0, 0) yield with where the term containing the potential Φ(x) comes from the variation δW [n] = Φ(x)δn(x) d d x and is given by In terms of Φ(x), the total potential energy takes the form Hence, by setting the functional derivative with respect to n(x) to zero, δ nŜ [n] = δ nĴ [n] = 0, it follows the coupling between the number density and the potential through the relation where we have introduced λ T = V 1/d (εβ) 1/2 and µ = −α/β. We emphasize that the density strongly depends on the form of the interaction potential, i.e, on ν, as can be seen from (15). As a result, by substituting (11) and (12) in (8) and (10), the extrema ofŜ and consequently the microcanonical MF entropy become which is an integral over the volume and therefore the integrand can be interpreted as the density of entropy. From this density of entropy one can construct the local entropy per particle and in this way, as we shall see below, information about the local thermodynamic nature of the system can be obtained. Taking into account (18), the local entropy per particle is given by in such a way that the total MF entropy can be written as In addition, using (8) and (10), it can be checked that The microcanonical MF entropy (18) is a solution of the saddle point equations and therefore an extremum of Eq. (10). In order to guarantee thermodynamic equilibrium, we will assume that there exists a certain range of parameters whereŜ is a maximum and thus our analysis here must be understood to be restricted to such a range. It is not difficult to see that such a range in the space of parameters does exist: If the temperature is high enough so that βΦ(x) 1, the number density becomes n ≈ N/V and the stable global ideal gas behavior is recovered.
The critical values of the parameters that set the instability will depend on the interactions under consideration. For instance, consider the case of ν = 1 and κ = −G N m 2 in d = 3 with spherical symmetry, which corresponds to self-gravitating isothermal spheres (see Sec. IV B). Here G N is Newton's constant. Consider also that the system is placed in a box of radius R. The density contrast defined by R ≡ n(0)/n(R) is usually taken as the parameter describing the thermodynamic state of the system and the critical point at which the MF breaks down in the microcanonical ensemble is R = 709 [1,2,4,22,23]. Beyond this point there are no stable configurations and the system undergoes gravitational collapse, known as the gravothermal catastrophe [2]. Furthermore, by solving the isothermal sphere equation, or Emden equation, (72), one sees that −ER/(N 2 G N m 2 ) never exceeds 0.335 for any equilibrium gas sphere [2,21], thus leading to a critical radius the density contrast is 709 and no stable thermal equilibrium exists for R > R A .

B. Local Helmholtz free energy: canonical ensemble
Here we will consider that the control parameter used to specify the equilibrium configurations is the inverse temperature β. At fixed temperature one must use the canonical description and in this section we will compute the canonical partition function Z(β) in the saddle point approximation. In doing so, the canonical Helmholtz free energy A(β) can be obtained and written as an integral over the volume, which allows us to identify the local free energy.
The canonical partition function can be obtained from the microcanonical density of states ω E = ∂ E Σ(E) by computing its Laplace transform. The density of states is then given by the inverse Laplace transform of the partition function From (6) one gets Therefore, the comparison of both expressions (21) and (22) leads to the identification Z(β) = e J(β) and thus one sees that the function J(β) defined in (5) is the Massieu function related to the Helmholtz free energy via J(β) = −βA(β). Since the canonical partition function is given by (7), the major part of the work has already been done in writing down the microcanonical description. It is clear that the extremal condition (δ n ; ∂ α )Ĵ[n; α, β] = (0; 0) allows one to get an approximate expression for the Massieu function as J(β) ≈Ĵ[n; α, β], where, as before, n(x) and α are given by the saddle point equations.
The saddle point equation associated with the parameter α constrains the number of particles leading to the condition (11). Of course, in the canonical description only the temperature is fixed and there is no second Lagrange multiplier enforcing the condition (12). Instead, according to the saddle point approximation and using (8), one sees that the mean value of the Hamiltonian In order to obtain the relation between the number density and the interaction potential, variations with respect to the number density ofĴ[n] have to be computed. This task has also been done in the previous section and δĴ [n] is given by expression (14). As a result, the distribution of particles that maximizes the microcanonical entropy also maximizes the Massieu function in the canonical ensemble and the number density is then given by (17). Hence, using (8), (11) and (16), the saddle point approximation allows one to write the canonical MF Helmholtz free energy A = −T J as an integral over the volume: (24) Therefore, the MF local Helmholtz free energy is readily identified, The canonical MF entropy can be obtained via a Legendre transformation of the canonical MF free energy S = β(Ē − A) and, as a consequence of the saddle point approximation [6], it coincides with the microcanonical MF entropy (18) only when both ensembles lead to the same description of the state of the system. To the contrary, Legendre transformations cannot be applied to relate thermodynamic potentials from different ensembles if the ensembles are not equivalent. It must be stressed that the inequivalence of ensembles arises because the thermodynamic potentials become convex in a certain region of parameter space. If the entropy-energy curve presents a convex intruder, the microcanonical and the canonical ensembles are not equivalent [10].
The MF solution in the canonical ensemble is valid only in the range of parameters whereĴ is maximum. Turning back to the example given in the previous section, selfgravitating isothermal spheres are well described with the MF in the canonical ensemble, provided R < 32.1 [17,22,23]. For values of the density contrast larger than 32.1,Ĵ is not a maximum and hence the MF description in the canonical ensemble breaks down at the critical value R = 32.1. At this critical point the system undergoes a gravitational collapse and this collapse cannot be described with the MF approach. What happens is that in the range in parameter space such that 32.1 < R < 709, the heat capacity is negative in the microcanonical ensemble. Configurations with negative heat capacity may be stable in the microcanonical ensemble, but are never realized in the canonical ensemble leading to a collapse or gravitational phase transition. Thus, for 32.1 < R < 709, the microcanonical and the canonical ensembles are not equivalent.

C. Local grand potential: grand canonical ensemble
Consider the canonical partition function as a function of the number of particles and its Laplace transform: Taking N as a continuous variable, the canonical partition function is constant with value Z(N ) for all N in the interval [N, N + 1). Therefore, the integral in (27) can be written as a sum of integrals over the intervals [N, N + 1] and subsequently integrated: From here, since α = −βµ, one recognizes the grand canonical partition function which we will take as the starting point to derive the thermodynamics of the system. Introducing ζ(α) = [1 − exp(−α)]/α and applying the inverse Laplace transform to (29) one gets Since in the previous section we obtained the grand canonical partition function reads The term ln ζ(α) in the exponential above, which is a correction due to the discreteness of N , can be safely neglected in the large N limit. As before, we shall evaluate the integral (33) using the saddle point approximation and hence Z ≈ exp(Ĵ − αN ). In this case, only the number density such that δ n (Ĵ[n] − αN ) = δ nĴ [n] = 0 is required. Thus one more time the number density is given by (17). Furthermore, the mean value of the number of particles can be written as N = −∂ α ln Z ≈ −∂ α (Ĵ − αN ) ≡N and using (8) one gets Analogously, the mean value of the energy takes the form where, as in the canonical case,Ē is given by (23). Introducing the grand potential the saddle point approximation yields −βΩ ≈Ĵ − αN , which by using (8) and (16) leads to (36) Consequently, the MF local grand potential per particle reads such that The grand canonical MF Helmholtz free energy is obtained by a Legendre transformation of the form A = Ω+µN , which turns out to be equal to the MF Helmholtz free energy in the canonical ensemble (24) in the region of parameter space where both ensembles coincide. With a subsequent Legendre transformation, we would obtain the same MF entropy as in the microcanonical ensemble S = β(Ē − µN − Ω) only when the grand canonical and the microcanonical ensembles are equivalent. As mentioned before, this is a consequence of the saddle point approximation and these Legendre relations cease to be valid when the ensembles are not equivalent. Although each ensemble has its own range of validity in the corresponding space of parameters, the thermodynamic potentials computed in the different ensembles have all the same form in the MF approach. In the grand canonical ensemble the MF solution is valid only in the range of parameters such thatĴ − αN is maximum. For selfgravitating isothermal spheres, the critical point where the MF description ceases to be valid in the grand canonical ensemble is R = 1.58 [22,23]. At this critical point the system undergoes gravitational collapse in the grand canonical ensemble, which cannot be described by the MF. We see again that the stability of the system depends on the control parameters used to specify the state of the system. In addition, in this case the grand canonical MF entropy coincides with the microcanonical MF entropy only for R < 1.58.

III. LOCAL RELATIONS AND THE LOCAL EQUATION OF STATE
The formulation of thermodynamics in terms of local variables is well known (see, for instance, [32,33]) and here we implement this formalism to systems with longrange interactions. In the previous sections we wrote the thermodynamic potentials as integrals over the volume of the system, which leads to a natural definition of local quantities per particle. Analogously, using (12) and (16), the local energy per particle takes the form where e 0 = d 2 T is the local kinetic energy per particle, such that the total energy and kinetic energy are given by E = n(x)e(x) d d x and E 0 = n(x)e 0 d d x, respectively. We also introduce the local volume per particle v(x) = 1/n(x), which obviously leads to Once local variables are defined, the local equation of state can be obtained. In order to do that, it is useful to write the local entropy per particle in a more convenient way. From (19) one obtains which is a Sackur-Tetrode-like equation in d dimensions formulated in terms of local variables. Long-range interactions are included in the local volume through its dependence on the interaction potential, thus leading also to an implicit dependence of the local entropy on the interaction potential. The local entropy per particle is therefore explicitly obtained as a function of the local variables e 0 and v, s = s(e 0 , v). Thus, in the equilibrium framework, one infers that the local internal energy only has contributions coming from kinetic degrees of freedom while self-interactions play the role of an external field that perturbs the gas. In addition, local thermodynamic equilibrium implies the relations [32,33] 1 where the second of these relations is the local equation of state of the system. In our case, this local equation of state is indeed the one corresponding to an ideal gas, which is valid for any long-range pair interaction potential that can be suitably represented with the MF approach. Since the MF local entropy per particle takes the same functional form in the microcanonical, canonical, and grand canonical ensembles, the above equation of state is valid in the three ensembles. Note that the condition of local thermodynamic equilibrium together with expressions (41) are formulated as a hypothesis in the framework of non-equilibrium thermodynamics, but here they are trivially satisfied provided the whole system is in equilibrium. We emphasize that the local equation of state (42) is usually derived by considering the condition of hydrostatic equilibrium [19,29]; here it is derived on pure thermodynamic grounds from the local entropy.
To get more insight in the relation between local thermodynamic variables, we use (17) and write the chemical potential as where µ 0 (x) = T ln λ d T n(x) possesses the same functional dependence on the number density as the chemical potential of the ideal gas, but with the density given by (17). Also using (17), (43), and the local equation of state, one obtains The term in square brackets is the total energy of a particle at the point x; locally the potential Φ(x) acts like an external field. However, the difference between Φ(x) and an authentic external field becomes manifest when one sums the contribution of the whole system: Multiplying [e 0 + Φ(x)] by the density and integrating over the volume does not give the total energy. In order to obtain the total energy one must take into account that the total potential energy is due to self-interactions and this is the reason why one defines the local energy per particle according to (39) (the total potential energy is a functional quadratic in the density). In this respect, using (39), Eq. (44) can be alternatively written in the form where the last term highlights the fact that selfinteractions are actually considered. The local Helmholtz free energy per particle a(x) can be obtained by the Legendre transformation It can be checked that (46) coincides with (25). The local Helmholtz free energy per particle can also be written in the form a(x) = a 0 (x) + 1 2 Φ(x), where a 0 (x) has the form of the local Helmholtz free energy per particle of an ideal gas at the point x and it is given by Hence it also satisfies a 0 (x) = e 0 − T s(x) = µ 0 (x) − p(x)v(x). We emphasize that a 0 (x) is a function of the local volume and hence depends on the interaction potential. Moreover, the local grand potential (37) is equivalent to the Legendre transformation ω(x) = a(x) − µ and with elementary manipulations it can be rewritten as The local grand potential per particle of an ideal gas takes the form . By substituting (48) in (38) and using the local equation of state one sees that the total grand potential is closely related to the kinetic and potential energies The discussion in Sec. II about the correctness of Legendre transformations for global variables in connection with ensemble inequivalence is also valid here for local variables. Furthermore, it is worth noting that the Legendre transformation of a local variable with respect to the local volume, in general, does not agree with the corresponding Legendre transformation of the global variable with respect to the total volume. The reason is that, in general, the pressure is not uniform.

IV. GLOBAL MAGNITUDES AND THE GENERALIZED GIBBS-DUHEM EQUATION
Useful relations between global quantities can be obtained by integration of the local equations. Multiplying both sides of (45) by n(x) and integrating over the volume yields However, it would be desirable that the quantity P V appears explicitly related to the other thermodynamic quantities. In order to do that, the form of the pair interaction potential has to be taken into account and the global equation of state has to be considered. To derive this equation of state we follow Ref. [18]. We will consider that the container is a d − 1 sphere of radius R in such a way that particles are confined by the boundary condition q 1 The zero sphere is the pair of endpoints of the line segment of length 2R. In addition, the volume of the system reads V = π d/2 R d [Γ(d/2 + 1)] −1 .
Thus, from (3), using coordinates defined according to r i = q i /R and rescaling energies by introducing [18,25] the entropy takes the form Here Note that we assume that energy scales as N 2 , as is well known in this kind of system [34]. Note also thatΣ(Λ) depends on the volume only through Λ since in the r i coordinates, which belong to a certain domain D, the limits of the integrals in (56) are pure numbers. Taking into ac- where P = p(x)| x ∈∂V is the pressure evaluated at the boundary of the system. From the above equations and using that E = E 0 + W one gets which is the exact microcanonical equation of state of the system. However, in the MF limit this equation holds also in the canonical and grand canonical ensembles if mean values are taken such thatĒ = E andN = N . Of course, the last statement is only valid in the domain of the space of parameters where the canonical and grand canonical ensembles are well defined and coincide with the microcanonical ensemble. If the equivalence of ensembles does not hold, the corresponding equation of state has to be derived for each ensemble separately. With this in mind, for simplicity, in what follows we will not distinguish between E andĒ or N andN . From the equation of state (59) the virial theorem is obtained, which is particularly useful to express the relation between global quantities. It is also useful to introduce the long-range parameter σ defined as which together with (60) enables us to rewrite (51) as the Euler relation in the form The marginal case ν = d corresponds to systems with long-range parameter σ = 0, so the above equation and the thermodynamic potentials obtained below reduce to the usual ones in short-range interactions thermodynamics. The Helmholtz free energy, the grand potential, and the Gibbs free energy are readily obtained from (62) and take the form The above expressions generalize previous results for the self-gravitating gas [18,19]. In addition, by differentiating (62) one gets which is the generalized Gibbs-Duhem equation satisfied by the long-range interacting systems we are considering here. For systems with long-range parameter σ = 0, i.e., the marginal case ν = d, the usual Gibbs-Duhem equation is recovered. From (67) we infer that when longrange interactions are present, T , P , and µ are independent. Moreover, in view of (67), the following relations are obtained for σ = 0: The above expressions imply, for instance, that the entropy can be obtained from a derivative of the potential energy. Since such thermodynamic relations are lacking for systems with long-range interactions, it would be interesting to check them by considering some solvable examples. Next, we will consider the case where the interaction potential is spatially uniform and the case where the system is a self-gravitating gas. After these two examples we will expose a common feature between systems with long-range interactions and small systems.

A. Spatially uniform interaction potentials in d dimensions
These systems are characterized by ν = 0 such that the system is homogeneous and σ = 1. We simply have φ = κ, hence Φ = kN and W = κN 2 /2. In order to apply (68), the potential energy must be written as a function of T , P , and µ. Using (17) and the equation of state (59), which in this case reads P V = N T , one µ)] and the number of particles becomes The potential energy then takes the form Taking into account that the local entropy per particle (19) is uniform in this case, whence S = N s, it is straightforward to see that The remaining two relations (68) follow from V = N T /P and (69).

B. Self-gravitating isothermal spheres in d = 3
The calculation of global thermodynamic quantities of self-gravitating isothermal spheres is well understood and here we will just consider it as an example to illustrate the relations (68). In particular, the first of these relations will be used to obtain the entropy of the self-gravitating gas. We will write down only the necessary expressions to carry out our task and refer the reader to [4,17,20] for details.
In the self-gravitating gas we have ν = 1, thus σ = 2/3, and κ = −G N m 2 , where G N is Newton's constant. Also, Newtonian systems satisfy the Poisson-Boltzmann equation which, after introducing the dimensionless variables ξ = [4π|κ|β n(0)] 1/2 x and ψ = β (Φ(x) − Φ(0)), becomes the Emden equation Here x = |x| and β = 1/T while n(0) and Φ(0) are the density and the potential at the origin. Global thermodynamic magnitudes are expressed in terms of these functions evaluated at the boundary of the system, thus, for convenience, one introduces ξ 0 = (4π|κ|β n(0)) 1/2 R, ψ 0 = ψ(ξ 0 ) and ψ 0 = ψ (ξ 0 ), where primes denote the derivative with respect to ξ and R is the radius of spherical container. Moreover, with a suitable change of variables the Emden equation can be transformed into a firstorder differential equation [35]. When such variables, usually denoted by (v, u), are evaluated at ξ = ξ 0 and ψ = ψ 0 , with ψ = ψ 0 , they read and therefore satisfy Furthermore, it can be shown [4,17] that the inverse temperature and the potential energy can be written as What we need is to express the potential energy as a function of T , P , and µ only. Since Φ(R) = κN/R, using (43) yields where we have taken into account the local equation of state so that P = n(R)T . From (77) and (75) one sees that v 0 (T, P, µ) = ln P λ 3 and therefore ∂v 0 Combining (76) and the global equation of state (59) one obtains 3P V = N T u 0 and hence, taking it into account and using (75) to express N , the radius can be written as Using (75) and (80), the potential energy (76) takes the form which depends only on the desired variables since u 0 = u 0 (v 0 (T, P, µ)). We then have Therefore, according to (68) and using (74), (76) and (79), from Eq. (82) the MF entropy is obtained, Using that the thermal wavelength can be expressed as λ T = 2π 2 Rv 0 /(N |κ|m) 1/2 and that P/T = N u 0 /(3V ), from (78) one gets and thus the entropy becomes as given in [20], with S 0 = N/2 ln 2N R 3 m 3 |κ| 3 / πe 6 . This verifies the first of the relations (68) for the selfgravitating gas and the remaining two follow from an analogous procedure. As stated in the previous sections, the validity of the MF depends on the ensemble considered. The density contrast can be written in terms of the solution of the Emden equation, yielding R = exp (ψ 0 ). The stability in the microcanonical ensemble is restricted to R < 709, in the canonical ensemble these systems are stable for R < 32.1, and for R < 1.58 in the grand canonical ensemble.

C. Small systems
Systems with a small number of constituents can be treated from a thermodynamic point of view by considering them as independent members of an ensemble. Since such an ensemble of independent small systems is a macroscopic system itself where the standard thermodynamics applies, thermodynamic properties of a single small system can be derived. This is the well known approach introduced by Hill [30]. The basic idea is to consider a chemical potential, denoted by E , that accounts for the energy gained by the system when the number of members of the ensemble, N , varies. The energy, volume, number of particles and entropy of each small system are E, V , N , and S, respectively, while the total magnitudes corresponding to the whole ensemble are given by E t = N E, V t = N V , N t = N N , and S t = N S. Since the whole ensemble is a macroscopic system, these magnitudes satisfy and hence, T S t = E t + P V t − µN t − E N . Thus, for any small system: Hill mentioned that the use of different environmental variables, i.e., control parameters, would lead to different descriptions of the thermodynamic phenomena when small systems are considered [30]. In this case, ensemble inequivalence is due to the finite size of the systems. In fact, negative heat capacity leading to ensemble inequivalence is a generic feature of finite systems at phase coexistence [6]. More specifically, a first-order phase transition in small systems is associated with a convexity anomaly in the appropriate thermodynamic potential [6]. This convexity anomaly is a signal of ensemble inequivalence.
In addition, systems with long-range interactions can be regarded as finite systems as well, in the sense that the range of the interaction is comparable with the size of the system [6]. Our aim here is to point out another common feature between small systems and systems with long-range interactions. From the beginning we have been considering thermodynamic properties of a single system. Even so, if ones relates the energy E to the potential energy such that E = −σW , Eqs. (87) become the same equations we have found for systems with long-range interactions. Although W and E are introduced for different reasons, they formally play the same role. Therefore, a small system such as a macromolecule and a system with long-range interactions such as a star, both being finite system, can be formally described by the same thermodynamic relations.

V. DISCUSSION
We have studied the local thermodynamics of systems with strong long-range interactions in d dimensions by computing local thermodynamic potentials per particle. We have considered pair interaction potentials that decay as 1/r ν , with 0 ≤ ν ≤ d. By computing the local entropy per particle and using the condition of local thermodynamic equilibrium we have obtained the local equation of state, which corresponds to the isothermal ideal gas equation with the density depending on the long-range interaction potential that couples the constituents of the system. This result coincides with the results that were obtained in previous works where the condition of hydrostatic equilibrium was assumed [19,29]. Thus we have shown that interactions locally play the role of an external field that perturbs the gas and that the local entropy per particle is a function of the local kinetic energy and local volume: It is a Sackur-Tetrode-like entropy that implicitly depends on the interaction potential trough the local volume.
Different ensemble representations possess, in general, different ranges of validity in the space of parameters specifying the state of the system. Since any global thermodynamic potential computed in different ensemble representations has the same functional form in the MF limit, local thermodynamic potentials also have the same functional form in the different ensemble represen-tations. We stress that the MF description breaks down at certain critical points that are specific to each ensemble. Beyond one of these critical points, the system can no longer be described with the MF in the corresponding ensemble, but still may be well described in a different ensemble.
By volume integration of the relation satisfied by the thermodynamic magnitudes at the local level, we have obtained the equation satisfied by the set of global magnitudes. Remarkably, the potential energy enters as a thermodynamic variable that modifies the global thermodynamic potentials. In the thermodynamics of systems with short-range interactions the potential energy is obviously involved since it is included in the total energy, but it does not appear as an additional contribution that modifies the thermodynamic potentials. Such a contribution is proportional to σ = (d−ν)/ν and hence, for the marginal case ν = d, the usual thermodynamic relations valid for short-range potentials are recovered.
As a consequence of this contribution coming from the total potential energy, the Gibbs-Duhem equation is modified and the variables T , P , and µ become independent if long-range interactions are present in the system. By taking advantage of the thermodynamic relations obtained from this generalized Gibbs-Duhem equation, the entropies of a system with a spatially uniform potential and of the self-gravitating gas have been computed.
It is important to note that the Euler relation (62) reveals that the energy E is not a linear homogeneous function of S, V , and N if interactions are long ranged. This was already stated by Hill in his study of small systems [30], which, as noted previously, satisfy the same kind of thermodynamic equations. Long-range interactions introduce an extra degree of freedom that causes this deviation from the usual scaling law of systems with short-range interactions. This extra degree of freedom appears in (62) as the term σW .
To derive the relations between thermodynamic quantities at the local level it is not necessary to make the form of the interaction potential explicit; it suffices to assume that the potential is long ranged. At the global level, however, the interaction potential determines the equation of state and hence all global thermodynamic relations. Since we considered explicitly the virial relation for a power-law interaction, the obtained results are valid for this case only and other cases require individual attention. In the framework of thermodynamics of systems with short-range interactions, the Gibbs-Duhem equation plays a central role in the sense that it provides a valuable tool to derive useful relations that are implemented in the solution of thermodynamic problems. In the general case of arbitrary long-range interactions, the usual Gibbs-Duhem equation cannot be taken for granted, but the analogous equation must be derived.
Succinctly, the Gibbs-Duhem equation and the Euler relation we obtained are valid for systems with kinetic degrees of freedom and interacting potentials of the form 1/r ν , 0 ≤ ν ≤ d. Therefore, the cases of gravity and Coulomb interactions in two dimensions [16,36] are not included. Trapped non-neutral plasmas are an important example of the latter [36], which provide the possibility of testing long-range interacting systems in a laboratory. Furthermore, confinement in this case is accomplished by using an external field instead of rigid walls, so another difference with the treatment given here can be noted: We considered ensembles that all have the volume as a control parameter. If fluctuations in V are allowed, the corresponding ensemble with adequate control parameters must be utilized. The above approximation formulated in a discrete way allows one to obtain a continuous field representation. This continuum limit is obtained by introducing the number density, whose value in each cell is given by n(x) = n a /v a . Consequently, summations over the cells become spatial integrals and the summation over occupation number distributions becomes a functional integration in the number density: With Stirling's approximation we also have In addition, the Kronecker δ restricting the number of particles becomes a Dirac δ in the continuum limit and thus can be represented in the form δ (x) = (2πi) −1 i∞ −i∞ dα e −αx . Therefore, taking these prescriptions into account, Eq.(A.2) can be rewritten as Eq. (7) in the MF approximation.