Modular anomaly equation, heat kernel and S-duality in N=2 theories

We investigate epsilon-deformed N=2 superconformal gauge theories in four dimensions, focusing on the N=2* and Nf=4 SU(2) cases. We show how the modular anomaly equation obeyed by the deformed prepotential can be efficiently used to derive its non-perturbative expression starting from the perturbative one. We also show that the modular anomaly equation implies that S-duality is implemented by means of an exact Fourier transform even for arbitrary values of the deformation parameters, and then we argue that it is possible, perturbatively in the deformation, to choose appropriate variables such that it reduces to a Legendre transform.


Introduction
Gauge theories with rigid N = 2 supersymmetry in four dimensions represent one of the main areas where substantial progress toward a non-perturbative description has been made, starting with the seminal papers of Seiberg and Witten (SW) [1,2]. In recent years much attention has been devoted to the deformation of these theories by means of the so-called ǫ (or Ω) background. This anti-symmetric tensor background breaks Lorentz invariance and can be generically characterized by two parameters ǫ 1 and ǫ 2 . Originally, it was used by Nekrasov [3] - [6] as a regulator in the explicit computations, by means of localization techniques, of the multi-instanton contributions to the partition function 1 Z(a; ǫ) and to the prepotential of the low-energy effective theory F (a; ǫ) = F cl (a) − ǫ 1 ǫ 2 log Z(a; ǫ) (1.1) where F cl is the classical term. The prepotential can be expanded in powers of ǫ, and it is convenient to organize such an expansion as follows: F (a; ǫ) = F cl (a) + ∞ n,g=0 (ǫ 1 + ǫ 2 ) 2n (ǫ 1 ǫ 2 ) g F (n,g) (a) , (1.2) where the coefficients F (n,g) account for the perturbative and non-perturbative contributions. The usual prepotential F of the SW theory is obtained by setting the ǫ regulators to zero, that is F(a) ≡ F cl (a) + F (0,0) (a) in the above notation. In this way one can derive the explicit instanton expansion and successfully compare it with the expression obtained by geometrizing the monodromy and the duality features of the low-energy theory in terms of a SW curve. In the latter treatment, the vacuum expectation values a and their S-duals 2 a arise as periods of a suitable meromorphic differential λ along a symplectic basis (A, B) of one-cycles of the SW curve, and the prepotential F is such that 2πiã = ∂F ∂a . (1. 3) The duality group of the effective theory is contained in the Sp(2r, Z) redefinitions of the symplectic basis, that reduce to Sl(2, Z) in the rank r = 1 case. The S generator of this group exchanges a andã, and the S-dual description of the theory is given through the Legendre transform of the prepotential: F(ã) = F(a) − 2πiã a , (1.4) where in the right hand side a has to be expressed in terms ofã by inverting (1.3).
It is natural to wonder about the physical meaning of the prepotential F (a; ǫ) at finite values of the ǫ-deformation. This question was first addressed in the particular case ǫ 2 = −ǫ 1 , when only the n = 0 terms in (1.2) contribute. In [3] - [6] it was proposed that they correspond to gravitational F-terms in the effective action of the form F (0,g) W 2g , where W is the chiral Weyl superfield containing the graviphoton field strength as its lowest component [7]. This statement can be understood by realizing the N = 2 gauge theories on the world-volume of stacks of D-branes in backgrounds with four orbifolded internal directions. In such a microscopic string set-up it is possible to compute the nonperturbative corrections provided by D-instantons [8] and show that the ǫ-background corresponds to a Ramond-Ramond three-form which appears in the effective theory as the graviphoton [9]; the above gravitational F-terms are thus directly accounted for 3 .
On the other hand, the low-energy N = 2 theories can be "geometrically engineered" in Type II string theory [12] - [14] in terms of closed strings on suitable non-compact "local" Calabi-Yau (CY) manifolds whose complex structure moduli t encode the gauge-invariant moduli of the SW theory (and are thus non-trivially related to the Coulomb branch parameters a). In such CY compactifications, the graviphoton F-terms of the four-dimensional effective action are captured by topological string amplitudes as F (g) top (t) W 2g [7,15]. For local CY realizations of N = 2 gauge theories, the coefficients F (0,g) (a) are therefore identified with the topological amplitudes F (g) top (t) and the expansion of the deformed prepotential F (a; ǫ) in powers of ǫ 1 ǫ 2 corresponds to the genus expansion of the topological string vacuum amplitude with a string coupling constant (1.5) The link to the topological string brings an important bonus: the amplitudes F (g) top satisfy a "holomorphic anomaly equation" [16,15]. In fact, despite their apparent holomorphicity in t, they also develop a dependence ont due to contributions from the boundary of the genus g moduli space, and thus should be more properly denoted as F top (t,t). The holomorphic anomaly equation, which relates amplitudes at different genera, can be written [17] as a linear equation, similar in structure to the heat equation, for the topological partition function top (t,t) , (1.6) which in the local CY case can be connected to the deformed partition function Z(a; ǫ) of the corresponding N = 2 theory. The holomorphic anomaly can be understood by assuming that the moduli space of complex structures has to be quantized and that the partition function behaves as a wave function, with g 2 s playing the rôle of [17] - [19]. This assumption requires that the partition function transforms consistently under canonical transformations acting on the moduli phase space. Parametrizing the phase space by the periods a andã, on which the duality symmetries act as symplectic transformations, one can thus determine the effect of the latter on Z(a; ǫ). In particular, the S-duality exchanging a andã should be represented on Z(a; ǫ) as a Fourier transform: Using (1.1) and (1.2), one can evaluate the integral in the saddle-point approximation for small values of g s and show that only at the leading order the S-duality reduces to a Legendre transform as in (1.4). By comparing the description based on (a,ã) with the one employing the global cooordinates (t,t), it is possible to relate the non-holomorphicity of the amplitudes F top (t,t) to the failure of modularity for the F (0,g) (a) and to argue that the amplitudes should be given either in terms of modular but almost holomorphic expressions (in the global coordinates description) or in terms of holomorphic but quasi-modular forms (in the period basis) [18,19].
The general picture we have outlined above has been pursued and applied to many N = 2 models, ranging from SU(2) to higher rank pure gauge theories, as well as to theories with matter in various representations of the gauge group. It is of course a highly non-trivial task to explicitly compute the deformed prepotential in a given model, and the various approaches can cooperate to this aim. On the microscopic side, efficient tools have been devised to implement the localization techniques and compute non-perturbative corrections [20] - [28]. On the topological side, results can be obtained from a direct integration of the holomorphic anomaly equation, supplemented with appropriate boundary conditions [29] - [33].
In the case of N = 2 superconformal gauge theories, an extremely interesting interpretation of the ǫ-deformation, going under the name of AGT relation, has been uncovered [34] - [38]: the generalized prepotential F (a; ǫ) equals the logarithm of conformal blocks in a two-dimensional Liouville theory. The central charge of the Liouville theory and the dimensions of the operators are ǫ-dependent and the number of inserted operators, as well as the genus of the two-dimensional surface on which the conformal blocks are defined, depend on the gauge group and matter content. In order to realize a generic central charge for the Liouville theory, it is necessary to consider the case with non-vanishing 8) which means that the full expansion (1.2) and not just its n = 0 terms must be taken into account. The F (n,g) (a) coefficients with n = 0 correspond to so-called "refined" topological amplitudes F (n,g) top (t,t). They appear in F-terms of the form F (n,g) top (t,t) Y 2n W 2g , involving a chiral superfield Y composed out of extra vector multiplets [39,40], and obey a generalized holomorphic anomaly equation [30] - [33]. The AGT relation maps the duality properties, and in particular the strong/weak-coupling S-duality, of the N = 2 superconformal theories into the modular transformation properties of the Liouville conformal blocks; this makes the study of the duality properties of these superconformal theories at generic values of the ǫ-parameters even more interesting.
The simplest canonical examples of four-dimensional superconformal gauge theories are given by SU(2) SYM theory with either N f = 4 adjoint matter hypermultiplets or with one adjoint hypermultiplet, the latter case being also known as the N = 2 * theory. These theories have vanishing β-function, but, when the hypermultiplets are massive, they receive both perturbative and non-perturbative corrections. For vanishing ǫ-deformations, via the SW description, it is possible to obtain the prepotential F as an exact function of the bare coupling τ 0 , and show that under S-duality, which on the bare coupling acts by τ 0 → −1/τ 0 , the prepotential and its S-dual are related precisely by a Legendre transform, as in (1.4) so that also the effective coupling τ is mapped by S into −1/τ [41,42].
Using the various approaches described above, much progress has been made in obtaining exact expressions for the generalized prepotential terms F (n,g) (a, ǫ) and in deriving their modular properties. In particular, using the topological string point of view, the generalized holomorphic anomaly equation that applies to these superconformal cases has been analyzed in [43] - [45]. This holomorphic anomaly translates into an anomalous modular behavior of the F (n,g) (a, ǫ)'s with respect to the bare coupling τ 0 which can only occur through the second Eisenstein series E 2 (τ 0 ). The dependence on E 2 is described by a modular anomaly equation of the form [43] - [46] ∂ E 2 F (n,g) = − 1 24k with k = 2 for the N = 2 * theory, and k = 1 for the N f = 4 one. The last term in the right hand side of (1.9) is absent when g = 0. This case happens in the so-called Nekrasov-Shatashvili (NS) limit ǫ 2 → 0 with ǫ 1 finite [47], which selects precisely the coefficients F (n,0) . Via the modular anomaly equation, exact expressions in terms of modular forms have been obtained for the first few F (n,g) coefficients at generic values of the ǫ parameters in the massless cases [43,44], and for the massive N = 2 * theory in the NS limit [45]. Explicit results have been obtained also from the microscopic point of view, computing the nonperturbative instanton corrections by means of localization techniques. In particular, in [46] the expression in terms of modular forms of the first few F (n,g) 's, for generic deformation and masses, was inferred from their instanton expansion; these findings suggest a recursion relation among the coefficient of the expansion of the prepotential for large a which is equivalent to the modular anomaly equation (1.9). Finally, to obtain explicit expressions and uncover the modular properties of the deformed theories, one can exploit the AGT relation, as recently done in [48,49], or the deformed matrix models [50].
In this paper we address various issues. In Section 2 we present an efficient method to obtain the exact expressions of the F (n,g) 's based on the modular anomaly equation. We show that this equation is equivalent to the heat equation on the non-classical part of the partition function, and use the heat kernel to express the prepotential in terms of its "boundary" value obtained by disregarding all terms that involve the Eisenstein series E 2 . With the knowledge of the boundary value obtained from the perturbative 1-loop result (and possibly the very first few instanton terms), one can derive the exact expression in terms of modular forms of the prepotential up to a very high order in the expansion for large a.
The knowledge of the explicit form of the prepotential is crucial in analyzing its modularity properties, and in particular the way S-duality is implemented in the full deformed quantum theory. It is readily established that the generalized prepotential F (a; ǫ) and its S-dual F (ã; ǫ) are no longer related to each other by a Legendre transform when g s = 0. Recently in [51] it has been proposed that for generic values of the ǫ-parameters the Sduality acts as a modified Fourier transform on the deformed partition function; however, more recently, in [52] it has been conjectured, also on the basis of the explicit results of [46], that it is in fact exactly given by the exact Fourier transform (1.7), which would thus be valid also for ǫ 1 + ǫ 2 = 0 and for massive superconformal N = 2 theories. In Section 3 we show that the modular anomaly equation (1.9) implies that this conjecture is indeed correct.
In Section 4 we take a further step and show that it is possible to introduce a modified prepotential F (a; ǫ), determined order by order in g 2 s , in such a way that the S-duality gets reformulated as a Legendre transform of this new quantity. This possibility had already been pointed out in [46], where F was determined by a rather involved procedure imposing order by order the consistency condition that S 2 [a] = −a. Here this result follows much more naturally from the Fourier transform property of Z(a; ǫ). We find this observation quite intriguing, even if we do not yet have a clear physical interpretation of F , and in Section 4 and in the Conclusions we further comment on it. Finally, we collect in the Appendices several technical details that are useful for the explicit calculations.

Solution of the modular anomaly equation and heat kernel
In this section we discuss how to solve the modular anomaly equation (1.9) in two significant models: the mass-deformed N = 4 SU(2) SYM theory, also known as N = 2 * theory, and the N = 2 SU(2) SYM theory with N f = 4 fundamental flavors. In both cases we show how to reconstruct the generalized effective prepotential, including its non-perturbative terms, from the perturbative ones 4 .

The
The N = 2 * SYM theory with gauge group SU(2) describes the interactions of an N = 2 gauge vector multiplet with a massive N = 2 hypermultiplet in the adjoint representation of SU (2). After giving a vacuum expectation value to the scalar field φ of the vector multiplet: and introducing the parameters ǫ 1 and ǫ 2 of the Nekrasov background [3] - [5], the deformed prepotential F takes the form (1.2) where

2)
τ 0 being the bare gauge coupling constant. The coefficients F (n,g) of the ǫ-expansion account for the perturbative and non-perturbative contributions, and are functions of a, of the hypermultiplet mass m and of τ 0 through the Eisenstein series E 2 , E 4 and E 6 . 5 As shown in [46,45], they satisfy the modular anomaly equation (1.9) with k = 2. Defining it is immediate to show that (1.9) becomes which is the homogeneous Kardar-Parisi-Zhang (KPZ) equation in one space dimension [55]. To write it in the standard form, namely it is enough to set By taking a further derivative of (2.5) with respect to x, one finds the viscous Burgers equation [56] where u ≡ −∂ x ϕ 0 . It is well-known that the non-linear Burgers equation (2.7) can be mapped into a linear parabolic equation by means of the Hopf-Cole transformation [57,58]. The same is true also for the non-linear KPZ equation (2.5). Indeed, writing which is the linear heat conduction equation. Note that, using (2.3), we can rewrite (2.8) as from which we read that Ψ is the non-classical part of the generalized partition function of the theory. The fact that the partition function is related to a solution of the heat equation was already noticed in [17], even if in a different context, and more recently also in [43]. The general solution of the heat equation (2.9) can be written as the convolution of the heat kernel with an "initial" condition Ψ 0 ≡ Ψ| t=0 , namely as or, more explicitly, as This formula allows us to reconstruct the dependence on E 2 of the non-classical part of the generalized prepotential starting from ϕ 0 evaluated at E 2 = 0. Let us now give some details. As discussed in [46] (see also [43]) the perturbative part of the generalized prepotential is is the equivariant mass parameter [59], and is related to the logarithm of the Barnes double Γ-function [5,20,43]. Choosing a branch for this logarithm and expanding for small values of ǫ 1 and ǫ 2 , one finds [46] where the first few coefficients are In Appendix A.1 we also give the expression for h 4 . Among the various terms in (2.17), the logarithmic one plays a distinguished rôle because it is exact at 1-loop and does not receive any non-perturbative correction 6 . Therefore, it is natural to expect that if we take it as the "initial condition" at t = 0, we can generate all structures of the prepotential that only depend on E 2 . Indeed, if in (2.13) we take With a suitable change of variables, we can recognize in (2.23) the integral representation of the parabolic cylinder functions (see Appendix B). Carrying out the integration over y, we can organize the result as an expansion in inverse powers of a as follows where for convenience we have defined Taking the logarithm of (2.24) and reinstating E 2 according to (2.6), after simple algebra we have where the first few coefficients are 7 and so on and so forth. As expected, the h ℓ 's turn out to be quasi-modular forms of weight 2ℓ made only of powers of E 2 . Since in this model there is only one form of weight 2, namely E 2 itself, the above expression for h 1 must be exact. This observation is further confirmed by the fact that in the perturbative limit E 2 → 1 (2.27) correctly reduces to h (0) 1 given in (2.19). Indeed and in (2.27) we can replace ≃ with =.
On the contrary, the h ℓ 's with ℓ ≥ 2 given above are not exact, since there are other modular forms of weight 2ℓ beside E ℓ 2 that could or should be present. For instance, for ℓ = 2 we have also the Eisenstein series E 4 . Moreover, the perturbative limit of (2.28) does not coincide with h To take this fact into account, we have to change the initial condition in our heat-kernel formula (2.13) and use instead of (2.22). If we do this, after simple algebra we obtain again (2.26) with h 1 as in (2.27) but with h 2 and h 3 replaced by In this way we generate all terms depending on E 2 and those that are linear in E 4 . Actually, since there are no other possible forms of weight 4 other than E 2 2 and E 4 , the above expression for h 2 is exact and its perturbative limit indeed coincides with h (0) 2 given in (2.20). Thus, in (2.33) we can substitute ≃ with =. 7 It is worth noting that, while the coefficients of a −2ℓ in the expansion of exp ϕ 0 (a;t) given in (2.24) are polynomials of degree 2ℓ in h0, the coefficients h ℓ in the expansion of ϕ0 are polynomials of degree ℓ + 1 in h0. This is simply due to dimensional reasons. The cancellations that occur in passing from exp ϕ 0 (a;t) ǫ 1 ǫ 2 to ϕ0 are a consequence of the properties of the parabolic cylinder functions as explained in Appendix B.
Instead, the expression (2.34) for h 3 is still incomplete since there is a further modular structure of weight 6 that has not yet appeared, namely E 6 . Moreover, the perturbative limit of (2.34) does not reproduce the 1-loop result: This fact forces us to change once again the initial condition for the heat kernel and use in (2.13) instead of (2.32). By doing this, the resulting expression for ϕ 0 has the form (2.26) with h 1 and h 2 as in (2.27) and (2.33) respectively, and with h 3 given by (2.37) Using (2.18) to express h 0 in terms of the hypermultiplet mass, one can check that our results perfectly match those we obtained in [46] from explicit multi-instanton calculations combined with the requirement of quasi-modularity. This procedure can be further iterated with no conceptual difficulties to obtain the exact expressions of the higher coefficients h ℓ . In Appendix A.1 we provide some details for the calculation of h 4 . Of course, the algebraic complexity increases with ℓ but still this method remains computationally very efficient. In particular we would like to remark that the knowledge of the 1-loop prepotential (2.14) together with the heat-kernel formula (2.13) allows one to obtain the full non-perturbative expressions of h ℓ up to ℓ = 5. In h 6 , which is a quasi-modular form of weight 12, there are two independent structures of weight 12 not involving E 2 , namely E 2 6 and E 3 4 , and thus the perturbative information is not sufficient to fix the relative coefficients. However, combining this with the 1-instanton corrections [46], one is able to resolve the ambiguity and find h 6 . In the same way one obtains all coefficients up to h 11 ; in order to find h 12 , which contains three different structures of weight 24 independent of E 2 , namely E 4 6 , E 2 6 E 3 4 and E 6 4 , the 2-instanton results become necessary. This structure keeps repeating itself.
Thus, we may conclude that the 1-loop and the first instanton corrections combined with the heat-kernel equation permit to reconstruct the exact generalized prepotential of the theory to a very high degree of accuracy in a systematic and algebraic fashion, generalizing the method and the results of [41] to the case of arbitrary values of ǫ 1 and ǫ 2 . (2) theory with N f = 4

The SU
We now repeat this analysis in the N = 2 SU(2) SYM theory with four fundamental flavors. As is well-known, this model has a vanishing 1-loop β-function and its conformal invariance is broken only by the flavor masses m f (f = 1, ..., 4). After giving a vacuum expectation value to the adjoint scalar field as in (2.1), the deformed prepotential takes the form (1.2) with (2.38) Here we have used the standard normalization [2] for the classical term (which differs by a factor of 2 from the N = 2 * one). The coefficients F (n,g) of the ǫ-expansion depend on a, on the bare coupling τ 0 through the Eisenstein series E 2 , E 4 , E 6 and the Jacobi θ-functions, and also on the hypermultiplet masses through the SO(8) flavor invariants As shown in [46] (see also [43]), the coefficients F (n,g) satisfy the modular anomaly equation (1.9) with k = 1. We can therefore follow the same steps described in Section 2.1 and prove that This is the same as the N = 2 * equation (2.13), but with As before, we use this equation to reconstruct ϕ 0 (a; t) starting from an "initial" condition at t = 0. The latter can be taken from the N f = 4 perturbative prepotential where γ ǫ 1 ǫ 2 is given in (2.16) and the equivariant massesm f are defined as in (2.15).
Expanding for large values of a, we get where the first few coefficients are [46] In Appendix A.2 we also give the expression for h 3 . All coefficients, except h 0 , receive non-perturbative corrections due to instantons which can be explicitly computed using localization methods. Using as initial condition and following the same steps described in the N = 2 * theory, from (2.40) we generate all terms in the h ℓ 's which only depend on E 2 . For example we find (2.49) In the perturbative limit, when E 2 → 1, these expressions do not reduce to (2.45) and (2.46), signaling the fact that other structures have to be considered in the initial condition. Indeed, in the N f = 4 theory combining the usual modular properties of the Jacobi θfunctions with the triality transformations of the mass invariants (2.39), one can construct several modular forms. For example, taking into account that the generators T and S of the modular group act on T 1 and T 2 as [2] T : and on the θ-functions as one can easily check that the combination is a modular form of weight 2. As such it could/should be present in the exact expression of h 1 . In the perturbative limit, θ 4 → 1 and θ 2 → 0, it simply reduces to T 1 , and thus by comparing with h Inserting this into the heat-kernel formula (2.40) we obtain the final expression for h 1 : 54) and the following expression for h 2 : This fails to reproduce the perturbative limit (2.46) since Note, however, that in the N f = 4 theory there are two modular forms of weight 4 that should be considered: the Eisenstein series E 4 (that can be multiplied by any modular invariant term made up with R, N , s 2 and ǫ 1 ǫ 2 ) and the following combination whose perturbative limits are, respectively, 1 and T 1 Thus, we can easily fix the problem by changing once more the initial condition in the heat-kernel formula and use (2.59) In this way we obtain the exact expression for h 2 : (2.60) One can check that (2.54) and (2.60) precisely match Eq.s (3.20) and (3.21) of [46]. Of course we can continue iteratively this way to determine the exact expressions of the higher coefficients h ℓ 's and hence reconstruct term by term the exact generalized prepotential. In Appendix A.2 we provide some details for the calculation of h 3 , which shows the consistency and the efficiency of the entire procedure.

S-duality as a Fourier transform
The modular anomaly equation is a very powerful tool for several different purposes: in fact it can be used not only to determine the generalized prepotential F , as we have seen in the previous section, but also to investigate its behavior under the S-duality transformation and thus its properties at strong coupling, as we are going to see in this section. In particular, exploiting the modular anomaly equation or its equivalent heat-kernel version, we will prove the following general result: for arbitrary values of ǫ 1 and ǫ 2 , the generalized prepotential F and its S-dual F = S[F ] are related through an exact Fourier transform, up to an important normalization factor, namely . For simplicity, we will discuss only the N f = 4 case, but it is obvious that our derivation works in the N = 2 * theory as well.
Our starting point is the heat-kernel formula (2.40), which for convenience we rewrite here as Ψ(a; t) = G * Ψ 0 (a; t) (3.2) using the same convolution notation introduced in (2.10)-(2.12). We then apply to it an S-duality transformation with the minimal assumption that 8 and get exp ϕ 0 (ã;t) Note that this last equation is simply a consequence of the anomalous transformation properties of the second Eisenstein series E 2 under τ 0 → S[τ 0 ] = −1/τ 0 . Also the expression of ϕ 0 (ỹ; 0), appearing in the right hand side of (3.4), can be easily computed. In fact, ϕ 0 (y; 0) is the part of the prepotential with E 2 set to zero and, up to the logarithmic term, is a sum of terms depending on powers of E 4 , E 6 and the Jacobi functions θ 4 j . As one can see from the examples worked out in the previous section (see, e.g. (2.53) and (2.59)), such terms are typically of the form where α, β and γ are non-negative integers and M stands for a generic mass structure which is needed for dimensional reasons. Taking into account possible exchanges of the Jacobi θ-functions among themselves and of the mass invariants T 1 and T 2 as described in (2.51) and (2.52), the numerator of (3.6) transforms as a modular form of weight 4α + 6β + 2γ, and thus Hence we simply have Plugging this into (3.4), using (3.5) and changing the integration variableỹ → τ 0 y, we end up with The right hand side has the same structure as the original equation (2.40); in fact it is the convolution of the "initial" condition Ψ 0 = exp ϕ 0 (y;0) with a gaussian heat kernel G with a rescaled parameter: we can rewrite (3.9) more compactly as The similarity between (3.2) and (3.12) suggests to take the Fourier transform F 9 of both equations. Recalling that the Fourier transform of a convolution of two functions f and g is and that the Fourier transform of a gaussian is 14) 9 Our conventions for the Fourier transform F and its inverse F −1 are

from (3.2) and (3.12) we find
where in the last step we have used (3.5). By taking the ratio of these two equations, we can eliminate the boundary factor F[Ψ 0 ] and also all explicit dependence on t, obtaining Finally, to get Ψ S we apply to (3.16) the inverse Fourier transform which yields where the square-root normalization factor in the last line originates from the integral over k. According to (3.11) we must evaluate Ψ S atx =ã/τ 0 . If we do so, we get exp ϕ 0 (ã;t ) which can be put in a more transparent form if we observe that the two terms quadratic in x andã appearing in the right hand side are, respectively, the classical parts of the prepotential F and of its S-dual F ; indeed Taking this into account, we then obtain the announced result (3.1), which, for future convenience, we rewrite here after setting ǫ 1 ǫ 2 = g 2 s : (3.20) A few comments are in order. Recently, in [51] it has been argued that for generic values of the deformation parameters ǫ 1 and ǫ 2 , the S-duality acts as a modified Fourier transform on the prepotential of the N f = 4 SYM theory for some particular values of the flavor masses, while more recently in [52] it has been conjectured, building also on the explicit results of [46], that the S-duality must act precisely as a Fourier transformation. Our present analysis provides a general derivation and a proof of this result based on the modular anomaly equation and the minimal (and natural) assumption (3.3). On the other hand, the fact that the generalized prepotential and its S-dual are related by an exact Fourier transform is perfectly consistent with the interpretation of exp − F (a) ǫ 1 ǫ 2 as a wave function, of a andã = S[a] as a pair of canonically conjugate variables and, correspondingly, of the S-duality as a canonical transformation, in complete analogy with what has been observed in topological string models and local CY compactifications of Type II string theories (see for example [18] and references therein).
Finally, we observe that by inserting in (3.20) the expansion of F for large values of x and by carrying out the integration over x using the parabolic cylinder functions as described in Section 2, we can derive the S-duality transformation properties of the coefficients h ℓ and check that they indeed are modular forms of weight 2ℓ with with anomalous terms due to the presence of the second Eisenstein series E 2 , in perfect agreement with the explicit expressions derived from multi-instanton calculations.

S-duality in the saddle-point approximation
In this section we consider the Fourier transform relation (3.20) between the generalized prepotential F and its S-dual F and evaluate it in the saddle-point approximation for small values of g 2 s . To do so, it is convenient to reorganize the generalized prepotential F in powers of g 2 s and write As is well-known, the coefficients F g are related to the refined topological string amplitudes at genus g. Note that the genus-zero term F 0 corresponds to the NS prepotential and that, in the limit s → 0, it reduces to F = F cl + F (0,0) , which is the prepotential of the SW theory.
For small g 2 s , the integral in (3.20) is dominated by the "classical" value x = a 0 that extremizes the exponent 2πiãx − F 0 (x) /g 2 s , that is Computing the fluctuations up to second order in g 2 s and using the standard saddle-point method, we easily obtain and where a 0 has to be thought as a function ofã through the inverse of (4.2). These expressions agree with those that can be found for instance in [18] (modulo the different sign conventions and the different number of variables we are using). The perturbative corrections W g have a diagrammatic interpretation in which the propagator is 1/∂ 2 F 0 and the vertices are given by multiple derivatives of the F g , all evaluated at a 0 ; in the expression of W g only vertices constructed out of derivatives of F k with k < g appear; this is again in full similarity to what is described in [18].
In the NS limit g 2 which is the standard and well-known Legendre transform relation between the NS prepotential and its S-dual. From this it is straightforward to obtain the S-duality transformations of the derivatives of F 0 . For example one has and so on and so forth. Then, exploiting (4.6) and (4.2), it immediately follows that 8) and, using (4.5), also that We now analyze what happens when the corrections in g 2 s are taken into account. We will show that, with suitable redefinitions, it is possible to write the relation between the prepotential and its S-dual in the form of a Legendre transform and to generalize the relations (4.8) and (4.9) also for finite values of g 2 s . The procedure we follow is similar to the one that is used to derive the effective action from the generating functional of the connected Green functions in quantum field theory, but with some important differences which will point out later. Let us consider the first-order corrections in g 2 s , namely F 1 inside F and W 1 in the S-duality formula. If we want that the right hand side of (4.3) becomes a Legendre transform, we have to redefine the classical saddle-point a 0 and the prepotential F according to a = a 0 + ∞ g=1 g 2g s δa g , (4.10) Inserting these expressions into (4.3), and keeping consistently only the terms up to order g 2 s , we can rewrite the S-duality relation as .
It is easy to verify that a solution of these equations is given by (4.16) Indeed, from (4.7) and S[τ 0 ] = −1/τ 0 , one has which leads to S[W 1 ] = −W 1 and hence to (4.15) and, in turn, to (4.16). This procedure can be extended to higher orders in g 2 s without any difficulty; in Appendix C we provide some details for the computation of the corrections at order g 4 s , as well as an alternative (and computationally more efficient) method to determine the higher order terms in the saddle-point expansion. For example, the next-to-leading order correction of the prepotential turns out to be given by (see (C.9)) This analysis shows that the S-duality relation (4.3) can be written as a Legendre transform of a redefined prepotential F , namely and 2πiã = ∂ F = ∂F + g 2 which generalize the undeformed S-duality relations (4.8) and (4.9) to the case of a nonvanishing deformation g 2 s = ǫ 1 ǫ 2 . Finally, we observe that the expressions for F andã we have obtained here completely agree with the results of [46] that were derived by explicitly enforcing, order by order in ǫ 1 ǫ 2 , the requirement that S 2 [a] = −a (see in particular Eq. (5.3) of [46] which exactly matches (4.20)).
We end with a few comments. The saddle-point evaluation of the Fourier transform of the deformed prepotential leading to (4.3) is a standard procedure, corresponding to the usual perturbative treatment of quantum field theories. The correspondence is as follows: the topological string coupling g 2 s = ǫ 1 ǫ 2 represents ; a single degree of freedom x plays the rôle of the field φ, while −2πiã corresponds to the current j; the prepotential F (x) represents the tree-level action and its S-dual F (ã) is like the generating functional W [j] of the connected diagrams. In the diagrammatic interpretation of the perturbative corrections W g , like those given in (4.4), F 0 is seen as the "free" action and the higher genus terms F g as interactions. Note however that these interactions are not weighted by independent couplings, as is usually the case in field theory, but by powers of g 2 s , i.e. of itself; in other words, one is quantizing a theory whose action already contains corrections. This makes the choice of F 0 as the "free action" somewhat ambiguous, and in fact in Appendix C we show that it is possible to organize the expansion around a shifted saddle-point by using as free action a different function, which differs from F 0 by corrections, obtaining exactly the same results.
In the standard field theory procedure one defines the quantum effective action Γ[Φ], which is related to W [j] by a Legendre transform, so that Φ = ∂W/∂j = φ j . In our situation this would amount to express the S-dual prepotential as the (inverse) Legendre transform of an "effective prepotential" F eff (a), namely as where a can be obtained by inverting 10 the relation 2πiã = ∂F eff (a)/∂a. This of course can be done, but it is not what we have done! Indeed, we have modified the procedure by introducing a shifted prepotential F such that its S-dual is the Legendre transform of itself and not of a different function, as one can realize by comparing (4.19) with (4.23). This result has been obtained by defining the modified prepotential F to differ from F by half the perturbative quantum corrections appearing in the computation of F (ã) (see in particular (C.23) -(C.25)). In other words we have divided the quantum corrections democratically between the prepotential F and its S-dual S[ F ], giving these quantities 10 This is tantamount to writing where we used (3.20).
a symmetric rôle with respect to S-duality. In the analogous field theory computation, redefining the action by half the quantum corrections would not make much sense, given that one starts from a purely classical action and the goal is precisely to understand how the quantum corrections modify it into an effective action. In our case, however, the prepotential F is expressed as a series in , i.e. it already contains "quantum" terms before the saddle-point evaluation of the Fourier transform. It is therefore not particularly disturbing to shift it by some contributions, in order to obtain a better behaved quantity and a more symmetric formulation of the S-duality relation.

Conclusions
The fact that the deformed partition function of N = 2 superconformal SU(2) theories satisfies a modular anomaly equation, equivalent to the heat equation, was already known in the literature but not all its implications were exploited. In this paper we have shown that writing the deformed prepotential of N = 2 * and N f = 4 theories with gauge group SU(2) as a solution of the corresponding heat equation is an efficient way to compute the exact dependence on the bare coupling τ 0 of the coefficients of its large-a expansion. With this formalism, quite high orders in the expansion can be achieved with a limited effort, using as input data the explicit knowledge of the perturbative (and the very first few instanton) terms of the prepotential.
From a more conceptual point of view, starting from the solution of the modular anomaly equation via the heat kernel, we have proved that S-duality is realized on the deformed partition function as a Fourier transform also for generic ǫ-deformations and masses. This fact is perfectly consistent with the interpretation of exp − F (a) ǫ 1 ǫ 2 as a wave function and of a andã = S[a] as a pair of canonically conjugate variables on which Sduality act as a canonical transformation. Thus there is a complete analogy with what has been observed in topological string models and local CY compactifications of Type II string theories [17] - [19]. The Fourier transform can be evaluated in the saddle-point approximation, yielding the perturbative expansion (4.3) of the dual prepotential. As discussed at the end of Section 4, this procedure is very similar to the usual perturbative expansion of field theories, and in particular it implies that the S-dual variableã coincides with the derivative of the prepotential F only at the leading order in g 2 s . In the last part of our work, we have shown that it is possible to introduce a modified prepotential F , differing from F by a series of g 2 s corrections determined order by order, which exhibits a "classical" behavior under S-duality: its S-dual is simply given by its Legendre transform, see (4.19), so that we also have thatã = ∂F (a)/∂a. We believe F should have a direct "physical" meaning and uncovering it represents an interesting open problem left to future investigation. TO-Call3-2012-0088.

A. Higher order coefficients in the generalized prepotential
In this appendix we provide some technical details for the calculation of higher order coefficients h ℓ in the expansion of the generalized prepotential for large values of the vacuum expectation value a. In particular we will compute the coefficient h 4 in the N = 2 * theory and the coefficient h 3 in the N f = 4 theory.
4 of the perturbative part of the generalized prepotential (2.17) for the N = 2 * SU(2) theory is given by On the other hand, taking as initial condition for the heat kernel equation the expression given in (2.36), we obtain a contribution to the prepotential proportional to 1/a 8 with a coefficient Notice that this expression does not contain the structure E 2 4 , which instead should be expected on the basis of the modularity properties since h 4 is a (quasi) modular form of weight 8. Furthermore, in the perturbative limit when E 2 , E 4 , E 6 → 1, (A.2) does not reproduce the 1-loop result (A.1); indeed we have This mismatch is easily cured by changing the initial condition in the heat kernel equation (2.13), and by using ϕ 0 (y, 0) ≃ − By expanding the Eisenstein series, one may retrieve the various instanton contributions and one can check that for the first few instanton numbers these contributions exactly agree with the explicit results obtained in the multi-instanton calculus from the localization formulas [46].
In the N f = 4 SYM theory the coefficient h On the other hand, using the initial condition (2.59) in the heat-kernel formula (2.40) we obtain the following expression for the coefficient of the 1/a 6 term It is not difficult to realize that in the perturbative limit where E 2 , E 4 , θ 4 → 1 and θ 2 → 0 the above expression does not reproduce the 1-loop result (A.6); indeed The mismatch (A.8) signals the fact that some structures are missing in our analysis. In fact, we have three modular forms of weight 6 which have not been considered so far. They are: the Eisenstein series E 6 , which can be multiplied by any modular invariant combination of the SO(8) mass invariants (2.39), and the following two structures: where q 2ℓ is the Pochhammer symbol (q) 2ℓ = q(q − 1) · · · (q − 2ℓ + 1) .

(B.3)
Making use of these expressions and their analytic extensions, we can obtain the useful formula The functions D q (z) satisfy the following recursion relations: that can be easily rewritten also for the asymptotic series D q (z) defined as The functions D q are useful since they appear explicitly in the expressions of the various terms of the prepotential ϕ 0 (a, t) obtained in the main text. For example, as shown in Section 2 for the N = 2 * SU(2) theory, the terms of the prepotential which depend only on the Eisenstein series E 2 or which are linear in E 4 and E 6 are reconstructed from the initial condition (2.36), from which one obtains where t = E 2 /24 and z = ia/ √ ǫ 1 ǫ 2 t, while Θ 2 and Θ 3 , which are respectively polynomials of order 2 and 3 in h 0 , are given in (2.31) and (2.35).
The interesting point is that, while the coefficient of a −2ℓ in the expansion of exp ϕ 0 (a;t) is a polynomial of degree 2ℓ in h 0 (see (2.24)), the coefficients h ℓ in ϕ 0 have to be polynomials in h 0 of degree ℓ + 1 for dimensional reasons. This translates into the fact that while the coefficient of z −2ℓ in D q (z) is a polynomial of degree 2ℓ in q, the coefficients of z −2ℓ in expressions like (respectively log D q (z)) are polynomials of degree ℓ (respectively (ℓ + 1)) only. We now show that the cancellations needed for this to occur are a simple consequence of the recursion relations (B.5). We first note that these relations imply where R[q; s; n] is a polynomial in q of order n.
As a lemma, we first demonstrate by induction that, for any integer s, we have where P [q; s; n] is a polynomial in q of order n. One can easily see that this is true for s = 1 since the recursion relations (B.5) imply Then, using the relation (B.11) with q → q − s, we get which has the form we seek, except that the index range in the sum is not the correct one. However, using (B.11) with q → q − s − (n + 1), we can easily put the right hand side of (B.12) in the desired form and thus prove by induction that (B.10) holds true for any integer s. Finally, (B.9) follows from (B.10) by induction on n and by using the recursion (B.11) for an appropriate value of q. The functions D q are useful also for the computation of the prepotential for the N f = 4 theory, which indeed goes essentially along the same lines as above, apart from the existence of an order one term proportional to T 1 θ 4 4 − T 2 θ 4 2 in the initial condition (2.59). When calculating h 3 , this term is responsible for the contribution 8(T 1 θ 4 4 − T 2 θ 4 2 )E 2 in the last line of (A.7) which does not seem to have a direct precursor in the initial condition (2.59). Actually, such a term originates from the fact that the heat equation is satisfied by the partition function rather than the prepotential. An explicit computation shows that it is the first term in ϕ 0 (a, t) of a series taking the form ϕ 0 (a, t) ≃ (T 1 θ 4 4 − T 2 θ 4 2 ) 2 2ǫ 1 ǫ 2 a 4 D q−4 (z) D q (z) − D 2 q−2 (z) D 2 q (z) + · · · , (B.13) which has indeed the features discussed above.

C. Higher orders in the saddle-point approximation
In this appendix we provide some technical details on the calculation of the next-to-leading order correction in the S-duality transformation of the prepotential. Before doing this, however, we make explicit some properties of the leading order results described in Section 4 which will be useful later on. At order g 2 s = ǫ 1 ǫ 2 , we have found that and From these relations it is simple to obtain and so on and so forth. These relations generalize (4.6) and (4.7) to include the first-order corrections in g 2 s . Expanding the prepotential as in (4.1) and reading the coefficients of g 0 s and g 2 s , from (C.4) we get

(C.5)
Proceeding similarly for the higher derivatives, we find (C.6) All these formulas will be useful for the next-to-leading order calculation. In order to find the shifted prepotential F at order g 4 s , we proceed as described in Section 4 and rewrite the saddle-point result (4.3) in terms of a and F as given in (4.10) and (4.11), keeping all terms up to order g 4 s . The new structures that in this way are generated in the right hand side of (4.12) are Thus, in order to have a Legendre transform relation between F and its S-dual we must require that the above square brackets vanish. From the second line we fix the form of δa 2 , while from the first line we obtain where in the second step we have inserted the expressions of W 1 and W 2 given in (4.4) and of δa 1 given in (4.16). Using (C.5) and (C.6), one can easily check that the combination in the right hand side of (C.8) changes sign under S-duality; thus a solution to this equation is given by as reported in the main text. This procedure can be easily extended to compute higher-order corrections. However, there is a simpler (and computationally more efficient) way to perform these calculations. Since we aim at writing the S-duality relation as a Legendre transform for a shifted prepotential F and at having 2πiã = ∂ F (a) , (C. 10) we can organize the calculation in such a way that the identification (C.10) arises as the saddle-point condition. Thus, we rewrite (3.20) as where in the second step we have used For small values of g 2 s , we can evaluate (C.11) in the saddle-point approximation by setting x = a + g s y (C.13) with a given by (C.10), so that . (C.14) We can now expand in powers of g s and carry out the gaussian integrations, obtaining where the coefficients C g depend on the quantities indicated below: C g ≡ C g ∂X 1 , . . . , ∂X g−1 ; ∂ 2 F, . . . , ∂ 2g+2 F . (C. 16) Taking the logarithm of (C.15), we finally obtain F (ã) = F (a) − 2πiã a +