Hairy black holes in a box

We do a systematic study of the phases of gravity coupled to an electromagnetic field and charged scalar in flat space, with box boundary conditions. The scalar-less box has previously been investigated by Braden, Brown, Whiting and York (and others) before AdS/CFT and we elaborate and extend their results in a language more familiar from holography. The phase diagram of the system is analogous to that of AdS black holes, but we emphasize the differences and explain their origin. Once the scalar is added, we show that the system admits both boson stars as well as hairy black holes as solutions, providing yet another way to evade flat space no-hair theorems. Furthermore both these solutions can exist as stable phases in regions of the phase diagram. The final picture of the phases that emerges is strikingly similar to that found recently for holographic superconductors in global AdS, arXiv:1602.07211. Our construction lays bare certain previously unnoticed subtleties associated to the definition quasi-local charges for gravitating scalar fields in finite regions.


Introduction
Schwarzschild black holes in flat space have negative specific heat, which means that they heat up by Hawking radiating and cool down by absorbing radiation. Therefore, they cannot be in equilibrium with thermal radiation in asymptotically flat space. As is well known, one way to bypass this problem is to put the black hole in a (small enough) box, and to study the phases of the black hole + radiation system.
A natural gravitational box for the black hole is provided by Anti-de Sitter space, where the phase structure of pure gravity was studied for the the first time by Hawking and Page [1]. With the advent of the AdS/CFT correspondence [2][3][4][5], it became clear that this is more than just a curiosity and that the physics of the black hole in the AdS box is dual to that of a (de-)confined gauge theory.
AdS/CFT correspondence triggered an avalanche of interest, and black holes in (asymptotically) AdS geometries have been studied from various angles. In particular it has been noted that adding a charged scalar to the Einstein-Maxwell system in AdS gives a way

JHEP11(2016)041
to evade the no-hair theorems of flat space: 1 in the AdS/CFT literature such black holes are called holographic superconductors [6,7] for reasons that we will not delve into. The detailed study of the phase structure and other properties of this system and its numerous generalizations have given rise to an industry in itself [8][9][10][11].
However, the original question that motivated Hawking and Page to consider AdS space in the first place, namely the black hole in a box, has not been investigated much in the context of the added luxury of a charged scalar. In particular, the phase diagram of the Einstein-Maxwell-scalar system in a box is not known, to the best of our knowledge. Our goal in this paper is to take a first step in that direction and to chart out the phase diagram of this system. We will find that apart from the known Reissner-Nordstrom black hole, the system also allows boson stars and hairy black holes as classical solutions. We will furthermore demonstrate that these solutions are more than a curiosity: they exist as thermodynamically stable phases in appropriate regions of the T − µ phase diagram (T is the temperature and µ is the chemical potential of the system). Our construction of hairy solutions is a constructive proof for yet another way to evade the no-hair theorems of asymptotically flat space.
The phase diagram that we uncover bears striking resemblance to that of the Einstein-Maxwell-scalar system in global AdS studied in [12] (see also [13][14][15][16][17]). This is re-assuring because our expectation is that AdS should really be viewed as a box. We work with the specific case of the massless scalar for concreteness, and our comparison will be with the conformally coupled scalar studied in [12].
In what follows, we first start out by considering the Einstein-Maxwell system (without a scalar) in a box. This system (as well as the pure Einstein system [18,19]) have been studied before and our results will overlap with those of Braden, Brown, Whiting and York [20]. Our approach will however be decidedly holography-inspired and somewhat more complete. We will also emphasize the definitions of the charges etc., which will have to be reconsidered when we add the charged scalar. Adding the scalar brings in a few different subtleties, related to the fact that no-hair theorems are in effect when the box size is taken to infinity. This also introduces difficulty in defining quasi-local charges directly, as we will discuss. But the free energy is well-defined and computable and gives rise to a phase diagram that matches with our qualitative expectations from global AdS [12] as well as reduces to the hairless case when the scalar is turned off. We will conclude with some comments and possible future directions for work.
Note added. After this paper was substantially completed, we became aware of some results in the literature where hairy solutions in a cavity have been constructed before, most notably [21][22][23]. Isolated special examples of hairy solutions were shown to arise even 1 Black holes are essentially uniquely determined by their global charges: this is the basic message of the no-hair theorems in classical general relativity. The spirit of these theorems is unlikely to be evaded, and forms one of the cornerstones of the modern lore on black holes: we need a quantum count of the microstates of black holes to account for the Bekenstein-Hawking entropy, classical hair simply is not numerous enough. But the letter of the no-hair theorems have been evaded in many ways, and holographic superconductors in AdS are an example. Our box black holes will serve as another.

JHEP11(2016)041
earlier as the final states of super-radiant instabilities in [24][25][26][27], see also [28]. 2 A relevant conjecture here is that of [29]. These observations indicate that these solutions can arise as the endpoints of dynamical processes, suggesting that they can be stable and physical. This is satisfying, in light of the results of our work: we deal with the stability of thermal phases, these papers deal with dynamical aspects.
The work of [21][22][23] offers a nice complementary discussion 3 of these solutions: our focus is on thermodynamic stability, they focus on perturbative stability. Taking these results together, it seems evident that these solutions are bonafide solutions of gravity in a box.

The setup
We will consider a spacetime manifold M, with a time-like boundary ∂M, which we will refer to as a box henceforth. We will first look at gravity, with no cosmological constant, coupled to Maxwell field: the intuition we get by studying this system will be useful when we add the scalar in later sections. The action is given by where g µν gives the metric in the bulk, γ is the metric in the boundary, and K is the extrinsic curvature. The boundary piece in the action is called the Gibbons-Hawking-York term, and we will briefly comment about it in the next section. We have set G = 1. Note that the normalization of our Maxwell piece follows the conventions of [30]. We would like to work with a time independent ansatz, which is also spherically symmetric. We will be looking at a space where the boundary is at r = r b . The metric is chosen to be of the form and for the Maxwell field (see similar constructions in eg. [7,8]) 2 Some of the papers in [24][25][26][27] were looking at the growth of the scalar field in the linear regime only, where it grows exponentially. So these were not true solutions to the field equations, but indicative. 3 The solutions they find seem identical to ours modulo notations and conventions, except for one caveat: we have had to be somewhat more careful with boundary issues than [21][22][23] for various reasons. To make the box boundary fully well-defined as a variational problem, one needs to add a boundary term to the action (the Gibbons-Hawking-York term, see our discussion in section 3). This means that the problem is well-defined only with a fixed boundary metric, which we take as our "box" (3.1), and we write down all our bulk solutions in the same gauge for the boundary metric, namely (3.1). Instead, [21][22][23] hold h(r) fixed to unity at the horizon, which means that they will need a further solution-dependent rescaling of the time coordinate that brings the boundary value of g(r)h(r) to some fixed value (say unity) to bring all their solutions into the same gauge. The g(r) and h(r) here are defined in eg. (2.2).

JHEP11(2016)041
With the above ansatz, we get the equations of motion The second of the above equations is solved by h(r) a constant, but we will phrase the discussion below at the level of the equations of motion without setting h(r) to constant. The reason for doing this is that when one adds the scalar, the h-equation of motion will become non-trivial (see later sections), but the discussion below will still hold. From the equations of motion, we can see the existence of the following two scaling symmetries.
• r → ar. With this rescaling, one could set r b = 1.
• h →h = a 2 h, φ →φ = aφ, and t →t = t a . This scaling symmetry can be used to set the g tt coefficient of the metric to be unity at r = r b . The boundary metric will thus be R × S 2 , which will ensure that the metric of any geometry matches with the flat space metric at the boundary. This gives For this, we choose rescaling in the following way. 4 lim r→r bh We will be interested in looking at the Schwarzschild and Reissner-Nordström solutions, inside the box.

Gravity in a box
Because gravity is that mysterious force that causes spacetime itself to be dynamical, putting gravity in a box strikes terror in the hearts of some. What if gravitational waves leak out uncontrollably beyond the box boundary? Occasionally, such worries were voiced when the authors gave talks on related topics before this paper was completed. So let us start by making a few comments to assuage such fears. First of all, a dynamical spacetime does not mean that there is any violence done to the manifold structure: it means merely that metric is the dynamical variable. Secondly, by putting gravity in a box, what one operationally does, is to set an appropriate boundary condition for the metric. And despite the fact that it affects our notions of distance and is therefore sacred to us, on a manifold the metric is just some field. This means that at least classically, the "box boundary condition"

JHEP11(2016)041
is perfectly well-defined as a boundary condition for the metric, as long as the metric equations of motion can arise from a well-posed variational problem on the manifold, with the said "box boundary condition". In particular, gravitational waves cannot do anything illegal if this is the case, because gravitational waves are solutions of the metric equations of motion that arise from such a variational problem, and therefore by construction have to respect those boundary conditions. So in order for the "box boundary condition" to be physically acceptable, what we need to make sure is that they lead to a well-defined variational formulation for the metric. Now the most natural "box boundary condition" is to hold the metric at the boundary fixed, 5 but it is known ever since the work of Gibbons-Hawking [31] and York [32] that Einstein gravity indeed allows a perfectly well-defined variational problem of this Dirichlet type, when one adds the so-called Gibbons-Hawking-York boundary term to it. So this is the reason why we work with an action of the form (2.1) in this work (and its generalization to include a charged scalar which we will consider a bit later). We also note that the standard scalar and Maxwell pieces in the Lagrangian automatically are well-defined Dirichlet problems, so we do not need to add any boundary terms for them.
In what follows, for all geometries with or without a horizon, we will take the boundary metric to be of the form This is our definition of the box. This means in particular that g black hole , so the effective temperatures defined for the two systems will be equal at r = r b . This will be relevant if/when we do background subtraction of the classical action of non-trivial geometries with that of flat space. As the manifold does not have an asymptotic region, the definitions of the energy, charge and temperature require a bit of explanation for those who are used to asymptotically flat/AdS boundary conditions. The Hawking temperature computation is unaffected because it relies only on the horizon and not the boundary. When there is a horizon at r = r h , the line element (2.2) can be expanded via r = r h + δr and after the usual [33] demand that there are no conical singularities in the Euclidean metric, one ends up with as the Hawking temperature. The entropy of the geometry is also a horizon quantity, and is just given by the a quarter of the area of the horizon as usual: In order to define the gravitational mass in an asymptotically flat spacetime, we can use the ADM construction. For defining the ADM mass, the spacelike slices (Σ t ) of the geometry are set up in such a way that they asymptotically coincide with a constant time surface of Minkowski space. The spacelike slices Σ t are bounded by closed two-surfaces S t .

JHEP11(2016)041
The mass is then defined as the value of the ADM Hamiltonian when the two-surface is a two-sphere at spatial infinity, for a specific choice of lapse and shift, 6 as where σ AB is the metric on S t , k is the extrinsic curvature of S t embedded in Σ t and k 0 is the extrinsic curvature of S t embedded in flat space. Using this definition, we find that the ADM mass of a black hole is the mass parameter M of the Schwarzschild metric, and it has the interpretation of energy in the thermodynamics of the system, i.e. E = M . In our construction, the space does not have an asymptotic region, instead, we set the spacelike slicesΣ t to be in such a way that the boundary metric coincides with a constant time slice of Minkowski metric with a boundary at r = r b . The quasilocal energy density can be defined as [35] where σ AB = r 2 b dΩ 2 2 is the metric of the boundary 2-sphere, and the unit normal is n µ = (0, g(r b ) −1/2 , 0, 0). The extrinsic curvature of the boundary 2-sphere, of the geometry embedded in the spacelike slicesΣ t is given by k, and k 0 is the extrinsic of the boundary 2-sphere embedded in flat space. Also, k = k AB σ AB , and where e µ A = ∂x µ /∂θ A denote the basis vectors of the 2-sphere. The definition of chemical potential is taken to be the value of the gauge field potential at the boundary, µ = φ(r b ). The electric charge of the system is defined as where t µ is the unit time-like normal at the boundary, and n ν is the unit outward drawn normal at the r = r b hypersurface.
To evaluate the classical action for the geometries directly, we have to know the boundary term or the Gibbons-Hawking term. For the metric ansatz we have chosen, the outward unit normal to ∂M is given by n µ = (0, g(r b ) −1/2 , 0, 0). The metric at the boundary, after appropriate rescaling, is γ IJ dy I dy J = −dt 2 + r 2 b dΩ 2 2 , where y I = (t, θ, φ). The extrinsic curvature of the boundary embedded in the full geometry is given by and e µ I = ∂x µ /∂y I are the basis vectors at ∂M. Evaluating this for our metric ansatz, we get The extrinsic curvature for the Minkowski box will be denoted as K 0 , and will be used to do a background subtraction, which sets the free energy of the Minkowski box to zero. The background subtraction is strictly not necessary if we are looking at the box, as there are no divergences. However, doing a background subtraction makes the comparison of quantities more straightforward when we want to take the limit when the boundary goes to infinity and we hope to reproduce the known results in asymptotically flat space. 7

Schwarzschild in the box
The simplest non-trivial solution for the equations of motion in (2.4) is given by, where C 1 is some constant, which we will set to be 1/g(r b ), and µ is a constant chemical potential, which is arbitrary for the Schwarzschild solution. We will set it to zero for convenience, because it does not affect the following discussion. The quasilocal energy and the temperature of the Schwarzschild solution can be computed as described above: The temperature is plotted as a function of r h , after setting r b = 1, in figure 1. It can be seen from the figure that the temp for a very small black hole and a black hole approaching the size of the box go off to infinity, and for any temperature above black hole solutions. The free energy of the system is given by The free energy can also be computed directly from the classical action. The only term that will contribute is the surface term, because the Ricci scalar R = 0 and the gauge field is not turned on.
The free energy computed using this formula yields the same result, and we also have ∂E ∂S = T . In figure 2, we have plotted the free energy of the system against r h , and against T in figure 3, with r b = 1. The free energy is positive for a small black hole, and goes negative for black hole larger than r h = 8 9 r b , which is the box analogue of the AdS Hawking-Page transition.
The plots in figure 2, 3 looks similar to the Schwarzschild black hole in global AdS, and so do the Penrose diagrams of Schwarzschild black hole in global AdS and in a box (with no cosmological constant). 8

Reissner-Nordström in the box
Now, we will look at the RN solution in the box. We solve for g(r), h(r), φ(r) for the equations of motion in (2.4) and appropriately rescale them to get  where we have parametrized the inner horizon as with 0 1. The energy and temperature of the system can again be computed: The chemical potential of the system is The thermodynamic relations T = ∂E ∂S Q and µ = ∂E ∂Q r h can be checked to hold from these. Putting all this together we get the free energy The expressions for E, T and µ that we obtain are the same as that in [20], and also of the on-shell action. In [20], the analysis is centered around finding configurations that are locally stable, although, they point out that certain configurations give a global minima for the on-shell action. We will systematically analyze the phase structure of the RN black hole in a box, using the free energy to characterize the thermodynamic stability, which is the language that is familiar from AdS-CFT. For = 0, we must get the Schwarzschild case, and the black hole will be extremal when = 1. The free energy set to zero gives the transition curve between flat space and the RN black hole. This can be computed fully analytically, and we get the solutions For the (not-so-interesting) case with = 1, the black hole is extremal and will remain so for any value of r h < r b . The chemical potential and temperature are given by µ = 1 and T = 0. (5.8) , the chemical potential and temperature are given by In the case of global AdS, as we look at larger values of µ along the Hawking-Page transition curve, the horizon continues to shrink, and intersects the T = 0 axis at µ = 1 (see eg., [12]). However, in the case of the RN black hole in the box, the black hole gets bigger and bigger as we go up in µ, and gets closer to extremality as the black hole becomes almost the size of the box itself, as can be seen from the following relation In figure 4, we have shown the the regions where the RN black hole can exist in the box, and also on where it becomes thermodynamically favorable. At r h = 8 9 r b , we will get = 0 in the second case, which corresponds to µ = 0, and T = 27 32πr b , which is the Schwarzschild case. The more interesting limit happens at r h → r b . The chemical potential becomes µ = 1 3 , and temperature T = 2 3π along with → 1. This means the phase diagram will have an abrupt ending at some finite T . The reason this happens can be understood as follows. As the outer horizon of the black hole is very near the boundary, the temperature diverges, see figure 5. However, along with that, to make the free energy zero, the inner horizon is approaching the outer horizon, making it almost extremal, and it tries to take the temperature to almost zero. The existence of a finite limit is a balancing of this competition.
In figure 6, this curve is shown in blue. This curve, as it can be seen has an abrupt ending, at T = 2 3π = 0.2122. However, the big RN black hole phase has another phase boundary, which comes from the saturation of the box itself, i.e. the black hole horizon approaching the size of the full box. At the µ = 0 axis, this will be at T → ∞, and it is a Schwarzschild black hole limit.
To understand the behaviour of a box-sized near-extremal black hole, let us look at the expressions for T and µ in this limit. First, we will parametrize = 1 − δ, where δ 1. Now, in this limit we get From here one can see that if r h not close to 1, then in the δ → 0 limit, or → 1, the temperature will go to 0, and µ = 1. However, if r h → 1 at the same time then what we will end up is a limit of the form This appears in both T and µ expansions and is what gives the finite temperature limit for the almost box-sized near-extremal black holes. The red curve in figure 6 is the plot for a almost-extremal black hole that is infinitesimally smaller than the box itself. The reason this will be a phase boundary may not be intuitive, therefore, let us look at it in more detail. We can invert the relations of T and µ in terms of r h , Q, which can be solved only numerically. Using this we can verify that for a given (T, µ) there could be upto three solutions, of which at most only one could have r h > are values of (T, µ) for which there are no solutions that correspond to large black holes (with r h > 8 9 r b ). In figure 7, we have the region in the (T, µ)-plane which has a large black hole solution marked in blue. The Hawking-Page like curve is plotted in red, which, as one can see, falls and ends within the region marked in blue. The upper boundary of the blue region is the red curve marked in figure 6.

Turning on the scalar: hairy solutions
We will now add a charged scalar to this system. The result of [36][37][38] shows that stationary charged black hole in asymptotically flat space is completely characterized by the mass, angular momentum and charges (of the Maxwell fields), this is the no-hair theorem. This

JHEP11(2016)041
means that asymptotically flat spaces will not support any non-trivial scalar profile. To be more concrete, let us add a scalar piece to the action (2.1), The metric and gauge field have the same functional forms as that without the scalar. Using the fact that the r-component of Maxwell field equation forces the phase of the scalar to be a constant, which can then be absorbed by a gauge transformation (see eg. [6,8]), we take the scalar to be real, ψ = ψ(r). The equations of motion 9 for this choice of the fields is given by If we want look at asymptotically flat space solution, we can expand the fields g, h, φ and ψ around r → ∞ in powers of 1/r. Now plugging these solutions back into the equations of motion, and solving the equations order by order, we will get that all the coefficients in the expansion for ψ will be forced to zero, and we will end up with RN-Black hole as the general solution. This is the way in which the no-hair theorem manifests itself in our set up. But if the manifold has a boundary at r = r b , we can again perform a series expansion of the four fields around r = r b and plug it back into the equations of motion, and solve the coefficients order by order. This gives the boundary functions in terms of The expansions at r = 0 or r = r h for the boson star and hairy black hole respectively, along with the boundary conditions, are discussed when we look at the specific solutions. At this point, it seems relevant to discuss the some aspects of the scalar field. For the Einstein-Maxwell system, the information contained in a box is essentially the same as that 9 During the refereeing process of our paper we have checked that these equations are equivalent to eq.

JHEP11(2016)041
in the asymptotic case. However, this is not the case for the scalar field. Taking the limit r b → ∞ is subtle, as the asymptotic space cannot support the scalar hair. In evaluating the free energy, this manifests as the Brown-York quasilocal energy definition being insufficient to capture the mass of the scalar. We will not try to propose an alternate definition for the quasilocal energy , instead we will evaluate the free energy using the on-shell action, F = −T log Z = T S cl . We will discuss these points further in the conclusions.
We will now explicitly construct hairy solutions. There are two such classes of solutions, those without horizons and those with horizons. The former will be called a boson star (in analogy with similar solutions in AdS) and the latter is the hairy black hole.

Boson star
The boson star is a a horizon-less configuration. At r = 0, the derivatives of all the functions are set to zero. At r = r b we set Dirichlet boundary condition for the scalar, ψ b 0 = 0. The expansions of the functions around r = 0, such that they solve the equations of motion, are calculated to be Here, we have ψ 0 = ψ(0), φ 0 = φ(0) and h 0 = h(0), which parametrize the solutions, and all the six boundary parameters are determined from these three. The value of h 0 can be arbitrary as we have to rescale the function h(r) at the end to have the right boundary behaviour. The solutions are found by fixing a value for ψ 0 , setting h 0 = const., say 1, and choosing φ 0 such that ψ b 0 is zero. The boson star configuration can have arbitrary temperature, and the value of chemical potential above which it can exist is controlled by q. This point of instability of the flat empty box to forming a boson star can be calculated analytically. At the point of instability, the scalar profile is not strong enough to cause any backreaction. Thus, we can take ψ(r) → αψ(r), where α 1, and look at the equations of motion upto linear order in α. With the given boundary conditions, we will get the solution g(r) = 1, h(r) = 1, φ(r) = µ, and the scalar equation of motion gives ψ (r) + 2 r ψ (r) + µ 2 q 2 ψ(r) = 0. (6.14) Imposing the scalar boundary conditions, we get the solution ψ(r) = ψ 0 sin µqr r , with µ bsi q = nπ, n = 1, 2, 3, . . . . (6.15) We will be looking at the first eigenmode, i.e. n = 1.
Of course, we can also construct fully backreacted solutions as well, numerically. In figure 8, we have shown the profiles of the functions for two fully backreacted solutions.

The phase diagram
As we discussed earlier, the free energy of the system when there is a non-trivial scalar profile present is done by evaluating the on-shell action. The full action is given by the sum of (2.1) and (6.1). Since the boundary metric of all the systems are rescaled to be of the same form as the boundary metric of empty box, the temperatures of all the systems can be consistently compared. Using the equations of motions, we can rewrite the action (for details of a similar calculation see appendix of [12]) The phase diagram is intricately dependent on q, which gives three distinct types of phase diagrams, which have two, three or four of the four possible solutions as thermodynamically acceptable solutions. We will look at each of theses cases in detail.

q 1 < q < ∞
For this case all of the four solutions appear in the phase diagram in certain regions of the T − µ plot. A representative diagram is given in figure 10. For values of µ smaller than the boson star instability, µ bsi , for the given value of q given by 6.15, the phase boundary, F -1, separates the empty flat box from the RN black hole, which is a first order phase transition, and can be computed analytically. Above the value at which the boson star instability happens, say µ bsi , the favourable phase is a boson star, which is a second order phase transition from the flat empty box, indicated by S -1, and has lower free energy than the empty box. The phase transition between boson star and RN black hole is first order in nature and th phase boundary is indicated byF -2, which is computed semi-analytically by the following method. For a given value of q, the value of µ and F can be determined  Figure 10. Schematic phase diagram for ∞ < q < q 2 .
for each value of ψ 0 , and we can do a fit to get free energy as a function of µ, and then find the value of T for the RN black hole with the same value of µ and F . The curve F -2 comes to an end at the point where it intersects the hairy black hole instability curve, S -2. The RN black hole to hairy black hole transition is also a second order phase transition. One can check that for a given value of T and µ (where the hairy black hole solution exists), the hairy black hole has a lower free energy than a RN black hole with the same (T, µ). The phase boundary between the boson star and hairy black hole is another first order transition, which is given by the curve F -3. This curve is slightly more difficult as the values of (T, µ, F ) for both the competing phases are found by numerically solving the fully backreacted equations of motion of the respective systems. For the boson star case, we have the free energy as a function of µ. In the case of the box, for a hairy black hole of a larger value of r h than the one of the black hole residing at the intersection of F -2 and S -2, say r c h will go to a boson star phase as we increase µ past some critical point (as opposed to the case in global AdS, see [12]). We start with a value of r h > r c h , and keep increasing the value of ψ r h till the free energy of the hairy black hole becomes equal to the free energy of the boson star with the same µ. In principle the curve F -3 should be computable for all the values of r h till it becomes very close to r b . However, the shooting procedure that we use to find the solutions becomes increasingly difficult as we take r h closer to r b , depending on the value of q, For example, for q = 100, we are able to obtain the curve upto around r h = 0.962, and for q = 20, we can go to about r h = 0.99 (all with r b = 1). In other words, the exact structure of the red-dotted line in our schematic diagram figure 10 cannot be precisely obtained with our current numerics. That the hairy black hole region has to be bounded is based on the fact that the black hole size is limited by the  box. The precise form of the way the region closes as r h → r b does not alter the punchline that the hairy black hole is a thermodynamically favourable phase in some regions of the (T, µ)-plane. So we will relegate that to future work. The exact phase diagrams for q = 40, 100 are shown in figure 11. As we can see that region in which the hairy black hole can exist shrinks as we go to smaller values of q. Eventually, we end up with the case where r c h → r b , which happens at q = q 1 . It is difficult to find the exact value of q 1 as the numerical value will have to be found by a tedious trial and error method. However, we have found that it happens for q slightly greater than 36.
7.2 q 2 < q < q 1 As we can see from the discussion in the previous case, this range of q will give a phase diagram where only three of the four solutions can exist as thermodynamically favourable phases, namely flat empty box, RN black hole and boson star, see figure 12. The curves F -1, S -1 and F -2 are computed using the same procedure as mentioned for the large q case. The RN black hole instability happens for values of (T, µ) where the RN black hole itself is not the favourable phase, whereby the second order transition does not happen, and the hairy black hole does not appear as a thermodynamically favourable phase. As a result, the curve F -2 ends when it intersects with the saturation curve.
We have plotted the exact phase diagram for q = 36, 30 in figure 13. This type of phase diagram can exist only until the values of q, such that the value of µ bsi < 1 3 , or in other words q < q 2 = 3π, below which there will be no phase boundary between RN black hole and boson star.

q < q 2
For values of q < q 2 = 3π, the boson star instability happens at µ bsi > 1 3 , which in some sense leads to a trivial extention of the phase diagram of scalar-less case, see figure 14. The boson star becomes the dominant phase above µ = π q .  Figure 12. Schematic phase diagram for q 2 < q < q 1 .

Conclusions, discussion and future directions
We have charted out the phase diagram of the Einstein-Maxwell-scalar system in a box and demonstrated the existence of thermodynamically stable hairy solutions with and without horizons. The results that we find have close analogues in global AdS, but also some differences. These differences are closely tied to the fact that the box is a hard cut-off on the size of the black hole: extremal limit of thermodynamically stable black holes in AdS correspond to zero size black holes (both inner and outer horizon shrink to zero size), whereas in the box they correspond to the outer and inner horizon reaching the box size simultaneously. Our phase diagram is nearly complete, but it will be nice to precisely chart the upper boundary of the hairy black hole solutions where the black hole size reaches that of the box.
One interesting observation is that having a non-trivial scalar in the box means that in the limit where the box size goes to infinity, these solutions are not the within-box truncation of the asymptotically flat (and therefore hairless) solutions. One might wonder what makes the scalar case and the gauge field so different when they are considered in a box. The point is that holding the gauge field fixed at a finite radius contains essentially the same information as fixing it at infinity (once the r h and r b are given). There exists a simple limit for gauge field when the r b → ∞, where the gauge field remains non-vanishing. But this is not the case for scalar. The r b → ∞ limit is non-trivial for the scalar, because no hair theorems force the scalar to be zero at all orders in 1/r in that limit. This has consequences for defining the quasi-local mass in a box in the sense of [35]. Typically, the quasi-local mass just puts a box around some region to define the mass/charges in that regions while allowing the field itself to decay to its asymptotically flat values outside the box. But when we have a non-trivial scalar profile in the box the quasi-local definition of mass will not work because it is not just about putting a box around the region of interest, but also about changing the boundary conditions of the scalar at the box. (This is not the case for the gauge field, where non-trivial boundary conditions at the box are automatically obtained by fixing them at infinity.) That the JHEP11(2016)041 quasi-local mass cannot work is straightforward to check, because thermodynamic relations of the form F ∼ E − T S − µQ etc do not work in the box, if we use the quasi-local definitions. Fortunately, we do not need explicit forms of these quantities to chart out the phase diagram, we just need the ability to compute the action aka free energy directly. That, together with the fact that the phase diagram has internal consistency (the various independent curves in it intersect consistently and the overall structure matches very closely with that of AdS [12]) give us confidence that the results are correct.
It should be possible to generalize the definitions of quasi-local quantities so that one can define a thermodynamically useful notion of the mass of a scalar with a non-trivial profile in a finite region. We hope to come back to this interesting problem in the future. It seems evident that the box boundary acts a compression cavity to hold the scalar in, and therefore a pressure-like term will have to be added to the total mass of the spacetime.
It will also be interesting to consider extremal solutions (not necessarily thermodynamically stable) and perhaps see the possibility of attractor behavior. Note however that attractor behavior is typically associated to uncharged scalars, so the flavor here is slightly different. One can also try to construct hairy solutions with other boundary conditions (see eg., [39][40][41]).