On O(1) contributions to the free energy in Bethe Ansatz systems: the exact g-function

We investigate the sub-leading contributions to the free energy of Bethe Ansatz solvable (continuum) models with different boundary conditions. We show that the Thermodynamic Bethe Ansatz approach is capable of providing the O(1) pieces if both the density of states in rapidity space and the quadratic fluctuations around the saddle point solution to the TBA are properly taken into account. In relativistic boundary QFT the O(1) contributions are directly related to the exact g-function. In this paper we provide an all-orders proof of the previous results of P. Dorey et al. on the g-function in both massive and massless models. In addition, we derive a new result for the g-function which applies to massless theories with arbitrary diagonal scattering in the bulk.


Introduction
The study of the thermodynamics of one dimensional integrable models with factorized scattering dates back to the seminal work of Yang and Yang [1,2]. Their method, known today as the Thermodynamic Bethe Ansatz (TBA) is quite general and it was worked out for a large number of models relevant to condensed matter physics [3]. In its simplest formulation the TBA is written down for periodic boundary conditions and it provides the free energy density, ie. the O(L) part of the free energy.
In this paper we study the sub-leading pieces of the free energy for different boundary conditions in continuum models. We restrict ourselves to theories with diagonal scattering; however it is expected, that the proposed methods will work even in the non-diagonal case 2 . In this paper we focus mainly on relativistic theories.
In integrable relativistic field theory the TBA was introduced by Al. Zamolodchikov in [4]; soon thereafter it became one of the central tools to study finite size effects. In relativistic models Euclidean invariance implies that the free energy density at finite temperature is directly related to the exact ground state energy in finite volume. Studying this quantity it is possible to recover the behaviour around the fixed points of the renormalization group flow, which are usually given by a conformal field theory. Thus the TBA provides a link between the scattering theory (IR) and perturbed CFT (UV) description of the same model: it predicts the central charge, the scaling dimensions of the perturbing operator, and various other quantities [4,5,6].
The techniques of integrability can be applied to problems with non-trivial integrable boundary conditions; in relativistic scattering theory the foundations were laid down in [7]. One object of particular interest is the exact g-function, which is the off-critical generalization of the noninteger ground state degeneracy of critical boundary conditions introduced by Affleck and Ludwig in the context of the Kondo model [8]. The g-function describes the O(1) contribution of a single boundary to the free energy and it can be used to study renormalization group flows in the space of boundary field theories [9,10]. In [11] it was shown that the g-function satisfies a gradient formula, from which it follows that in unitary theories the boundary entropy monotonically decreases under the RG flow. This is the g-theorem, which can be regarded as the boundary-counterpart of the celebrated c-theorem by A. B. Zamolodchikov [12].
It is an old and very natural idea to determine the g-function in the framework of the Thermodynamic Bethe Ansatz. The first result appeared in [13], where the authors proposed a simple formula based on the boundary-dependence of the Bethe equations. Later it was found in [10] that although the results of [13] correctly describe the boundary-dependence of the gfunction, a boundary-independent term has to be added in order to match the predictions of CFT. The missing piece was derived in [14] using a cluster expansion for the free energy; the exact result was expressed in terms of the solution of the TBA with periodic boundary conditions. While this exact g-function successfully passed a number of non-trivial tests [14,15] and recently it was generalized to describe a massless flow in [16], the interpretation of the boundary-independent terms remained unclear.
A remarkable attempt to obtain the non-extensive pieces to the free energy of Bethe Ansatz systems was performed in [17], where it was shown that the quadratic fluctuations around the saddle point solution yield a well-defined O(1) piece. However, the calculation of [17] seemed to contradict all previous results: it did not reproduce the boundary-independent term of [14], moreover it predicted an O(1) piece even in the periodic case where no such term is expected.
In this paper we revisit the calculations of [17] and argue that the only flaw of [17] is that it did not take into account the non-trivial density of states in the configuration space of Bethe Ansatz systems. In other words, the functional integral for the partition function was built on an incorrect integration measure. We propose a new normalization based on the thermodynamic behaviour of the density of states and we obtain the correct results in all previously considered cases.
The paper is organized as follows. In the next subsection we provide the necessary definitions for the g-function of relativistic boundary field theory. Sec. 2 serves as a warm-up: we consider general Bethe Ansatz systems and the behaviour of the density of states in the thermodynamic limit. In. 2.2 we revisit the calculations of [13] and show that it is possible to obtain the boundaryindependent part of the g-function by a simple heuristic argument. Motivated by these findings in Sec. 3 we present a general framework to evaluate all O(1) pieces to the free energy. These formal results are then evaluated explicitly in massive and massless relativistic models in Sections 4 and 5, respectively. Finally Sec. 6 includes our conclusions.

The exact g-function -definitions
The exact g-function can be defined as follows [13,14]. We restrict ourselves to the simplest case with only one massive particle in the spectrum; the generalization to other models is straightforward.
Let us consider a finite cylinder with height L and circumference R ( fig. 1). The integrable boundaries a and b are placed on the two ends of the cylinder. The partition function can be Figure 1: Pictorial representation of the two channels for the evaluation of the cylinder partition function. The (imaginary) time evolution is generated in the vertical direction by the corresponding Hamiltonians. evaluated in two different channels. Viewing R as the direction of time ( fig. 1(a)) one obtains where H ab (L) is the Hamiltonian of the open system of size L with integrable boundary conditions described by the reflection factors R a (θ) and R b (θ). The summation runs over a complete set of states and E ab ψ (L) are the eigenvalues of the Hamiltonian H ab (L). On the other hand, one can use L as the time variable ( fig. 1(b)). In this picture the boundaries play the role of initial and final states of the time-evolution operator H(R), which is the Hamiltonian of the system of size R with periodic boundary conditions. In this channel the partition function is evaluated as Here |B a and |B b are the boundary states corresponding to the boundary conditions [7] and the summation runs over a complete set of states of the periodic bc. system. The amplitudes G Ψ a,b (R) are defined as the normalized overlaps Equations (1.1) and (1.2) have to be contrasted with the definition of the partition function with periodic boundary conditions in both direction: If mL ≫ 1 then (1.2) and (1.4) are dominated by the ground state with energy where ǫ is the bulk energy density, which can be determined by comparing the TBA results to conformal perturbation theory [4,5,6]. Similarly, if mR ≫ 1 then (1.1) is dominated by the ground state of the boundary system with energy where f a and f b are non-extensive boundary-contributions which can be obtained from the boundary TBA [13,9].
Comparing (1.1) and (1.2) in the regime mL, mR ≫ 1 one finds The g-function is then traditionally defined as It follows from dimensional arguments that the g-function depends on r = mR only. It is useful to re-define the partition functions as With this prescription the vacuum energies have the asymptotics Our goal is the evaluation of the partition functions (1.5) and (1.6) in the framework of the Thermodynamic Bethe Ansatz, with a special emphasize on the overall normalization. The exact g-function will be determined by the relation above. We would like to remind the reader that in relativistic scattering theories the Bethe Ansatz does not provide an exact description of the spectrum. In fact there are exponentially decaying residual finite size effects, which modify the multi-particle energies obtained from the Bethe Ansatz [18,19]. In the conventional derivation of the TBA these contributions are neglected; this is certainly a good approximation in the dilute regime, where the average distance between the particles is much larger than their Compton-wavelengths. However, it can be argued that the TBA yields the correct results at any temperatures and any densities [20]. In this paper we develop arguments about the thermodynamic behaviour of certain Bethe Ansatz quantities. We do not use any special assumptions other than those already used in the derivation of the TBA. Therefore we may neglect exponential corrections; this assumption will be justified by the results, which are in agreement with the CFT results in the UV (high temperature) limit.

Thermodynamic Bethe Ansatz and density of states
Let us consider Bethe Ansatz systems with one particle type and no internal degrees of freedom. We use the rapidity variable θ to parametrize the states. The scattering is assumed to be elastic and factorizing; the two-particle scattering is described by the pure phase Energy and momentum are given by the functions e(θ) and p(θ). In relativistic field theories e(θ) = m cosh θ p(θ) = m sinh θ whereas in the non-relativistic case we have Alternatively, one can introduce a chemical potential according to In the relativistic case we always set µ = 0.
Consider the Bethe-Yang quantization of an N -particle state in finite volume L with periodic boundary conditions: where p j = p(θ j ). In the logarithmic form: We assume that the quantum numbers {I 1 , . . . , I N } completely characterise the state and that the solutions consist of purely real rapidities, ie. we do not consider theories with string-like solutions. Moreover, we assume that the solutions of (2.1) span the whole Hilbert-space. The multi-particle energies can be calculated additively: The solutions of (2.1) are placed evenly in the space of the quantum numbers. In rapidity space one can define the density of states as Alternatively, this can be interpreted as the norm of the Bethe Ansatz state [21].
In the presence of integrable boundaries the quantization conditions can be written as where R a,b (θ) = e iϑ a,b (θ) are the elastic reflection factors of the boundaries. The density of states is defined asρ We will be interested in the thermodynamic behaviour of ρ N andρ N . These quantities will play an important role in the normalization of the partition function in 2.2 and in the general treatment of section 3. If the particle number is kept fixed and the volume is sent to infinity, then the densities behave as L N . In particular where σ(θ) = p ′ (θ)/2π. Note that although the leading piece is the same for ρ N andρ N , the sub-leading terms are in general different. An important property is that the coefficient of these O(L −1 ) term grows linearly with N . Therefore it is expected that if both L and N go to infinity with their ratios fixed, then the densities will have a non-trivial thermodynamic limit, which is expected to be different for ρ N andρ N . In this limit all higher order terms of O(L −n ) contribute.
In the following we consider the particular case when the state in question is a finite-volume micro-canonical realization of an infinite volume thermal state. In other words, we send N and L to infinity with their ratios fixed, and we choose the distribution of Bethe-Ansatz roots according to some Thermodynamic Bethe Ansatz equation.
As a starting point we briefly review the basic notions of the TBA. In the thermodynamic limit we introduce the total density of states 3 ρ(θ) and also the density of occupied states ρ (o) (θ). The particle density is given by the integral In the periodic case the densities satisfy the constraint where ϕ = −i d dθ log S(θ) and σ P (θ) = dp/dθ. On the other hand, in the boundary case we have θ > 0 and the densities satisfy the constraint ) and the extra term containing δ(θ) was introduced to cancel the unphysical solutions corresponding to θ = 0.
It is known, that the the distribution of roots is given in both cases by the thermodynamic Bethe Ansatz equations where we introduced the pseudo-energy as The thermodynamic limit of the densities ρ N andρ N The calculations will be based on the techniques developed in the Algebraic Bethe Ansatz literature, see for example Appendix A in [22].
In the periodic case the matrix elements of J read The matrix J can be written as the product The elements of G N can be written asymptotically as Using (2.7) we conclude that the limit of det G ij is given by the Fredholm determinant whereP − is an integral operator acting as The Fredholm determinant (2.9) is well-defined if the operatorP − is trace class. This can be checked explicitly in non-relativistic situations [21], or in massive relativistic models at low temperatures, where Here and in the rest of the paper we will assume that the Fredholm determinants we encounter are always well-defined. Even if this is not the case, they could be made regular by introducing a rapidity cut-off. This cut-off would not affect the final results, because the O(1) pieces of the free energy will be expressed as integral series which are well-defined for arbitrary temperatures.
Now we turn to the calculation ofρ N . In this case the matrix elements of the Jacobian read The matrix can be written asJ =ḠΘ, with where now The quantities γ j have the same thermodynamic limit as in the periodic case: In the thermodynamic limit one finds whereQ − acts on functions defined on R + as Notice that the leading parts of (2.11) and (2.13) have the same form, however the pre-factors are different. This will play an important role in the next subsection.

A heuristic derivation of the g-function (massive case)
Here we revisit the calculation of [13] to determine the exact g-function in massive relativistic boundary QFT. We obtain obtain the correct boundary independent part of the g-function using a simple heuristic argument.
In section 4 of [13] the authors start with the quantization conditions for N particles 4 This can be written alternatively as a quantization condition for 2n particles: The function R(θ) in (2.16) is defined as In [13] the authors use (2.16) as a starting point to derive the thermodynamics. They show that (2.16) yields the usual periodic-boundary-conditions TBA and derive a single O(1) correction to the free energy: where the term δ(θ) is introduced to cancel the unphysical states which do not respect the Pauli-principle. This result was shown to be incomplete in [10,14]. We believe that the derivation in [13] is correct in every respect but one. There it was assumed that the change from system (2.15) to (2.16)-(2.17) is trivial. However, the previous subsection shows that the density of states of the two BA systems behaves differently in the thermodynamic limit. In fact, the periodic system with 2N particles has a density whereas the two copies of the boundary systems with N particles have a density In other words, there is a finite ratio between the (thermodynamic dimensional) densities: This factor does not grow with the volume L, therefore it does not affect the thermodynamic limit of the distribution of roots. This means that passing from the system (2.15) to (2.16)-(2.17) the saddle point will not be changed and the distribution of roots will be described indeed by the periodic-boundary-conditions TBA. However, a finite factor for the density of states has to be kept in order to have a direct comparison between the partition functions. In other words, the ratio (2.19) has to be included in the overall normalization of the partition function of the boundary system.
It is useful to explicitly evaluate this finite factor. We start by employing the identity which is valid for any Fredholm-determinant. In the present case we have Notice that the kernels P − and Q − have different support. In can be checked order by order, that the above formula results in Adding this constant to (2.18) one finds This is the exact non-perturbative g-function as obtained in [14]. We wish to note that the equivalence of (2.21) and (2.22) was already observed in [15]. This derivation does not take into account the fluctuations around the saddle point, which are expected to give a non-extensive contribution [17]. However, equation (2.16) already looks like a periodic bc. quantization (with an additional factor) and it is generally accepted, that there is no O(1) piece in the periodic case. This implies that eq. (2.23) already takes into account all O(1) contributions, ie. there are no additional terms due to the fluctuations.
The reader may be concerned that our arguments are not convincing and that the proposed re-normalization might be dictated by the result itself. We agree that our derivation of (2.23) is certainly not rigorous, however, it already shows that the density of states play an important role in the definition of the partition function. In the next section we present a general calculation built on first principles, which properly takes into account both the density of states and the fluctuations around the saddle point. In the massive case we obtain the same result (2.23).

O(1) pieces to the free energy -formal derivation
In this section we present a general framework to determine the O(1) pieces to the free energy. We consider Bethe-Ansatz systems with one particle type and one rapidity variable θ which takes its values from a domain B. The Bethe-Yang equations are assumed to take the form where p j = p(θ j ). The pure number α and the phases R BY (θ j ) and S BY (θ j , θ k ) depend on the problem at hand. In massive relativistic models (or arbitrary non-relativistic models) with periodic boundary conditions we have In the case of integrable integrable boundaries For the treatment of massless relativistic models see section 5. It is assumed that the unitarity condition is satisfied in the form To investigate the thermodynamic limit, we split up the θ axis into intervals ∆θ and we use the densities ρ o (θ) and ρ h (θ) for the occupied states and the holes. The total density of states is ρ(θ) = ρ o (θ) + ρ h (θ). It follows from (3.1) that the densities satisfy the constraint where and Depending on the problem at hand there can be an extra −2πδ(θ) term to (3.4) to take into account the Pauli-principle. Based on the calculations of the previous section we assume that the density of states for an N -particle state can be written as where N is a bounded finite number for a smooth distribution of roots. In the thermodynamic limit it is given typically by a Fredholm-determinant; the explicit calculation for a generic case will be presented later in this section. The partition function Z is obtained as a summation over all possible momentum quantum numbers in a finite volume L. In the thermodynamic limit it is evaluated by a functional integral over all possible density functions. The usual prescription to define a regularized functional integral for Z is Here the product is over the discretization points and there is one integral for the density at that point.
We believe that this prescription is not correct for Bethe Ansatz systems. The partition function depends on the configuration which minimizes the free energy and also on the number of available states for that particular configuration. The calculations which result in formulas like (3.5) show that the number of available states for a Bethe Ansatz system does not behave like the density in a free theory. Instead, there is the non-trivial finite factor N which has to be taken into account. In other words, the constraints for the configuration space of the theory have to be incorporated in the definition of the functional integral.
In the usual evaluation schemes the entropy considerations are worked out in rapidity space, and the functional integral is performed using (3.6). In this procedure one is free to choose the discretization mesh ∆θ in a fairly wide range (for a discussion on this point see [4,17]). The calculations are safe in the sense that the end result does not depend on the actual value of ∆θ. However, ∆θ should be chosen large enough so that there are enough particles in the interval (θ, θ + ∆θ) to make the entropy considerations meaningful. On the other hand, the "ultimate discretization" would be to have one discretization point for each particle in the system; in this case the variation of the free energy would be performed on the level of the momentum quantum numbers. Such a scheme is obviously not amenable for practical purposes. The solution is to perform a transformation from the space of momentum quantum numbers to the space of rapidities; the important point is to keep the Jacobian associated to this mapping. In the thermodynamic limit the Jacobian behaves as given by (3.5), where the product over j = 1 . . . N can be interpreted as the "ultimate discretization" of the functional integral (3.6). A very important observation is that in the thermodynamic limit the pre-factor N does not depend on the number of particles involved, therefore we conclude that it must be present in any discretization scheme.
Based on the above considerations we propose the following definition of the functional integral: The factor N depends on the particular thermodynamic configuration which minimizes the free energy functional. However, experience shows that N is a finite number which does not grow with the volume. Therefore it is expected that it will not shift the position of the saddle point and its only effect is to correctly normalize the partition function. It follows that the prescription (3.7) is equivalent to L∆θdρ o (θ) (3.8) and the difference between (3.7) and (3.8) vanishes in the thermodynamic limit.
In the following we evaluate the partition function using the prescription (3.8). The calculation proceeds in four steps: The treatment of the quadratic fluctuations follows exactly the same way as in [17]; we simply restate the results of [17] in our general framework. In order the keep the exposition simple we omit some of the technical details and the checks of the various approximations we make. For a careful treatment the reader is referred to the original work [17].
Step 1 We evaluate the partition function using the functional integral (3.6); the entropy considerations are worked out in rapidity space. The number of micro-canonical configurations is given by We approximate it using Stirling-formula as log ω = L∆θs(ρ(θ)) + ς(ρ(θ)) + . . . , The free energy functional can be written as The usual minimalization procedure yields the integral equation where we introduced the pseudo-energy function as The "minimal part" of the free energy can be expressed simply as where σ(θ) is given by (3.3).
Step 2 We consider the fluctuations around the saddle point solution. As a first step we expand the free energy functional (3.9) around ρ o (k) and ρ h (k): Here the quantities r o (θ) = δρ o (θ) and r h (θ) = δρ h (θ) (3.14) are constrained by The absolute magnitude of the partition function is then evaluated as We introduce new integration variables ξ(θ) according to where δ θ,θ ′ is the Kronecker symbol, and Finally, changing the integration variable to ξ in (3.16) we have . (3.21) Taking the limit θ ∆θ → B dθ yields Step 3 The density of states is given by the determinant A straightforward calculation shows that the matrix elements are given by The matrix can be written as It follows from (3.2) that in the thermodynamic limit The elements ofḠ N can be written asymptotically as Using (3.11) we conclude that the limit of det G ij is given by the Fredholm determinant with kernel K 2 (θ, θ ′ ). Therefore the normalization constant of the free energy functional (3.8) is given by Step 4 -Our main result

Substituting (3.24) into (3.22) yields
HereK 1 andK 2 are integral operators which act on functions defined on B as and the kernels are given by The phase shift S BY (θ, θ ′ ) is defined implicitly by the Bethe-Yang equations (3.1) and F min is given by formula (3.12).

Explicit examples -massive relativistic models
In this section we evaluate (3.25) explicitly in four different cases; we restrict ourselves to relativistic models. Non-relativistic ones can be treated in the same manner.

Free fermionic gas
In this case B = R and σ(θ) = m cosh θ.
There is no interaction between the particles, therefore The thermodynamics is trivial:

Interacting particles with periodic boundary conditions
In this case B = R and σ(θ) = m cosh θ.
The scattering phase shift is Therefore the two integral kernels are given by The free energy reads The two Fredholm-determinants coincide and there is no O(1) piece.

Periodic bc. with a purely transmitting defect
One can consider the Bethe Ansatz equations in the presence of a purely transmitting defect: where T (θ) describes the scattering between the particles and the defect. Similar to the previous case one has However, the function σ(θ) is now given by The partition function is expressed as where F T is an O(1) piece given by This is in agreement with the previous results in the literature (see for example [23]).

Integrable boundaries
Here the domain of integrations is B = R + and the scattering phase shift is given by The integral kernels are given by The associated Fredholm-determinants are det 1 −Q ± where the operatorsQ ± are defined as The function σ(θ) is given by The TBA equation (3.10) takes the form One can define the pseudo-energy also for negative values of rapidities as ε(θ) = ε(−θ), then the above equation above is equivalent to which is the usual periodic boundary conditions TBA. The minimal part of the free energy is expressed as where F p min is the free energy of the periodic bc system (4.1) and F ab is an O(1) piece given by The partition function reads Therefore the O(1) piece to the free energy is given by In Appendix A we show that the above ratio of Fredholm-determinants reproduces the constant log A defined in (2.22). Choosing the boundary conditions a = b the final result can be written as Θ aa (θ) log 1 + e −ε(θ) + (4.5) This is the exact non-perturbative g-function as obtained in [14].

Explicit examples -massless relativistic models
In this section we consider massless relativistic theories with diagonal scattering [24,25]; for an introduction to massless scattering the reader is referred to [26]. We assume that there is only one particle type in the spectrum. There is an effective doubling because one has to treat left-moving and right-moving particles separately. We consider parity-invariant theories; the S-matrices are given by The TBA equations are usually written down for periodic boundary conditions, in which case the TBA is a two-component system: The kernels are defined as One can then use the symmetry ε 1 (θ) = ε 2 (−θ) to transform the above system into a single equation: The free energy is expressed as It is generally expected that for periodic boundary conditions there is no O(1) piece.
In the following we apply the formalism of section 3 to determine the g-function in the presence of two integrable boundaries with reflection factors R a (θ) and R b (θ). Contrary to the periodic case, in the open system there is no distinction between the left-movers and the rightmovers. When a left-mover scatters off the left-boundary, it becomes a right-mover with the same energy and reversed momentum. Therefore both the Bethe Ansatz and also the thermodynamics can be written down in terms of only one particle species and one pseudo-energy function.
We use simple heuristic arguments to write down the Bethe-Yang equations. The particles will be parametrized with the rapidity variable θ ∈ R which refers to the situation when the particle is moving to the right, ie. e(θ) = 1 2 me θ p(θ) = 1 2 me θ When a particle with rapidity θ is taken back and forth in the open system it meets every other particle twice. The two scattering processes are described by S RR (θ − θ ′ ) and S LR (θ + θ ′ ). The Bethe-Yang equations read To establish the connection with our general formalism we extract the quantities and for the scattering phase shift we find which yields the integration kernels The function σ(θ) is given by Note that contrary to (2.5) the δ(θ) term is missing from σ(θ) because there are no formal solutions with θ = 0 which should be canceled. Formula (3.10) yields the TBA equation This equation coincides with (5.2), although it was derived from a conceptually different Bethe Ansatz. The interpretation is straightforward: the distribution of roots (and therefore the O(L) pieces of the free energy) do not depend on the boundary conditions, as it is expected on general grounds. Formula (3.12) yields F min = F p min + F ab Here F p min is given by (5.3) and F ab is an O(1) piece given by Notice the factor of 2 as compared to (4.3).
Putting everything together, equation (3.25) yields In the next two subsections we explicitly work out the details for simple scattering theories with one particle species. The generalization to other models with more than one particles (for example the scattering theory in [27]) can be treated with the straightforward extension of (5.7). Finally we mention that the boundary independent part of (5.7) can be written in the form The second summation runs over a i = 1, 2, the pseudo-energies are given by with ε(θ) being the solution of (5.5) and the kernels are defined as ϕ + jk (θ) = ϕ 12 (θ) for j = k ϕ 11 (θ) for j = k and ϕ − jk (θ) = ϕ 11 (θ) for j = k ϕ 12 (θ) for j = k Equation (5.8) can be proven term by term using the symmetry ϕ ± jk (θ) = ϕ ± jk (−θ).

The massless flow from tri-critical Ising to critical Ising
The simplest non-trivial massless model is probably the scattering theory describing the flow from the tri-critical Ising to the critical Ising model [24]. In this theory there is only one particle species and the scattering is described by In [16] g-function flows were studied between different conformal boundary conditions of the UV and IR theories in those cases where both the bulk and the boundary perturbations are integrable and compatible with each other. There are two such possibilities: 1. The flow from the boundary condition (0+) of tri-critical Ising to (+) in Ising 2. The flow from the boundary condition (d) of tri-critical Ising to (f ) (free) in Ising Both flows are induced by the Φ 13 perturbation on the boundary. For the precise definition of the boundary conditions we refer to [16] and references therein. Here we show that the results of [16] can be derived from our general formalism. Most importantly, we present an all-orders proof of the boundary-independent part of the g-function, which differs from the massive version.
In the present case the integration kernels are given by The possible reflection factors R a (θ) and R b (θ) were specified in [16]. The TBA equation is given by Formula (3.12) yields F min = F p min + F ab Here F p min is given by (5.3) and F ab is an O(1) piece given by Putting everything together, equation ( where the operatorP + acts on functions defined on R as The ratio of Fredholm-determinants can be evaluated using (2.20): We find the exact g-function log g = log g a + log g 0 where the boundary dependent part is and the boundary independent part is Equation (5.14) is in agreement with the corresponding formula of [16]. However, (5.13) coincides with the result of [16] only in the case of the flow to the (f ) boundary condition in the Ising model. In the other case, namely the flow from (0+) in tri-critical Ising to (+) in Ising there is a missing term − 1 2 log 2. This discrepancy can be explained by the fact, that in the IR limit the boundary condition corresponds to a microscopic theory where the ground state degeneracy of 2 is removed. The scattering theory describes the variation of the g-function with respect to the temperature, therefore it is natural to assume that the extra term has to be added not just in the IR limit (which corresponds to zero temperature), but also for the whole RG flow. Therefore we write log g a = − which is in agreement with [16]. Finally we mention that (5.14) follows from the general formula (5.8) after substituting and making the appropriate change of variables.

The massless flow
In [28] a simple massless scattering theory with one particle species was proposed to describe the flow from the minimal model M 3,5 to M 2,5 induced by the perturbing field Φ 2,1 [29]. In this model the scattering is described by where S LY (θ) is the S-matrix of the massive Lee-Yang model [30,31] S LY (θ) = sinh θ + i sin(π/3) sinh θ − i sin(π/3) The massive Lee-Yang model is the Φ 1,3 perturbation of the minimal model M 2,5 . In massless theories the LL and RR scattering matrices are scale-invariant and they describe the IR limiting CFT; this was the motivation for the choice of S LL and S RR in (5.15). The possible reflection factors of this model have not yet been written down. Nevertheless it is useful to derive the g-function, leaving the factors R a (θ) and R b (θ) unspecified. The boundary dependent part will be given by (5.6); in the following we concentrate on the boundary independent part.
Given the scattering matrices (5.15) the integral kernels are given by The TBA equation reads One can use the general formula (5.8) to express the boundary independent part of the g-function as The summations run over a i = 1, 2 and the pseudo-energies are given by ε 1 (θ) = ε(θ) ε 2 (θ) = ε(−θ) where ε(θ) is the solution of (5.16). Notice that due to the specific form of the S-matrix (5.15) there is an overall factor of (−1) as compared to the massive case (2.22).

Conclusions
We have studied the partition function of Bethe Ansatz solvable models as a function of the volume and the temperature. We have shown how to obtain O(L 0 ) pieces to the free energy in the framework of the Thermodynamic Bethe Ansatz: our main result is equation (3.25). In addition to possible boundary dependent parts incorporated in the "minimal part" of the free energy F min the formula (3.25) involves two Fredholm-determinants which depend only on the scattering in the bulk. In relativistic boundary field theory these two pieces are responsible for the boundary-independent part of the g-function. We have presented a new result (5.7) which applies to massless relativistic theories with arbitrary diagonal scattering in the bulk. This formula could be used to study massless bulk-boundary flows along the lines of [16].
Formula (3.25) can be applied in a very straightforward way once the Bethe-Yang equations have been established. Therefore it is very natural to conjecture that a similar result will hold in theories with non-diagonal scattering. In these models the finite volume quantization proceeds through the diagonalisation of the transfer matrix, which can be achieved by the introduction of the so-called magnonic (or spin) particles [2,32,33,34]. Once this algebraic problem is solved, the derivation of the TBA follows straightforwardly; a common property is that there are no energy-terms e(θ) associated to the magnonic modes. We believe that our arguments can be applied to these Bethe Ansatz systems, particularly in those cases when the TBA results in a finite set of equations. The study of these g-functions with magnonic modes is left for future work.
Also, it would be interesting to study the flow of the excited states quantities G Ψ (R) defined in (1.3). In models with discrete symmetries some of the excited states can be treated simply by introducing real or complex fugacities λ a = e −µa/T for the different particle types [35,36]. We expect that our present results will hold in these modified TBA systems. However, the problem of particle-like excited states will probably require new ideas. In [37] it was shown that generally the amplitudes G Ψ (R) include normalization factors which are analytic in 1/R; it is not yet clear whether these factors can be interpreted in the framework of Thermodynamic Bethe Ansatz. whereÂ andB are integral operators on R + with kernels ϕ(x − y) and ϕ(x + y), respectively. The determinant of the operators1 −P ± can be evaluated as