Thermodynamics of $d$-dimensional Schwarzschild black holes in the canonical ensemble

We study the thermodynamics of a $d$-dimensional Schwarzschild black hole in the canonical ensemble. This generalizes York's formalism to any number $d$ of dimensions. The canonical ensemble, characterized by a cavity of fixed radius $r$ and fixed temperature $T$ at the boundary, allows for two possible solutions in thermal equilibrium, a small and a large black hole. From the Euclidean action and the path integral approach, we obtain the free energy, the thermodynamic energy, the pressure, and the entropy, of the black hole plus cavity system. The entropy is given by the Bekenstein-Hawking area law. The heat capacity shows that the smaller black hole is in unstable equilibrium and the larger is stable. The photon sphere radius divides the stability criterion. To study perturbations, a generalized free energy function is obtained that allows to understand the possible phase transitions between classical hot flat space and the black holes. The Buchdahl radius, that appears naturally in the general relativistic study of star structure, also shows up in our context, the free energy is zero when the cavity's radius has the Buchdahl radius value. Then, if the cavity's radius is smaller than the Buchdahl radius classical hot flat space can nucleate a black hole. It is also pointed out the link between the canonical analysis performed and the direct perturbation of the path integral. Since gravitational hot flat space is a quantum system made purely of gravitons it is of interest to compare the free energies of quantum hot flat space and the stable black hole to find for which ranges of $r$ and $T$ one phase predominates over the other. Phase diagrams are displayed. The density of states at a given energy is found. Further calculations and comments are carried out, notably, a connection to thin shells in $d$ spacetime dimensions which are systems that are also apt to rigorous thermodynamics.


I. INTRODUCTION
Black holes are physical systems that possess thermodynamic properties. The path-integral approach to quantum gravity is a powerful technique that when applied to black holes displays them clearly as thermodynamic systems. In this approach the geometry of a four-dimensional Schwarzschild black hole, say, is Euclideanized and its temperature is fixed by the correct period in the imaginary time putting the black hole in a state of equilibrium with a heat bath at the prescribed temperature, the Hartle-Hawking vacuum state [1]. The black hole entropy S can then be found to be S = 1 4 A + in Planck units, where area A + is the event horizon area. This entropy stems from the contribution of the classical Euclidean Einstein action of the black hole metric to the partition function and its cause is the nontrivial topology with a nonzero Euler characteristic of the Euclidean four-dimensional Schwarzschild black hole, in contrast to ordinary quantum field theories, where the classical contribution to the action is absorbed into the normalization of the functional integral [2]. It is of great interest to extend this approach to d-dimensional Schwarzschild black holes. The generalization of the Hartle-Hawking vacuum setting to d-dimensional Schwarzschild black holes has been done in [3] and the understanding that the black hole entropy in d-dimensions, with d ≥ 4, comes from topological considerations, specifically, the Euler characteristic of the two-dimensional plane spanned by the Euclidean time and radial spatial coordinate, was performed in [4].
With the path-integral approach in hand, York understood that the correct setting to study black thermodynamics, in particular a four-dimensional Schwarzschild black hole, was to work with the canonical ensemble of statistical mechanics [5] which provides a complete description of the thermodynamics of those systems. In the canonical ensemble, the black hole is placed inside a cavity whose boundary has radius r and is at temperature T , i.e., the cavity is in thermal equilibrium with a heat bath at temperature T . The Euclidean action for the system shows that the instanton solution admits two boundary configurations, i.e., there are two black hole solutions for the canonical boundary data. One solution yields a small black hole inside a large cavity in thermal, but unstable, equilibrium, which was the system studied in great detail in [6] that had been previously studied in [1,2]. The other solution yields a large black hole inside a cavity with a size of the same order of the black hole, in thermal and stable equilibrium which was studied in [7]. By using the canonical ensemble, and showing there are stable configurations, the thermodynamics of black holes is then unified with a proper setting. The canonical ensemble path-integral approach can be extended to more complex systems, as has been done for electrically charged black holes in the grand canonical ensemble [8], for black holes in anti-de Sitter spacetimes [9], and even for matter configurations [10] or matter plus black hole systems [11]. In higher dimensions York's formalism can also be developed. The five-dimensional Schwarzschild black hole has shown to be of particular interest, because the exact solutions for the instantons take a simple form which allows for an approach with fewer approximations than those used originally, with the smaller unstable solution and the larger stable solution being found exactly [12]. Moreover, the stable and unstable thermodynamic modes of a d-dimensional Schwarzschild black hole have been studied in detail in [13], see also [14,15]. In this work, we generalize the four-and five-dimensional canonical ensemble path integral approach for a spherical symmetric black hole in d spacetime dimensions enabling to extract intrinsic features that might arise. Now, another gravitational system that can be handled in pure thermodynamic grounds is a spherical thin shell that separates a Minkowski interior from some exterior spacetime. Fixing the temperature on the shell, and given a well prescribed first law of thermodynamics at the shell, a powerful thermodynamic formalism can be developed that gives the entropy and the stability of the shell. In four dimensions, for a shell with a Schwarzschild exterior the problem was treated in [16] and for a shell with a Reissner-Nordström exterior the problem was treated in [17]. The study of thermodynamics of thin shells in d dimensions with a Schwarzschild exterior was solved in [18]. We are thus led to compare here the d-dimensional black hole in the canonical ensemble studied in this work with the d-dimensional thin matter shells in the thermodynamic setting studied in [18].
There are some results that will be used. In four dimensions, the solution we are interested in is the Schwarzschild solution. An analysis on the quasilocal energy of spherical spacetimes that bears on thermodynamic problems was done in [19]. The photonic radius, the radius where the photons have circular orbits, in Schwarzschild in four dimensions is given by r = 3 2 r + where r + is the gravitational radius, and since r + = 2m one also can write r = 3m, where m is the spacetime mass. This special radius also appears in the thermodynamic study of the black hole in the canonical ensemble, as York noticed. The Buchdahl radius, i.e., the radius for the maximum compactness of a general relativistic star [20], or of a general relativistic thin shell under certain conditions [21], is given by r = 9 8 r + where r + is the gravitational radius, and since r + = 2m one also can write r = 9 4 m, where m is the spacetime mass. This special radius also appears in the thermodynamic study of the black hole in the canonical ensemble, as we noticed here. When studying the black hole in the canonical ensemble one also needs the thermodynamic properties of a radiation gas in four spacetime dimensions as given in any book in thermodynamics. In higher d dimensions, the solution we are interested in is the d-dimensional Schwarzschild solution [22], also called Schwarzschild-Tangherlini or simply Tangherlini solution. Quasilocal energy on higher dimensional spacetimes has not been performed but certainly the results are maintained. The photonic radius in Schwarzschild in d dimensions is given in [23]. This special radius also appears in the thermodynamic study of the d-dimensional black hole in the canonical ensemble. The Buchdahl radius for most compactness of a d-dimensional star is given in [24] and for a shell in a d-dimensional spacetime we give here. This special radius also appears in the thermodynamic study of the black hole in the canonical ensemble, as we noticed here. When studying the black hole in the canonical ensemble one needs to use the thermodynamic properties of a radiation gas in d spacetime dimensions as given in [25].
The paper is organized as follows. In Sec. II we prepare the cavity at a fixed radius r and temperature T at the cavity's wall. Inside the cavity, for the Schwarzschild-Tangherlini metric, we look for the black hole solutions which satisfy thermal equilibrium with the cavity's wall. The section is split in two parts, where we find an expression for the smaller black hole first, followed by the larger one. We also derive the Euclidean Einstein-Hilbert action for a d-dimensional Schwarzschild black hole as a function of the cavity's radius and temperature. In Sec. III, from the action we derive all the thermodynamic quantities associated to the black hole plus cavity system, particularly, the thermodynamic energy, pressure, and entropy, along with the first law of thermodynamics for the system. In Sec. IV we find the heat capacity for the system, which is crucial in identifying the thermal stability of the solutions. In Sec. V, with the free energy function being the thermodynamic potential of the canonical ensemble proportional to the action, we can better interpret possible state transitions inside the cavity, discussing the possibility of black hole nucleation, or even the transition from a black hole state to flat space. In Sec. VI we address and comment on the relationship between the action functional to second order, and thermodynamics and thermal stability. In Sec. VII, we directly compare the free energy of d-dimensional quantum hot flat space with the free energy of the stable black hole. With this we can identify the conditions for each of these states being the ground state of the canonical ensemble, i.e. with the lowest free energy, or when the ground state is a superposition of both, when they have the same free energy. In Sec. VIII we compute the density of states from the partition function for the stable black hole solution, which in turn leads to an alternative way of reproducing the area law for the entropy. In Appendix A we develop some side calculations. In Appendix B we dwell on two important radii that appear in the canonical ensemble context, the photon orbit radius and the Buchdahl radius. In Appendix C we establish the relationship between the thermodynamics of black holes in a cavity in d dimensions, and the thermodynamics of thin matter shells in d dimensions. In Appendix D we derive the generalized d-dimensional free energy and action for quantum hot flat space, along with the thermodynamic quantities used. In Appendix E we study classical hot flat space in d spacetime dimensions as the product of quantum hot flat space and analyze the corresponding black hole phase transitions for classical hot flat space. In Appendix F we present a synopsis and further additions. A  CAVITY WITH A BLACK HOLE INSIDE:  TEMPERATURE, THE EUCLIDEAN EINSTEIN  ACTION, AND THE ACTION FUNCTIONAL OR  PARTITION FUNCTION FOR A  d-DIMENSIONAL SCHWARZSCHILD BLACK  HOLE A. The cavity in d dimensions and the canonical temperature

Generics and temperature of the canonical ensemble
In the canonical ensemble of a spherical symmetric thermodynamic system, we fix the radius r of the cavity's boundary and the local temperature T at the cavity's boundary. We also define the inverse temperature β = 1 T , which is a useful parameter, so that the independent variables we will work with can either be T and r, or β and r. Throughout the paper, we set the speed of light c, the gravitational constant G, the Planck constant , and the Boltzmann constant k B to unity, i.e., c = 1, G = 1, = 1, and k B = 1. As a consequence, the Planck length is given by l P = 1 and the Planck temperature by T P = 1.
The black hole solution inside the cavity follows from the d-dimensional Schwarzschild solution, also called the Schwarzschild-Tangherlini solution, with line element given by where t is Euclidean time, r is the coordinate radius, and dΩ 2 d−2 = dθ 2 1 + d−2 k=2 k−1 j=1 sin 2 θ j dθ 2 k is the line element on the (d−2)-sphere, with the θ k being its angles. Note that the coordinate r of Eq. (1) is different from the cavity's radius r, the coordinate radius r will disappear soon and will not be mentioned anymore, so there is no possibility of confusion. In d dimensions the gravitational radius, being also the event horizon radius when there is a black hole, r + , and the spacetime mass m, sometimes called the ADM mass, are related by r d−3 is the solid angle in a spherical ddimensional spacetime. Clearly, from Eq. (1) we have to impose d ≥ 4, so that the canonical ensemble here is valid for a four or higher-dimensional spacetime. The Euclidean metric in Eq. (1) describes the spacetime of an Euclidean black hole outside the horizon, i.e., the coordinate r obeys r ≥ r + , provided that the conical singularity at r = r + is removed by setting the correct time period to t. By redefining the coordinate r as r = r + + ε, with ε a radial variable such that ε r + , and introducing then a new radial coordinate ρ = 4r+ε d−3 , the metric given in Eq. (1) reduces to So, in order to have no conical singularities, t must have a period, which we will denote by β ∞ , given by β ∞ = 4πr+ d−3 . This β ∞ is the inverse Hawking temperature. So, the Hawking temperature T H , i.e., the temperature at infinity for d-dimensional black holes, is T H = 1 β∞ = d−3 4πr+ . Now, the Tolman temperature says that the temperature at some position r is the temperature at infinity blueshifted to r. So in order that there is thermal equilibrium between the black hole and the cavity at r, from now on r is the radius of cavity no more coordinate, the temperature, or its inverse β at r must satisfy the Tolman formula, precisely, Since in terms of T Eq. (2) is Eq. (4) is a polynomial equation with its order set by d. Exact solutions for d = 4 and d = 5 were obtained in [5] and [12], respectively. In general, for d ≥ 6 one is compelled to resort to approximation schemes or numerical calculations to solve Eq. (4), although in some dimensions an exact, although contrived, analysis might be performed, noting that for odd d Eq. (4) can have its order reduced by solving for r+ r 2 .
To deal with Eq. (4) we note that the cavity radius r has range r + ≤ r < ∞, i.e., 0 ≤ r+ r ≤ 1. Let us also write the left hand side of Eq. Since Eq. (4) has only one minimum there will be in general two solutions that degenerate into one only when the equality in the latter equation holds.
In brief, Eq. (4) only has solutions if f min ≤ 0. So, the condition for the canonical ensemble at fixed r and T to have black hole solutions r+ r is from Eq. (4) There will indeed be two possible black hole solutions, r+1 r and r+2 r , and when the equality holds there is only one black hole solution, r+1 r = r+2 r . Let us see some further properties of Eq. (5). Eq. (5) gives that the minimum value that πrT can take is given by the number of dimensions only, a property that can be clearly seen when one treats the d dimensional case generically. Eq. (5) also shows that as d increases, the minimum value of πrT also increases. Indeed, for d = 4 the threshold value for the existence of a black hole is πrT = 3 √ 3 8 , or πrT = 0.650 approximately. For d = 5 the threshold value for the existence of a black holes is πrT = 1. For d ≥ 6, Eq. (5) gives that the threshold value is always larger than one. Given Eq. (5) we need from Eq. (4) to find an expression for the two black hole solutions, i.e., for r+1 r and r+2 r . Clearly, for πrT 1, Eq. (4) reduces to ( r+ r ) d−1 − ( r+ r ) 2 = 0, so in this case the two black hole solutions will be expansions around r+ r = 0 and r+ r = 1. We now turn to find approximate solutions for r +1 and r +2 . The smaller black hole solution r +1 : To find the smaller black hole solution r+1 r around r+ r = 0 we make a Taylor expansion and write r+1 r = r+1 r (πrT ) as r+1 r (πrT ) = a1 πrT + a2 (πrT ) 2 +..., where the a i are constants to be determined. Equating carefully power by power this expansion in Eq. (4) one finds, see Appendix A, (6) This is the smaller black hole solution r+1 r for large T . The larger black hole solution r +2 To find the larger black hole solution r+2 r around r+ r = 1 we make a Taylor expansion and write r+2 r = r+2 r (πrT ) as r+2 r (πrT ) = 1 + b1 πrT + b2 (πrT ) 2 + ..., where the b i are constants to be determined. Equating carefully power by power this expansion in Eq. (4) one finds, see Appendix A, This is the larger black hole solution r+2 r for large T . The equal radius black hole solution r +1 = r +2 Now, there is a T , not large where the two black holes have equal horizon radii. This happens when the equality in Eq. (5) holds, i.e., πrT = . In this case there is only one black hole solution for Eq. (4), namely, This means that the cavity's radius r is located at the black hole's photon sphere, since the photon sphere radius is given by r ph = d−1 2 1 d−3 r + , see [23] for the black hole photon sphere in d dimensions, see also Appendix B.
The full solution for r +1 and r +2 : In Fig. 1 the full solution of Eq. (4) is drawn displaying r +1 and r +2 as a function of πrT . The details are dependent on the dimension d of the spacetime, but the main features are as shown.

The location and the area of the cavity
Another important characterization of the canonical ensemble, besides its temperature is its location given by the radius r of the cavity's boundary. In some instances it is preferable to work with the cavity's boundary area A which can be given in terms of r as with Ω d−2 being the solid angle in a spherical ddimensional spacetime.
B. The Euclidean-Einstein action and the action functional or the partition function for a d-dimensional Schwarzschild black hole In the path integral approach to quantum gravity, i.e., the Hartle-Hawking approach, integration of the Euclidean Einstein action over the space of metrics g yields the canonical partition function Z = D[g] exp(−I[g]) Taking a black hole solution as the background metric, the leading term in the expansion will be that of the classical action, specifically, Here I is the Euclidean Einstein action of the gravitational system, being the black hole action if the system contains a black hole. For a d-dimensional spacetime the Euclidean Einstein action I is where M is a compact region of the spacetime and ∂M its boundary, |g| is the determinant of the d-dimensional spacetime metric g ab , R is the corresponding Ricci scalar, |h| is the determinant of the (d − 1)-dimensional induced metric on the boundary, and [K] is the difference of the extrinsic curvature K on the boundary to the extrinsic curvature of an equivalent boundary embedded in flat space, K flat . This subtraction is needed in order to normalize the action and the energy of the ensemble. Given that we are interested in a vacuum solution, R = 0, the action of Eq. (11) reduces to the boundary term. For the metric Eq. (1) the line element on the bound- Writing ds 2 | ∂M = h αβ dx α dx β , with α, β are indices for the time t and the angles θ i , one finds that the determinant of the induced metric is The extrinsic curvature of the boundary at r in d dimensions can be calculated to be K = d−2 The flat counterpart can be obtained by setting r + = 0, K flat = d−2 r . To perform the integral in Eq. (11) note that the coordinates on the boundary, t and θ i , can be separated into an integral over the time component, and and integral over the angles, so where the Euclidean time is integrated over the period β ∞ defined above, i.e., β ∞ = 4πr+ d−3 . Using [K] = K − K flat , the black hole Euclidean action as a function of the cavity's boundary radius r and the gravitational radius r + is then In this form one has that I = I(r, r + ).
Since the thermodynamic variables that fix the canonical ensemble are r and β, or equivalently, r and T if one prefers, we want to write the action (12) as a function of r and β only, I = I(r, β). Noting that r + = r + (r, β), see Eqs. (6) and (7) and Fig. 1, on has that Eq. (12) can be formally rewritten as with the help of Eqs. (2) and (3) for the last term, and where r + stands for r +1 and r +2 , With the approximation found in Eq. (6) for r +1 (r, β), the action for the small black hole is which is always positive. With the approximation found in Eq. (7) for r +2 (r, β), the action for the large black hole is which will be positive for small values of πrT , provided they still satisfy the condition for existence of equilibrium given in Eq. (5), and will be negative for all the other values of πrT . From Eq. (12), one can also take that the action of the larger black hole is positive for r r+ > Since to have a system at all one must impose r > r + , the action exists and is negative for 1 < r which can only be achieved by the larger black hole r +2 . Thus, in brief, the action given in Eq. (12) is zero or positive for Note that (d−1) 2

4(d−2)
1 d−3 sets an important cavity radius r in terms of r + , the Buchdahl radius, as we will discuss below, see also Appendix B.

III. THERMODYNAMICS
The statistical mechanics canonical ensemble setting of black holes is given through the partition function Z and its action I in Eq. (10), where I takes the form of Eq. (12), or Eq. (13), and the connection to thermodynamics is made by the relation between I and the free energy F , the relevant thermodynamic potential usually used in the canonical context. The needed relation is In thermodynamics the thermodynamic energy E and the entropy S are also important thermodynamic potentials and the relation between F , E, and S is Now, to establish the first law of thermodynamics we envisage E as the main thermodynamic potential, and assume it to be a function of the entropy S and the cavity area A, E = E(S, A). The first law of thermodynamics can then be written as where T is the thermodynamic variable conjugated to S, i.e., the temperature, that has to be found as an equation of state of the form T = T (S, A), and p is the thermodynamic variable conjugated to A, i.e., the tangential pressure or the pressure perpendicular to the cavity radius r, that has to be found as an equation of state of the form p = p(S, A). All quantities, E, T , S, p, and A, are local or quasilocal quantities defined at the cavity's location. To perform calculations directly with the action I given in Eq. (12), or Eq. (13), one changes variables in in the first law Eq. (19) to the variable F and then to I using Eq. (18) followed by Eq. (17). We have dF = dE − T dS − SdT and dI = βdF + F dβ, so that the first law can be written as i.e., I = I(β, A). Then, E, p and S are given by respectively. We can now find E, p, and S. To obtain the thermodynamic E we have to perform the derivative ∂I ∂β A . It is simpler to use the cavity radius r instead of its area A, which can be done through Eq. (9). If I is seen as I = I(r, β) then dI = ∂I ∂β r dβ + ∂I ∂r β dr. If I is seen as I = I(r, r + ) then dI = ∂I ∂r+ r dr + + ∂I ∂r r+ dr. Equating these two equations at constant r one obtains ∂I ∂β r = (∂I/∂r+)r (∂β/∂r+)r . Using Eqs. (2) and (12) in Eq. (21) yields, The total thermodynamic energy is larger than the spacetime mass m, and one can decompose the spacetime mass as the thermodynamic energy inside the cavity minus its gravitational binding energy, i.e. m = E − )Ω d−2 m has been used. This thermodynamic energy E is also a quasilocal energy [19].
To obtain the thermodynamic pressure p note that ∂I ∂r β = ∂I ∂r r+ − ∂I ∂β r ∂β ∂r r+ , where again it is simpler to use the cavity radius r instead of its area A, which can be done through Eq. (9). Using Eqs. (2) and (12) in Eq. (22) yields, To obtain the entropy S we use Eqs. (13) and (24) in Eq. (23) to yield This is the Bekenstein-Hawking entropy for black holes in d-dimensions.
Having derived the important thermodynamic quantities, we can now find how the number of dimensions d affects the Euler relation and the Gibbs-Duhem relation. From the equations for the thermodynamic energy and entropy, Eqs. (24) and (26), we can write . So from Euler's theorem on homogeneous functions, we find that E is homogeneous of degree This is the Euler relation for d-dimensional black holes in the canonical ensemble. Taking the differential of the Euler relation in Eq. (27) and using the first law in Eq. (19) we obtain which is the Gibbs-Duhem relation for d-dimensional black holes. In addition, the scaling laws for the gravitational canonical ensemble in d-dimensions can be de- Curved space is responsible for the fact that intensive parameters lose their homogeneity of degree zero, i.e., the Tolman temperature formula for thermal equilibrium in curved space forces the temperature to lose its usual intensive character. The same happens with the pressure which now scales as p → λ −1 p, a scaling that comes about because it is a pressure that acts in an area A rather than in a volume. Consequently, extensive parameters such as the energy also lose their homogeneity of degree 1. The action I scales as I → λ d−2 I and the free energy F as F → λ d−3 F .

IV. THERMAL STABILITY
The heat capacity at constant cavity area, C A , defined by determines the thermal stability of a system in the canonical ensemble. The thermodynamic energy E(r + , r) is given in Eq. (21) and r + (β, r) is given through Eq. (4). Since T = 1 β , see Eq. (3), and A = const, implies r = const, see Eq. (9), one finds that ∂E ∂T A = −β 2 (∂E/∂r+) r (∂β/∂r+) r . Then, the heat capacity for a black hole in d-dimensions is given by A system is thermally stable if i.e., the cavity's boundary r must lie between the black hole and its photon sphere radius, see Fig. 1, see also [13]. The smaller black hole r +1 given in Eq. (6) will always have its photon sphere inside the cavity radius r and so is thermodynamically unstable. The larger black hole r +2 given in Eq. (7) will have its photon sphere outside the cavity radius r and so is thermodynamically stable.
It is interesting to comment on the appearance of the photon orbit radius, r ph , in the context of thermodynamics of black holes, more precisely, in the context of black holes in the canonical ensemble, see also Appendix B. The photon orbit radius appears naturally in the context of particle dynamics in a Schwarzschild background. At this radius, massless particles travelling at the speed of light can have circular orbits. In four dimensions the photon orbit radis is r ph = 3 2 r + , in five dimensions it is r ph = √ 2r + , and in generic d dimen- It is a surprise that the bound also appears in a thermodynamic context. In this context the bound states that in a canonical ensemble with the boundary radius given by r, the black hole is thermodynamically marginally stable if r ph = r, is unstable if r ph < r, and stable if r ph > r. The two contexts, particle dynamics in a Schwarzschild background on one side and black hole thermodynamic stability on the other, are somehow correlated, although this correlation has not been clearly interpreted.

V. GENERALIZED FREE ENERGY FUNCTION
Thermodynamics is valid for stationary and thermodynamic stable systems. We have seen that there is one sta-ble black hole solution, the large black hole with horizon radius r +2 , whereas the smaller black hole with horizon radius r +1 which is unstable. So the whole thermodynamic procedure is valid in principle only for the r +2 black hole. For this black hole there is a well defined action I(r, r +2 ) given in Eq. (15) in an approximation, and its thermodynamic free energy is also well defined since F (r, r +2 ) = I(r,r+2) β , see Eq. (17). We can perturb the free energy F by keeping fixed the quantities that define the canonical ensemble, precisely, the cavity radius r and temperature T , and allow r + to vary from zero ro r. This generalized free energy,F , is then valid for 0 ≤ r + ≤ r, and where we have used Eq. (18) together with Eqs. (24) and (26). The generalized free energyF in Eq. (33) has several important properties. For r + = 0, the no black hole situation, one has F = 0. The no black hole situation represents classical hot flat space, i.e., nothing in a Minkowski spacetime, and so it is consistent that it has zero free energy. AlsoF has two stationary points as one readily finds by computing ∂F ∂r+ r,T = 0. The first stationary point is a local maximum and can be seen to correspond to the small black hole r +1 , withF (r +1 ), in thermal equilibrium but unstable, see Eq. (4). The second stationary point is a local minimum and can be seen to correspond to the large black hole r +2 , withF (r +1 ), in thermodynamic equilibrium and stable, see Eq. (4). Interpretinḡ F as the thermodynamic potential of the ensemble, one can say that the smaller black hole solution r +1 acts as a potential barrier separating two stable solutions, classical hot flat space at r + = 0 withF = 0, and the large black hole r +2 withF =F (r +2 ). In general,F (r +2 ) ≤F (r +1 ), Moreover,F given in Eq. (33) also signals phase transitions. In the canonical ensemble phase transitions occur always in the direction of decreasing free energy, in this case decreasingF . One can then study whether there is no possibility of the occurrence of a phase transition from classical hot flat space to the stable black hole r +2 or, what here amounts to the same thing, a phase transition from the stable black hole r +2 to classical hot flat space can occur, and in which conditions. One can also study whether a phase transition from classical hot flat space to the stable black hole r +2 can occur, and in which conditions. Figure 2 gathers all the necessary information to study these phase transitions by plotting the free energy functionF as a function of the horizon radius in units of the cavity radius, r+ r , as given in Eq. (33), for four different dimensions, d = 4, d = 5, d = 6, and d = 11, and for each dimension, giving the four important different situations that depend on the value of πrT , and, to complement, by also plotting the free energy functionF as a function of the horizon radius in units of the cavity radius, r+ r , as given in Eq. (33), for the four important different situations that depend on the value of πrT , and in each situation showing the four different dimensions, d = 4, d = 5, d = 6, and d = 11. Let us see in detail these phase transitions. We start the analysis with the no possibility of the occurrence of a phase transition from classical hot flat space to the stable black hole r +2 or, what here amounts to the same thing, a phase transition from the stable black hole r +2 to classical hot flat space can occur. Since classical hot flat space has zero free energyF = 0, one has that a phase transition from the stable black hole r +2 to classical hot flat space can occur whenF (r +2 ) ≥ 0, i.e., I(r +2 ) ≥ 0. By repeating the analysis done from Eq. (12) to Eq. (16) one can find that I(r +2 ) ≥ 0 when Together with the condition for the existence of black holes in thermodynamic equilibrium at all, i.e., Eq. (5), one finds that a large black hole r +2 can decay into classical hot flat space when Also, when πrT and r obey Eq. (34) classical hot flat space never nucleates into a black hole. We now analyze the inverse transition, i.e., the transition from classical hot flat space to the stable black hole. Since classical hot flat space has zero free energyF = 0, one has that a phase transition to the stable black hole r +2 can occur whenF (r +2 ) ≤ 0, i.e., I(r +2 ) ≤ 0. From Eq. (12) we have made the analysis ending in Eq. (16), i.e., we have found that I(r +2 ) ≤ 0 when r+ r ≥ r+ r Buch where r Buch is the d-dimensional Buchdahl radius given by r Buch = (35) Equation (35) is a necessary and sufficient condition for the occurrence of nucleation from classical hot flat space to the stable black hole r +2 , a transition that is done through the unstable black hole r +1 . We also see that Eq. (35) imposes a stronger condition than the having black holes in thermodynamic equilibrium at all.
, when there are no black hole solutions. For each dimension, the curve below the upper curve is for the limiting situation πrT = d−3 , where the two black hole solutions coincide, r+1 = r+2, in an inflection point, in which situation there is neutral equilibrium. For each dimension, the curve above the lower curve is for πrT where the smaller black hole r+1 has positive free energy and is unstable, and the larger black hole r+2 has zero free energy and is stable. For each dimension, the lower where the smaller black hole r+1 has still positive free energy and is unstable, and the larger black hole r+2 has now negative free energy and is stable. In the upper two curves it is not possible for classical hot flat space r+ = 0 which has zero free energy to transition to the large r+2 black hole, but the r+2 black hole can transition to classical hot flat space. In the lower two curves, classical hot flat space r+ = 0 can nucleate into the large r+2 black hole through the small black hole r+1. (b) The free energy functionF is plotted as a function of the horizon radius r+ for the four typical situations, namely, πrT < d−3 For each typical situation one has the four curves corresponding to the four different dimensions, d = 4, d = 5, d = 6, and d = 11. In each plot the free energyF is adimensionalized in terms of the cavity radius r asF r d−3 and the horizon radius is also normalized to r as r + r , so that 0 ≤ r + r ≤ 1.
It is interesting to comment on the appearance of the Buchdahl radius, r Buch , in the context of thermodynamics of black holes, more precisely, in the context of black holes in the canonical ensemble, see also Appendix B. The Buchdahl bound has appeared in the context of general relativistic star structure. It is a bound that states that under some generic conditions for a star of radius r, the spacetime is free of singularities for r Buch ≤ r. It is a lower bound for the ratio r r+ , where r is the star's radius and r + its gravitational radius, that appears such that the star spacetime is singularity free. Presumably, for r Buch ≥ r the star might collapse into a black hole. In four dimensions the limiting radius of the bound is r Buch = 9 8 r + , in five dimensions it is r Buch = 2 √ 3 r + , and in generic d dimensions the limiting radius of the bound is [20,21] for four dimensions and [24] for d dimensions. It is a surprise that the bound also appears in a thermodynamic context. In this context the bound we have found states that in a canonical ensemble with the boundary radius given by r, classical hot flat space cannot transition to a black hole phase if r Buch ≤ r. If, contrarily, r Buch ≥ r then classical hot flat space can make a transition to a black hole. The two contexts, general relativistic star solutions and gravitational collapse on one side and black hole thermodynamic on the other, are thus clearly correlated, and it hints that r Buch is an intrinsic property of the Schwarzschild spacetime, as the radius of the photon orbit, r ph , is. To corroborate this statement and explicitly see this correlation, a comparison of the thermodynamics of Schwarzschild black holes and classical hot flat space in a cavity with radius r at a fixed temperature T in the canonical ensemble in d dimensions with the thermodynamics of a self-gravitating thin shell of radius r and at temperature T with a Minkowski interior and a Schwarzschild exterior can be performed, see Appendix C.

VI. THE ACTION FUNCTIONAL TO SECOND ORDER AND ITS ROLE IN THERMODYNAMIC STABILITY
The path integral approach to a quantum gravity system prescribes that one must integrate the the exponential of the negative of the Euclidean Einstein action I over the space of metrics g to obtain the canonical partition function of the system, Z = d[g] exp(−I[g]). For a black hole system with classical action I, one can use the zeroth order approximation yielding Z = exp(−I), see Eq. (10). One can go a step further and perturb the Euclidean black hole metricḡ ab by a small amount h ab , such that the full perturbed metric is g ab =ḡ ab + h ab , where clearlyḡ ab is envisaged now as a background solution and h ab as a small fluctuation. The Euclidean action can then be approximated by √ḡ A abcd h ab h cd , for some operator A abcd which generically depends on the metricḡ ab , its covariant derivatives, and curvature terms. There are two possibilities depending on the perturbation operator A abcd . If one of the eigenvalues of A abcd is negative then the integral gets an imaginary term which implies that the action and the free energy have an imaginary term and the partition function will also contain an imaginary part. In this case the original classical black hole instanton is a saddle point and it is unstable. On the contrary, there is the possibility that all of the eigenvalues of A abcd are positive, in which case the perturbation modes are stable around the given black hole solution.
In four dimensions, the perturbation performed around the Euclidean Schwarzschild black hole solution with a cavity with a very large radius r at a fixed temperature T , found [6] that the operator A abcd has indeed a negative eigenvalue resulting that there is an instability. Connecting this result to thermodynamic stability, it means that a black hole in thermodynamic equilibrium in the canonical ensemble with a large cavity cannot be thermodynamically stable. However, when the cavity radius r is reduced one finds [7] that the negative mode vanishes below a certain radius r = 3 2 r + of the cavity, indicating stability. Connecting the result to thermodynamic stability, it means that a black hole in thermodynamic equilibrium in the canonical ensemble can be thermodynamically stable for r ≤ 3 2 r + . This correspondence between perturbation path integral theory and thermodynamic stability was found by York [5], establishing that there are actually two Euclidean solutions in thermal equilibrium, one of which is in an unstable thermodynamic equilibrium which has negative heat capacity, the smaller one denoted by r +1 , and one which is in stable thermodynamic equilibrium which has positive heat capacity, the larger one denoted by r +2 . The condition for stable thermodynamic equilibrium matched exactly the condition for stability of the solution.
In d dimensions one can also work out a perturbation analysis on the path integral [13] to find that ddimensional Schwarzschild black holes have a negative mode if the black hole radius r + is small compared to the cavity radius r, i.e., there is a negative mode for the r +1 black hole, and have no negative mode if the black hole radius r + is of the order of the cavity radius r, i.e., there is no negative mode for the r +2 black hole, the marginal zero mode case being when the cavity radius r is at the photon orbit radius r = r ph . These results are thus also in one to one correspondence with the instability or stability thermodynamic analysis done through the heat capacity of the d-dimensional black hole. In [14] it was further clarified that thermodynamic stability of black holes and the mechanic stability of black systems, such as black branes, are interrelated.

VII. GROUND STATE OF THE CANONICAL ENSEMBLE: QUANTUM HOT FLAT SPACE, BLACK HOLE, OR BOTH
From the partition function of black holes and the thermodynamic stability, as well as from the perturbation studies on the action functional it is clear that in order to properly understand the physics involved one has to treat hot flat space in quantum terms, i.e., hot flat space should be treated as made of hot gravitons. In this way, the issues of what is the ground state of the canonical ensemble and what are the possible phase transitions can be addressed.
In the canonical ensemble the ground state is the one that has the lowest free energy F , or if one prefers, the lowest action I, as I = βF . For the hot gravity system under study the three possible phases are quantum hot flat space, the phase of a stable black hole with large radius r +2 , or a possible superposition of these two phases. The black hole with small radius r +1 is not a phase since it is unstable, as found previously. Thus, to find the ground state of hot gravity in the canonical ensemble, i.e., hot gravity at a given temperature T and a given cavity radius r, the free energy of quantum hot flat space F HFS and the free energy of the large black hole F (r +2 ) must be compared.
Minkowski flat space has r + = 0 and in the context of hot gravity is also a solution in thermal equilibrium, i.e., fixing the temperature at the cavity boundary, the temperature will be the same everywhere inside the cavity. As follows from the Stefan-Boltzmann law, quantum hot flat space, or flat space at finite temperature, has finite free energy and thus finite action. For a d-dimensional system containing only gravitons, which is the case we consider here, the number of massless species is given by 1 2 d(d − 3) and in this case one finds that the free energy in d dimensions of quantum hot flat space is given by where a = Γ(d)ζ(d) , with Γ and ζ being the gamma and zeta functions, respectively, see Appendix D. The free energy of quantum hot flat space is negative, and not zero as in the case of classical hot flat space. Its dependence with the cavity radius r and temperature T is r d−1 T d . If one prefers to use the action I, then since I = βF and β = 1 T one has I HFS = The free energy of the stable black hole r +2 is F (r +2 ). This free energy can be found using the larger r +2 solution of Eq. (4) in Eq. (13) for I and then using F (r +2 ) = T I(r +2 ). For d = 5 one can find an exact solution [12], but for any other d either there is no exact solution or, if there is, it is unusable. We can then either resort to the large T approximation for r +2 given in Eq. (7) and for I(r +2 ) and so F (r +2 ) given in Eq. (15), or to numeric calculations. Let us start with the large T approximation. Using Eq. (15) and F (r +2 ) = T I(r +2 ) yields where we have been shortening the notation F (r +2 ) ≡ F (r, r +2 (r, β)). One could make a plot through numerical calculations of F (r +2 ) as a function of πrT but it is not so useful.
One has now to compare F HFS of Eq. (36) with F (r +2 ) of Eq. (37) or F (r +2 ) given by numerical calculations. The stable black hole r +2 is the ground state when In the situation that the equality holds then the black hole and quantum hot flat space phases coexist. For the phase diagram of the gravitational canonical ensemble with a plot of the cavity radius r versus the temperature T for several different dimensions, specifically, d = 4, 5, 6, and 11, see Fig. 3. Let us first use the approximation given by Eq. (37). Putting Eq. (36) and Eq. (37) into Eq. (38) yields, leading to a minimum radius r min given by r min = , below which the black hole will never be the ground state of the ensemble. In more detail, in the case the radius of the cavity is smaller than r min one has that quantum hot flat space is always the ground state. Therefore, a necessary but not sufficient condition for black hole nucleation from quantum hot flat space is that the radius of the cavity be greater than r min . One finds in these approximations that r min 0.2525 in d = 4, r min 0.4971 in d = 5, r min 0.7012 in d = 6, and r min 1.5636 in d = 11. In the large d limit one has r min → a 1 d , and since a = → ∞, in the d → ∞ limit, one has that r min tends to infinity. For d finite, say d = 11, r min 1.5636, i.e., r min is still near the Planck length which we have set to one, but it increases for larger d. If one uses numerical calculations, see Fig. 3, then one finds r min 0.2511 in d = 4, r min 0.4915 in d = 5, r min 0.6901 in d = 6, and r min 1.5187 in d = 11. The approximation is in any case excellent.
The inequality of Eq. (38) can also be written in terms of the temperature of the cavity T . Let us use the approximation. Then, indeed, Eq. (38) yields which then leads to finding a maximum value for the tem- , above which the black hole will never be the ground state. In more detail, in the case the temperature is larger than T max one has that quantum hot flat space is always the ground state. Therefore, a necessary but not sufficient condition for black hole nucleation from quantum hot flat space is that the temperature of the cavity be smaller than T max . One finds in these approximations that T max 1.6979 in d = 4, T max 1.1365 in d = 5, T max 0.9827 in d = 6, and T max 0.7891 in d = 11. In the large d limit, one finds that T max tends to T max → 1 a 1 d which, taking into account the expression for a, a = Γ(d)ζ(d) , given the d → ∞ limit of a, tends to 0. For not so large values of d, the maximum temperature does not deviate much from the Planck temperature which we set to one. If one uses numerical calculations, see Fig. 3, then one finds T max 1.6986 in d = 4, T max 1.1370 in d = 5, T max 0.9830 in d = 6, and T max 0.7892 in d = 11. One sees that the approximations for the maximum temperature hold better than for the minimum radius for large d. The fact that the approximation for T max holds better than the one for r min for higher dimensions is because the initial approximation taken, i.e., the solution r +2 in Eq. (7), depends on πrT . From Eq. (39) it was seen that, for large d, r min will lie on a curve approaching πrT = d 4 , whereas from Eq. (40), for large d, T max will lie on a curve approaching πrT = 3d 4 , so T max will be more accurate than r min , since Eq. (7) holds better for larger values of πrT . Thus, from Fig. 3 we see that there are three phases. One phase when the cavity's radius r and the cavity's temperature T are such that in thermodynamic equilibrium only quantum hot flat space is possible, there are no is the region, or phase, where there quantum hot flat space is the only equilibrium state, in this region there are no black holes in thermodynamic equilibrium at al. The gray region in each plot characterizes the phase that has quantum hot flat space as the ground state, i.e., the action for quantum hot flat space is lower than the stable black hole's action, see Eq. (38) with the inequality reversed. The dark region in each plot characterizes the phase that has the larger stable black hole r+2 as the ground state of the canonical ensemble, see Eq. (38) with the inequality holding. A quantum hot flat space configuration in this phase is then able to nucleate stable black holes. The thick black line in each plot yields a mixed phase, i.e., a superposition of the quantum hot flat ground state phase with the stable black hole ground state phase, see Eq. (38) with the equality holding. The extremal values for the radius, rmin, and for the temperature, Tmax, are the lower bound and upper bound of the dark region, respectively. If instead of quantum hot flat space one were to consider classical hot flat space, i.e., the zero free energy of Minkowski spacetime, the gray and the dark regions would be separated by an asymptote following Eq. (35), which in the classical limit, i.e., r 1 and T 1, in Planck units, matches the line separating both regions, see Appendix E for further details on classical hot flat space with the corresponding black hole phase transitions.
stable equilibrium black holes r +2 , and for that matter also no unstable equilibrium black holes r +1 , but black holes out of thermodynamic equilibrium may perhaps appear in this phase. Another phase when the cavity's radius r and the cavity's temperature T are such that quantum hot flat space is the ground state and so sta-ble black holes r +2 can transition into quantum hot flat space. And yet another phase when the cavity's radius r and the cavity's temperature T are such that the stable black hole r +2 is the ground state and so quantum hot flat space can nucleate stable black holes. These three phases are represented by the white, gray, and dark regions, respectively in Fig. 3. There is a mixed phase which is a superposition of the quantum hot flat ground state phase with the stable black hole r +2 ground state phase, which is represented by a line between the gray and dark regions. A feature that Fig. 3 makes clear is that as the number of spacetime dimensions increases, the region for the quantum hot flat ground state phase gets larger, whereas the region for the stable black hole ground state phase gets smaller. In the d → ∞ limit black holes never nucleate as expected.
It is also of interest to understand the passage from quantum hot flat space and black hole phase transitions to classical hot flat space and the corresponding black hole phase transitions. In this passage one puts the constant a that appears in Eq. (36) to zero, a = 0, and the analysis follows, see Appendix E.

VIII. DENSITY OF STATES
It is interesting to find through the density of states ν with a given energy E that the entropy of the r +2 black hole is S = A+2 4 . Fixing the cavity radius r, the number of states between E and E +dE is given by ν(E)dE with ν(E) being the density of states. Thus, weighing this density ν(E) with the Boltzmann factor e −βE , the canonical partition function can be written as Z(β, r) = dE ν(E)e −βE . Inverting this expression by an inverse Laplace transform one obtains ν(E) = 1 2πi i∞ −i∞ dβ Z(β)e βE . The partition function for the stable black hole is Z = exp(−I(r, r +2 (r, β))).
Using I(r, r +2 (r, β)) given in Eq. (15) for large rT one finds Taking the inverse Laplace transform one has Now, the spacetime mass m is given in terms of E and the cavity radius r by m = E − We can then write ν(E) as . Finally, with the equation r d−3 (d−2)Ω d−2 m along with the fact that r +2 r for the stable black hole in this regime, one finds that the density of states is well described by where the area of the black hole is A +2 = Ω d−2 r d−2 +2 . The entropy S and the density of states ν are related through the formula S = a ln ν, for some constant a, so the black hole entropy is where we discarded the remaining constant. In contrast, for the unstable black hole r +1 , the action of Eq. (14) has a divergent integral when one performs the Laplace transform. Only the large stable black hole r +2 yields the correct result.
For a synopsis of all the results and further comments see Appendix F.
It is a polynomial equation of order d−1, which has direct exact solutions for d = 4 and d = 5, whereas for other d one is compelled to resort to approximation schemes or numerical calculations. We display an approximation scheme to find r +1 and r +2 . For the smaller black hole r +1 , see Fig. A1, let us write the general form of the solution as a Taylor expansion on πrT around r + = 0. Let us call r +1 the gravitational radius of the smaller black hole. Here, we write r +1 = r +1 (πrT ) as where the a i are constants to be determined. Now, we need the expanding expressions for r+1 r d−1 and r+1 r 2 so that each power in πrT cancels out in Eq. (A1). Using Eq. (A2) we find r+1  For the larger black hole r +2 , see Fig. A2, let us write the general form of the solution as a Taylor expansion on πrT around r. Let us call r +2 the gravitational radius of the larger black hole. Here, we write r +2 = r +2 (πrT ) as where the b i for i ≥ 0 are constants to be determined. Since for r +2 the expansion is around r one has b 0 = 1. Now, we need the expanding expressions for r+2 Eqs. (A3) and (A5), are precisely the Eqs. (6) and (7), respectively, in the text. The Schwarzschild solution was generalized to d dimensions by Tangherlini [22], and it is variously called d-dimensional Schwarzschild solution or Schwarzschild-Tangherlini solution. Here we have opted for the first name.
The photon orbit radius, or massless particle otbit radius, appears naturally in the context of particle dynamics in a Schwarzschild d-dimensional background. In d spacetime dimensions it is [23] For d = 4 one gets r ph = 3 2 r + , a result which is derived in all books in general relativity. This radius is also the radius for a cavity of radius r, below wich a black hole with horizon radius r + in the canonical ensemble is thermodynamically stable. At this radius r = r ph the heat capacity C A at constant ensemble area A, with A = Ω d−2 r d−2 and Ω d−2 being the solid angle in a spherical d-dimensional spacetime, is zero, C A = 0, for r < r ph the heat capacity is positive, C A > 0.
The Buchdahl radius appears naturally in the context of star structure and dynamics in general relativity. It is a bound that states that under some generic conditions for a spherical star of radius r, the spacetime is free of singularities for r Buch ≤ r. For r Buch ≥ r the star supposedly can collapse into a black hole. In d spacetime dimensions r Buch ≥ r is [24] This radius is as well a limit for spherical thin shells in d-dimensional spacetimes that have an equation of state given by p ≤ 1 d−2 σ, where σ is the energy density of the shell and p the tangential pressure on the shell.  [20] and later for thin shells in [21]. The Buchdahl radius is also the radius that a cavity in the canonical ensemble for spherical gravitation has, such that the free energy F of the system is zero F = 0, and so above the Buchdahl radius classical hot flat space does not nucleate into a black hole, below the Buchdahl radius classical hot flat space does nucleate into a black hole. It is clear that the two contexts in which r Buch appears are clearly correlated. That the Buchdahl radius enters into thermodynamics of black holes in the canonical ensemble was noticed first in [12] where in five dimensions the radius is r ph = 2 √ 3 r + . Thus, the photon orbit radius r ph and the Buchdahl radius r Buch appear in two separate contexts, the former in both particle dynamics and in thermodynamics, the latter in both star dynamics and in thermodynamics. The two contexts for r ph , precisely, particle dynamics in a Schwarzschild background on one side and black hole thermodynamic stability on the other, are somehow correlated, although this correlation has not been clearly interpreted. The two contexts for r Buch , namely, general relativistic star solutions and gravitational collapse dynamics on one side and black hole thermodynamic on the other, are, on the other hand, clearly correlated. It also hints that r Buch is an intrinsic property of the Schwarzschild spacetime, as the radius of the photon orbit, r ph , is. Note also from Eqs. Besides the black hole in the canonical ensemble, another system that can have an exact thermodynamic treatment is provided by spherical thin shells. We here compare the thermodynamics of Schwarzschild black holes and classical hot flat space in a cavity with radius r at a fixed temperature T in the canonical ensemble in d dimensions that we analyzed with the thermodynamics of a self-gravitating Schwarzschild thin shell, i.e., a thin shell with a Minkowski interior and a Schwarzschild exterior, with radius r at a fixed temperature T in d dimensions [18]. These thin matter shells are (d − 2)dimensional branes in a spacetime of d dimensions.
In the black hole in the canonical ensemble case one has a cavity bounded by a massless boundary or massless thin shell, which has radius r and is at temperature T . The black hole, when there is one, is inside the boundary and it has a gravitational or event horizon radius r + . There is also the possibility that inside the cavity there is only hot flat space, which for this purpose is pure hot Minkowski space, i.e., classical hot flat space. In the self-gravitating thin matter shell case one has that the shell is located at radius r and is at fixed temperature T . The shell has rest mass M , and so the spacetime has a gravitational radius r + , which is not an event horizon radius, since there is no event horizon in this case. The thin shell is a classical object.
Let us analyze the procedures for a black hole in the canonical ensemble in d dimensions and the procedure for the thermodynamic thin matter shell in d dimensions.
The procedures are different. The procedure for the black hole in a cavity is through the path integral statistical mechanics approach where a gravitational canonical ensemble is defined which is then used to obtain all the thermodynamic properties, as we have seen here for ddimensional spacetimes.
The procedure for the self-gravitating thin shell is through local thermodynamics alone. The first law of thermodynamics at the thin shell is used. Let us see this, see also [18] for a thorough analysis of thermodynamics of thin shells in d spacetime dimensions. In the thermodynamic analysis of a Schwarzschild thin matter shell, a spherical static matter shell with rest mass M , radius r and so area A = Ω d−2 r d−2 , and tangential pressure p, with a well defined local temperature T , obeys the first law of thermodynamics T dS = dM + pdA, where S is its entropy. T and p have to be provided through equations of state, and then the entropy is generically given by S = S(M, A). Using the spacetime general relativity junction conditions one gets a relation between the gravitational radius r + , the proper mass M and r, i.e., r + = r + (M, r), and in addition an expression for the tangential pressure p in terms of M and A. Another set of conditions besides the junction conditions is the one provided by the integrability conditions for the first law, so that the entropy S is an exact differential. The integrability condition for a Schwarzschild shell is indeed just one condition, it gives that the local temperature at the shell T (M, r), or T (r + (M, r), r) if one prefers, must have the Tolman form for the temperature, i.e., T (r + , r) = T∞(r+) k(r,r+) where k(r, r + ) is the redshift factor k = 1 − r+ r and T ∞ (r + ) is a function of r + only to be chosen at our will, it is a free function. T ∞ (r + ) can be seen as the temperature a small amount of radiation would have at infinity after leaking out from the shell at temperature T .
Let us analyze now the results for a black hole in the canonical ensemble in d dimensions and the results for the thermodynamic thin matter shell in d dimensions.
The results have many similarities.
First, we analyze and compare the temperatures in each case. For the black hole in the canonical ensemble, the temperature T of a heat bath at the cavity's boundary at radius r is fixed and since the black hole has mandatorily the Hawking temperature T H , this obliges, through the Tolman formula, the black hole radius to be fixed, the computation showing that there are two equilibrium black hole solutions, one large and stable and one small and unstable. For the thermodynamic thin matter shell at radius r one puts it at some fixed temperature T which it is shown to obey the strict Tolman formula, T (r + , r) = T∞(r+) k(r,r+) , with T ∞ (r + ) a free function. This free function can be any well-behaved function of r + . In particular T ∞ (r + ) can have the Hawking expression T ∞ (r + ) = T H . In this case, when the thin shell has its temperature at infinity equal to the Hawking temperature, then the two systems, namely, the black hole in the canonical ensemble and the thin shell, are thermodynamically identical in many respects.
Second, we analyze and compare the energies and pressures in each case. For the black hole in the canonical ensemble the thermodynamic energy E at the cavity's For the black hole in the canonical ensemble the pressure p, which is a thermodynamic tangential pressure, at the cavity's radius r, is . For the thin matter shell at radius r, assumed to be composed of a perfect fluid, one has to find its stress-energy tensor S ab , where a, b are spacetime indices on the shell. S ab can be put in diagonal form and its components are characterized by the rest mass energy density σ and the tangential pressure p acting on a (d−2)-sphere at radius r. The junction conditions give that the rest mass energy density σ is σ = For the thin matter shell at radius r the pressure p, which is a dynamical tangential pressure derived from the junction conditions, is p = d−3 Clearly, the thermodynamic energy E in the black hole case and the rest mass M in the thin shell case have the same expression and so can be identified, i.e., E = M . E and M are quasilocal energies. Also clearly, the thermodynamic pressure p in the black hole case and the dynamical pressure p in the thin shell have the same expression and so can be identified.
Third, we analyze and compare the entropies in each case. For the black hole in the canonical ensemble the entropy is the Bekenstein-Hawking area law S = 1 4 A + , for both the stable and the unstable black hole. For the thermodynamic thin matter shell one finds that for any well-behaved T ∞ (r + ) its entropy is given by a function of r + alone, S = S(r + ), independent of the shell radius r. In particular, when the shell is put at a temperature T such that the temperature at infinity is the Hawking temperature T ∞ (r + ) = T H , then the entropy of the shell S = S(r + ) is definitely given by the Bekenstein-Hawking area law S = 1 4 A + . Moreover, when the shell is at r + , r = r + , then the temperature at infinity has to be mandatorily the Hawking temperature, otherwise quantum effects render the whole system unstable and undefined. Thus, when the shell turns into a black hole, more properly into a quasiblack hole, one recovers from the shell thermodynamics the black hole's expressions.
Fourth, we analyze and compare the thermal stability in each case. For the black hole in the canonical ensemble the heat capacity C A is the quantity that signals thermodynamic stability if C A ≥ 0 from thermodynamic instability if C A < 0. It was shown that , and it implies that when the cavity's radius r is less or equal than the radius of the circular photon orbits, i.e., r + < r ≤ r ph the black hole is thermodynamically stable, otherwise unstable, this meaning that the large black hole r +2 is the stable one, the smaller r +1 is unstable. For the thin matter shell there is also the thermodynamic stability criterion C A ≥ 0, as well as other stability criteria which further restrict the thermodynamic stability. The particular interesting case, the one related to the black hole in the canonical ensemble, is when the temperature of the shell at infinity is the Hawking temperature T H . In this very case the heat capacity C A has the expression and so for stability the self-gravitating matter shell must be placed between its own gravitational and its photon sphere for stability, i.e., r + < r ≤ r ph . Thus, in the case that the temperature of the shell at infinity is the Hawking temperature, and so in the situation that is thermodynamic similar to the black hole, the thermodynamic criterion of positive heat capacity gives the same result for both systems.
Fifth, we analyze and compare the generalized free energy function in each case. For the black hole in the canonical ensemble the free energy F gives a special cavity radius r for which it is zero. This radius is the Buchdahl radius r Buch that appears naturally in general relativistic star structure and dynamics, especially in star gravitational collapse. It also appears in the black hole thermodynamic context. For r ≥ r Buch classical hot flat space that does transition to a black hole, for r < r Buch there is a phase transition from classical hot flat space to a black hole. For the thin matter shell, with the identification of the mass M with the thermal energy E, M = E, a free energy F can be defined by F = M −T S. When the temperature of the shell at infinity is the Hawking temperature T H and so the shell has the Bekenstein-Hawking entropy, such a free energy F also gives the Buchdahl radius r Buch as the special cavity radius r for which F = 0, presumably meaning that it is energetically favorable for the shell to disperse away at this radius in the given conditions. Here, the Buchdahl radius r Buch appears also as a structure and dynamic radius on top of being a thermodynamic one. Indeed, by imposing that the equation of state for the matter in the shell obeys p ≤ 1 d−2 σ, i.e., by imposing that the pressure is equal or less than the radiation pressure, a sort of energy condition, specifically, the trace of the stress-energy tensor S ab is equal or less than zero, Tr S ab ≤ 0, one finds that the bound p = 1 d−2 σ, is satisfied for the d-dimensional Buchdahl radius, i.e., r Buch = (d−1) 2 4(d−2) 1 d−3 r + . Shells with lesser radius have to have a stiffer equation of state. So p ≤ 1 d−2 σ imposes a Buchdahl bound for shells. Thus, one finds that the free energy in both cases is zero when the radius of the cavity r or the radius of the shell r are at the Buchdahl radius, in the latter case meaning that the pressure at the shell is equal to the radiation pressure.
Thus, this thorough comparison between the black hole in the canonical ensemble in d dimensions and the thin matter shell in d dimensions shows that indeed, when the situations are similar, explicitly, when the shell's temperature at infinity is the Hawking temperature, and for the quantities that makes sense to perform a comparison, the two systems behave thermodynamically in similar ways. The boundary of the black hole cavity at a definite temperature defines a heat reservoir, analogously, the shell at a definite temperature is a heat reservoir.
Appendix D: Quantum hot flat space in d spacetime dimensions The first law of thermodynamics for quantum hot flat space is written as where T is the temperature of the space, S HFS is the quantum hot flat space entropy, E HFS is its internal energy, P HFS is its radiation pressure, and V the volume it occupies. The internal energy E HFS of such a radiation gas has the usual fomula, definitely, where N is the total number of massless states, and a is a quantum mechanics constant given by a = , with Γ and ζ being the gamma and zeta functions, respectively. The constant a is related to the d-dimensional Stefan-Boltzmann constant σ through [25], with for d = 4 it reduces to σ = a.
The equation of state for radiation that gives a relation between the radiation pressure P HFS , V , and E HFS , is so that using Eq. (D2) one finds P HFS = N a d−1 T d . From the first law Eq. (D1) and using Eqs. (D2) and (D3) one finds the entropy of quantum hot flat space i.e., S HFS = d d−1 N V aT d−1 . The free energy for quantum hot flat space is which is the expression we use in Eq. (36). To complete, since I = βF and β = 1 T , the action for d-dimensional quantum hot flat space is Appendix E: Classical hot flat space in d spacetime dimensions as a product of quantum hot flat space and the corresponding black hole phase transitions It is of interest to understand the passage to classical hot flat space in d spacetime dimensions from quantum hot flat space and look into the black hole phase transitions from classical hot flat space in some more detail.
In classical hot flat space one puts a = 0 and so Eq. (36), or Eq. (D7), reads now F HFS = 0 . (E1) Thus, Eq. (38) which states the condition for the stable black hole r +2 be the ground state, turns into The phase diagram for black holes and a classical hot flat space in d = 4, 5, 6, and 11 dimensions, is now given in Fig. E1, which is the limit of Fig. 3 when a = 0. Eq. (E2) has no extrema, unlike the quantum case of Eq. (38). Using Eq. (38) we have found a minimum radius r min such that if the cavity's radius r obeys r < r min only quantum hot flat space can be the ground state. We have also found, using Eq. (38), a maximum temperature T max such that if the cavity's temperature T obeys T > T max only quantum hot flat space could be the ground state. For classical hot flat space these extrema do not occur, or to be more precise, one finds r min = 0 and T max = ∞.
Since r min and T max do not enter the problem if one uses classical hot flat space, the only parameter that matters is πrT , see Eq. in this hyperbola gives the Buchdahl radius r Buch and the corresponding temperature. The dark region in each plot, delimited by the latter hyperbola, is characterized by having as the ground state the larger stable black hole r+2. The thick black line in each plot yields a mixed phase, i.e., a superposition of the classical hot flat space ground state phase with the stable black holes ground state phase. Comparing this figure with Fig. 3 for quantum hot flat space one sees that classical hot flat space approximates quantum hot flat space for large cavity radius r and low temperature T .
have seen, each point in this hyperbola gives the photon radius r ph = d−1  Thus, there are three phases. One phase when the cavity's radius r and the cavity's temperature T only give the possibility of the existence of classical hot flat space, there are no stable equilibrium black holes r +2 , and for that matter also no unstable equilibrium black holes r +1 , but eventually black holes out of thermodynamic equilibrium may appear in this phase. Another phase when the cavity's radius r obeys r Buch < r < r ph , where classical hot flat space is the ground state and so stable black holes r +2 can transition into classical hot flat space. And yet another phase when the cavity's radius r obeys r < r Buch where the stable black hole r +2 is the ground state and so classical hot flat space can nucleate stable black holes r +2 . There is also a mixed phase which is a superposition of the two previous phases. In Fig. E1 the three phases are represented by the white, gray, and dark regions, respectively, and the mixed phase by a thick black line between the gray and dark regions.
Comparing Fig. E1 for classical hot flat space with Fig. 3 for quantum hot flat space one sees that classical hot flat space approximates quantum hot flat space for large cavity radius r and low temperature T . Two important consequences can be drawn from this comparison. One consequence is that in classical hot flat space, as the number of spacetime dimensions increases, the region for which stable black holes can transition into classical hot flat space gets smaller, whereas the region for which classical hot flat space can nucleate stable black holes gets larger, contrarily to what happens in quantum hot flat space, thus showing clearly that the classical approximation is not valid for a vast region of the r × T plane. The other consequence of this comparison is that the Buchdahl radius is an important radius in the classical approximation, as one would expect.