Quasi-modular forms attached to elliptic curves, I

In the present text we give a geometric interpretation of quasi-modular forms using moduli of elliptic curves with marked elements in their de Rham cohomologies. In this way differential equations of modular and quasi-modular forms are interpreted as vector fields on such moduli spaces and they can be calculated from the Gauss-Manin connection of the corresponding universal family of elliptic curves. For the full modular group such a differential equation is calculated and it turns out to be the Ramanujan differential equation between Eisenstein series. We also explain the notion of period map constructed from elliptic integrals. This turns out to be the bridge between the algebraic notion of a quasi-modular form and the one as a holomorphic function on the upper half plane. In this way we also get another interpretation, essentially due to Halphen, of the Ramanujan differential equation in terms of hypergeometric functions. The interpretation of quasi-modular forms as sections of jet bundles and some related enumerative problems are also presented.


Introduction
The objective of this note is to develop the theory of quasi-modular forms in the framework of Algebraic Geometry. The request for an algebra which contains the classical modular forms and which is closed under derivation leads in a natural way to the theory of quasimodular forms and this can be the main reason why the name differential modular form is more natural (see [18,19]). The literature on modular forms and their applications is huge and a naive mind may look for similar applications of quasi-modular forms. At the beginning of our journey, we may think that we are dealing with a new theory. However, the main examples of quasi-modular forms and their differential equations go back to 19th century, due to G. Darboux (1878) and G. Halphen (1881).
The development of the theory of modular forms as holomorphic functions in the Poincaré upper half plane has shown that many of problems related to modular forms can be proved if we take a modular form into Algebraic Geometry and interpret it in the following way: a modular form of weight m is a section of m-times tensor power of the line bundle F on compactified moduli spaces of elliptic curves, where the fiber of F at the elliptic curve E is defined to be Lie(E) ∨ . This is equivalent to say that a modular form is a function from the pairs (E, ω) to k, where E is an elliptic curve defined over a field k of arbitrary characteristic and ω is a regular differential form on E, such that f (E, aω) = a −m f (E, ω) for all a ∈ k * . Some additional properties regarding the degeneration of the pair (E, ω) is also required. The first interpretation can be generalized to the context of quasi-modular forms using the notion of jet bundles (see Appendix A). We found it much more convenient for calculations to generalize the later interpretation to the context of quasi-modular forms. The differential form ω is replaced with an element in the first algebraic de Rham cohomology of E such that it is not represented by a regular differential form. Algebraic de Rham cohomology is introduced for an arbitrary smooth variety by A. Grothendieck (1966) in [9] after a work of Atiyah and Hodge (1955). Apart from the multiplicative group k * , we have also the additive group of k acting on such pairs and the corresponding functional equation of a quasi-modular form. In order to use the algebraic de Rham cohomology we have to assume that the field k is of characteristic zero. It turns out that the Ramanujan relations between Eisenstein series can be derived from the Gauss-Manin connection of families of elliptic curves and such series in the q-expansion form are uniquely and recursively determined by the Ramanujan relations. Looking in this way, we observe that the theory is not so much new. We find the Darboux-Halphen differential equation which gives rise to the theory of quasi-modular forms for Γ (2).
We have given some applications of our effort; in order to find differential and polynomial equations for modular forms attached to congruence groups it is sufficient to construct explicit affine coordinates on the moduli of elliptic curves enhanced with certain torsion point structure, and then to calculate its Gauss-Manin connection. As the geometrization of modular forms was an important tool in understanding many difficult problems in number theory, such as the Taniyama-Shimura conjecture and its solution which is known under modularity theorem, I hope that the geometrization presented in this text helps to understand many enumerative problems related to quasi-modular, and even modular, forms (see Appendix B). However, the main justification in our mind for writing a text which apparently deals with the mathematics of a century ago, is to prepare the ground for a dreaming program: to develop a theory attached to an arbitrary family of varieties similar to the modular form theory attached to elliptic curves. Apart from Siegel and Hilbert modular forms attached to Abelian varieties, such a theory is under construction for a certain family of Calabi-Yau varieties which appears in mathematical physics, see for instance [21]. The text is written in such a way that the way for generalizations becomes smoother.
The reader who wants to have a fast overview of the text is invited to read the small introductions at the beginning of each section. There, we have tried to write the content of each section in a down-to-earth way. In this way it turns out that the mathematics presented in this text go back to a century ago, to mathematicians like Gauss, Halphen, Ramanujan, Abel, Picard, Poincaré and many others. The reader gets only a flavor of the history behind the mathematics of the present text. A full account of the works of all these respected mathematicians would require a deep reading of many treatises that they have left to us. Another relatively fast reading of the present text would be in the following order: §2.1, §3.1, §4.1, §4.3, §4.4, §B, §5.1, §6.1, §7.1 and the entire §8.
We assume that the reader has a basic knowledge in algebraic geometry, complex analysis in one variable and Riemann surfaces. At the end of each sub section the reader finds many exercises with different degrees of difficulty. The reader who is interested on the content of this note and who is not worry with the details, may skip them. We have collected such exercises in order to avoid statements like it is left to the reader, it is easy to check and so on. The students are highly recommended to do some good piece of the exercises.
The present text arose from my lecture notes at Besse summer school on quasi-modular forms, 2010. Here, I would like to thank the organizers, and in particular, Emmanuel Royer and François Martin for the wonderful job they did. The text is also used in a mini course given at IMPA during the summer school 2011. Prof. P. Deligne sent me some comments on the first and final draft of the present text which is essentially included in Appendix A. Here, I would like to thank him for his clarifying comments. My sincere thanks go to Prof. E. Ghys who drew my attention to the works of Halphen. Finally, I would like to apologize from all the people whose works is related to the topic of the present text and I do not mention them. There is a huge literature on elliptic curves and modular forms and I am sure that I have missed many related works.

De Rham cohomology of smooth varieties 2.1 Introduction
In many calculus books we find tables of integrals and there we never find a formula for elliptic integrals where P (x) is a degree three polynomial in one variable x and with real coefficients, for simplicity we assume that it has real roots, and a, b are two consecutive roots of P or ±∞.
Since Abel and Gauss it was known that if we choose P randomly (in other words for generic P ) such integrals cannot be calculated in terms of until then well-known functions (for a polynomial P with a double root we can calculate the elliptic integrals, see Exercise 1. For other particular examples of P we have some formulas calculating elliptic integrals in terms of the values of the Gamma function on rational numbers. The Chowla-Selberg theorem, see for instance Gross's article [8], describes this phenomenon in a complete way). It was also well known that any such elliptic integral, say it δ Q(x)ω with ω := dx √ P (x) , with the integration domain δ = [a, b] and polynomial P fixed, is a linear combination of two integrals δ ω and δ xω, that is, it is possible to calculate effectively two numbers r 1 , r 2 ∈ R such that For instance, take (in §5 we explain why we write P in this form). For examples of the equality (2) see Exercise 4. The equalities there, are written just by neglecting δ . The next historical step was to consider the integration on the complex domain instead of integration on the real interval (this immigration from the real to complex domain is one of the basic tools for Riemann to formulate the so called "Riemann hypothesis"). Now, the integration is on any path which connects to roots or ∞ to each other. Soon after it was invented the new variable y representing the quantity P (x) and the integration took place on a closed path in the topological space E := {(x, y) ∈ C 2 |y 2 = P (x)}. The integrand Q(x) dx y is now called a differential 1-form and the topological space E is called an elliptic curve (for a brief description of how the study of integrals contributed to the development of Algebraic Topology, see the introduction of §8). The study of elliptic, and later Abelian and multiple, integrals by Abel, Picard and Poincaré prepared the ground for the definition of the de Rham cohomology of varieties and its algebraic version due to Atiyah, Hodge and Grothendieck. Nowadays, algebraic geometers prefer to avoid the usage of integrals for expressing an equality like (2). Instead, they say that the algebraic de Rham cohomology of the elliptic curve y 2 = P (x) is a two dimensional vector space generated by two differential forms x i dx y , i = 0, 1. In this section we want to explain equalities like (2) without mentioning integrals and domains of integration. Moreover, we work with a ring R instead of the field of real numbers. We assume a basic knowledge in Algebraic Geometry. The reader may consult the book of Hartshorne [12], for any lacking definition or proof. We need to work with families of elliptic curves and so we use projective and affine schemes over a commutative ring R with multiplicative identity element 1. We assume that R is an integral domain, that is 1 = 0 and it is without zero divisors. For simplicity, we take a field of characteristic zero and we consider R as a finitely generated k-algebra.
Let E be a smooth curve of genus g over k.
The map Tr composed with the bilinear map gives us: which is non-degenerate and anti symmetric. We call it the intersection bilinear form. We have also a natural filtration of H 1 dR (E) which is called the Hodge filtration: Its non-trivial piece F 1 is generated by a regular differential form (a differential form of the first kind). The objective of this section is to define all these in a down-to-earth manner. Grothendieck's original article [9] is still a main source for the definition of algebraic de Rham cohomology. , where δ is an interval between two consecutive real roots of P or ±∞, and deg(P ) = 4, can be calculated in terms of elliptic integrals.

Differential forms
Let A be a k-algebra and R → A be a morphism of k-algebras. Using this morphism, A can be seen as an R-algebra. We assume that A as an R-algebra is finitely generated.
Let Ω A/R denote the module of relative (Kähler) differentials, that is, Ω A/R is the quotient of the A-module freely generated by symbols dr, r ∈ A, modulo its submodule generated by The A-module Ω A/R is finitely generated and it is equipped with the derivation It has the universal property that for any R-linear derivation D : Let X = Spec(A) and T = Spec(R) be the corresponding affine varieties over k and X → T be the map obtained by R → A. We will mainly use the Algebraic Geometry notation Ω 1 X/T := Ω A/R . Let be the i-th wedge product of Ω X/T over A, that is, Ω i X/T is the quotient of the A-module freely generated by the symbols ω 1 ∧ ω 2 ∧ · · · ∧ ω i modulo its submodule generated by elements which make ∧ A-linear in each ω i and It is convenient to define Ω 0 X/T := A The differential operator is defined by assuming that it is R-linear and Sometimes it is convenient to remember that d i 's are defined relative to R. One can verify easily that d i is in fact well-defined and satisfy all the properties of the classical properties of the differential operator on differential forms on manifolds. From now on we drop the subscript i and simply write d. If R = k is a field then we write X instead of X/T .
1. Prove the universal property of the differential map d : 2. Prove the following properties of the wedge product: For

De Rham cohomology
After the definition of differential forms, we get the de Rham complex of X/T , namely: Since d • d = 0, we can define the de Rham cohomologies 1. Let m be the number of generators of the R-algebra A. Show that for i ≥ m + 1 we have Ω i X/T = 0 and hence H i dR (X/T ) = 0.

Let
In this case, we usually use the notation A n R := Spec(A). The A-module Ω 1 A n R is freely generated by the elements dx 1 , dx 2 , . . . , dx n . Prove that This is Exercise 16.15 c, p. 414. of [6].
3. Let us come back to the case of an arbitrary A. Let a 1 , a 2 , . . . , a m ∈ A generate the R-algebra A. Define The set I is an ideal of R[x 1 , x 2 , . . . , x m ] and we have we mean the A-module generated by For instance, show that if R = k is an algebraically closed field of characteristic zero and X is an irreducible reduced variety over k then H 0 (X) = k.

An incomplete elliptic curve, I
In this section we find an explicit basis for the de Rham cohomology of the main examples of this text, that is, affine elliptic curves in Weierstrass form. The general theory uses the notion of a Brieskorn module which is essentially the same as de Rham cohomology. Our main source for this section is [20,15].
We have We have to say some words about Ω 2 X/T ; We define the auxiliary R-module: Proposition 1. We have ∆Ω 2 X/T = 0 Proof. Using the explicit form of f , we can easily verify that the R-module V is freely generated by dx ∧ dy, xdx ∧ dy (here we use the fact that 2 and 3 are invertible in R). Let M : V → V, A(ω) = f ω. We write A in the basis dx ∧ dy, xdx ∧ dy: Let p(z) := z 2 − tr(M )z + det(M ) = det(M − zI 2×2 ) be the characteristic polynomial of M . We have P (f )V = 0 and since Ω 2 X/T = V / f , we conclude that det(M )Ω 2 X/T = 0. From another side det(A) = −1 27 ∆.
By the above proposition ∆ω, ω ∈ Ω 1 X/T is closed. From now on we assume that ∆ is irreducible in R and we replace R with its localization on its multiplicative group generated by ∆. Therefore, ∆ is invertible in R and we can talk about the pole or zero order along ∆ of an element in any R-module. In this way Ω 2 X/T = 0 and There are two polynomials A, B ∈ R[x] such that AP + BP ′ = ∆. We define which satisfies: We denote by dx y and xdx y the elements ω, respectively xω. Note that these two elements have poles of order at most one along ∆.
Proposition 2. The R-module H 1 dR (X/T ) is freely generated by the elements dx y and xdx y .
Proof. Using the equalities (4) and y 2 = P (x), every element of H 1 dR (X/T ) can be written in the form (C + yD)ω, C, D ∈ R[x]. Since Dyω = Ddx is exact, this reduces to Cω. From another side the elements d(x a y) = ( 1 2 P ′ x a + ax a−1 P )ω are cohomologus to zero. If deg(C) ≥ 2, we can choose a monomial F = x a in such a way that the leading coefficient of ( 1 2 P ′ F + F ′ P ) is equal to the leading coefficient of C. We subtract d(F y) from Cω and we get smaller degree for C. We repeat this until getting a degree one C.
Exercise 4. Verify the following equalities in H 1 dR (X/T ): dx y

An incomplete elliptic curve, II
Let P (x) ∈ R[x] be as in the previous section and We will simply write 1 y instead of z.
Proof. In this example dy = 1 2y P ′ dx and so every element ω of H 1 dR (X/T ) can be written in the form Cy −k dx + Cy −k+1 , C, D ∈ R[x], k ≥ 1. We use the equality . . and see that ω is reduced to a form with k = 1 (each time we multiply ω with ∆ = BP ′ + Ay 2 ). Now, for terms Cy −2 dx we make the division of C by P and we are thus left with the generators dx y 2 , xdx y 2 , x 2 dx y 2 . For terms Dy −1 dx we proceed as in Proposition 2 and we are left with the generators dx y , xdx y .

De Rham cohomology of projective varieties
Let X be a projective reduced variety over R. We have the complex of sheaves of differential forms (Ω • X , d) and we define the i-th de Rham cohomology of X as the i-th hypercohomology of the complex (Ω • X/T , d), that is It is far from the objectives of this text to define the hypercohomology. Instead, we explain how its elements look like and how to calculate it. Let U = {U i } i∈I be any open covering of X by affine subsets, where I is a totally ordered finite set. We have the following double complex (5) . . . . . . . . .
Here Ω i j is the product over I 1 ⊂ I, #I 1 = j + 1 of the set of global sections ω σ of Ω i X/T in the open set σ = ∩ i∈I 1 U i . The horizontal arrows are usual differential operator d of Ω i X 's and vertical arrows are differential operators δ in the sense of Cech cohomology, that is, Hereσ k is obtained fromσ, neglecting the k-th open set in the definition ofσ. The k-th piece of the total chain of (5) is with the differential operator The hypercohomology H k (M, Ω • ) is the total cohomology of the double complex (5), that is .

Complete elliptic curve, I
Let us consider the projective variety which is covered by two open sets , Note that U 0 and U 0 ∩ U 1 are the affine varieties in §2.4, respectively §2.5. For simplicity, we will drop /R and /T from our notations. The variety E has a closed point O := [0; 1; 0] which is in the affine chart U 1 . It is sometimes called the point at infinity. By definition, we have dR (E) as above, we sometimes take U 1 smaller but always containing O.

Residue calculus
We need to carry out some residue calculus near the closed smooth point O, see for instance [29]. Such a machinery is usually developed for curves over a field and so it seems to be necessary to consider the elliptic curve E over the fractional field k 1 of R, that is, we use E ⊗ R k 1 instead of E. However, most of our calculations lead to elements in R which will be used later in the theory of quasi-modular forms.
where a is some integer. The stalk of the ring of meromorphic differential 1-forms at O is a O X,O -module generated by dt and so ω = f dt for some meromorphic function near O. Therefore, it is enough to explain the first equality. Let a be the pole order of f at O. We work with t a f and so without loosing the generality we can assume that f regular at O Another way of reformulating the above statement is: where O(t i ) means a sum j≥i a j t j . This is what what we have written in (8).
The residue of ω at O is defined to be f −1 . It is independent of the choice of the coordinate t. In our example, we usually take the coordinate t = x y with the notation of chart U 0 (in the chart U 1 we have t = x). The expansions of x and y in t are of the form: 2. Verify the details of the residue calculus presented in this section. In particular, justify the equalities (9) and prove that the notion of residue does not depend on the coordinate system t.

4.
Calculate the first 4 coefficients of the expansion of dx y in the coordinate t = x y .
5. Let us take the coordinates (x, z) in which the elliptic curve E is given by A regular function f at O can be written as P (x,z) Q(x,z) with Q(0, 0) = 0. Show that if Q(0, 0) is invertible in R and P, Q ∈ R[x, z] then all the coefficients in the expansion of f belong to R (Hint: Verify this for f = z.)

Complete elliptic curve, II
In this section we prove the following proposition: is an isomorphism of R-modules.
Proof. First we check that it is injective. Let us take an element (ω 0 , ω 1 ) ∈ H 1 dR (X) with ω 0 = 0. By definition Since ω 1 has not poles on the closed point O ∈ X, f has not too, which implies that (ω 0 , ω 1 ) is cohomologous to zero. Now, we prove the surjectivity. The restriction map is R-linear and so by Proposition 2, it is enough to prove that dx y , xdx y are in the image of the restriction map. In fact, the corresponding elements in H 1 dR (E) are respectively We prove this affirmation for xdx y . We defineŨ 1 = U 1 \{x = 0} and use the definition of hypercohomology with the covering {U 0 ,Ũ 1 }. We compute x and y in terms of the local coordinate t = y x around the point at infinity O and we have (9). Substituting this in xdx y , we get the desired result.
Let U 0 , U 1 be an arbitrary covering of E. We have a well-defined map Tr : H 2 dR (X) → R, Tr(ω) = sum of the residues of ω 01 around the points X\U 0 , where ω is represented by ω 01 ∈ Ω 1 U 0 ∩U 1 . As usual, we take the canonical charts of X described in §2.7. The map Tr turns out to be an isomorphism of R-modules.
Proof. According to Proposition 3 any element in Ω 1 U 0 ∩U 1 modulo exact forms can be reduced to an R-linear combination of 5 elements. All these elements are zero in H 2 dR (X), except the last one x 2 dx y 2 . The first two elements are regular forms in U 0 and the next two forms are regular in U 1 . We have proved that any element ω ∈ H 2 dR (X) is reduced to r ∈ x 2 dx y 2 , r ∈ R. Since x 2 dx y 2 at O has the residue −1 2 (use the local coordinate t = x y and the equalities (9)), we get the desired result.

The intersection form
Let X be a smooth irreducible reduced projective variety over R. One can define the cup product which is the translation of the usual wedge product for the de Rham cohomologies of real manifolds. Further, we can define an isomorphism (11) Tr : H 2n dR (X) ∼ = R of R-modules which imply that H 2n dR (X) is free of rank one. For i = j = dim(X), the map (10) composed with (11) gives us a bilinear maps We have already defined Tr in the case of elliptic curves. In this section we are going to define the cup product in the case of a curve. Let us take two elements ω, α ∈ H 1 dR (X). We take an arbitrary covering X = ∪ i U i of X and we assume that ω and α are given by {ω ij } i,j∈I and {α ij } i,j∈I with Let us consider the situation of §2.7. In this case Exercise 8.
1. Show that the definition of ω ∪ α does not depend on the covering of the curve X and that ∪ is non-degenerate.
2. For a curve over complex numbers show its algebraic de Rham cohomology, cup product and intersection form are essentially the same objects defined by C ∞ -functions.

Introduction
In 1958 Yu. Manin solved the Mordell conjecture over function fields and A. Grothendieck after reading his article invented the name Gauss-Manin connection. I did not find any simple exposition of this subject, the one which could be understandable by Gauss's mathematics. I hope that the following explains the presence of the name of Gauss on this notion. Our story again goes back to integrals. Many times an integral depend on some parameter and so the resulting integration is a function in that parameter. For instance take the elliptic integral (2) and assume that P and Q depends on the parameter t and the interval δ does not depend on t. In any course in calculus we learn that the integration and derivation with respect to t commute: As before we know that the right hand side of the above equality can be written as a linear combination of two integrals δ ω and δ xω. This is the historical origin of the notion of Gauss-Manin connection, that is, derivation of integrals with respect to parameters and simplifying the result in terms of integrals which cannot be simplified more. For instance, take P (x) as in (3) which depends on three parameters t 1 , t 2 , t 3 . We have and A i is a 2×2 matrix whose coefficients can be calculated effectively. When the integrand depends on many parameters the best way to put the information of derivations with respect to all parameters in one object is by using differential forms (recall that differential forms are also used to represent the integrand). We define In this section we calculate the Gauss-Manin connection, that is, we calculate the matrix A, see Proposition 6.

Gauss-Manin connection
What we do in this section in the framework of Algebraic Geometry is as follows: Let X be a smooth reduced variety over R. We construct a connection where Ω 1 T is by definition Ω 1 R/k , that is, the R-module of differential attached to R. By definition of a connection, ∇ is k-linear and satisfies the Leibniz rule If R is a polynomial ring Q[t 1 , t 2 , . . .] then we have vector fields ∂ ∂t i which are defined by the rule In this case we simply write ∂ Sometimes it is useful to choose a basis ω 1 , ω 2 , . . . , ω h of the R-modular H i (X/T ) and write the Gauss-Manin connection in this basis:

Construction
Recall the notation of §2.6. . Let us take a covering U = {U i } i∈I of X by affine open sets and ω ∈ H k dR (X). By our definition ω is represented by where d ′ is given by (7). Recall that the differential map d used in the definition of d ′ is relative to R, that is, by definition dr = 0, r ∈ R. Now, let us consider d in the double complex (5) relative to k and not R. The condition d ′ ω = 0 turns to be Since d has no contribution in Ω 0 k+1 , we know that η 0 = 0. We make the tensor product ⊗ R of the double complex (5) with Ω 1 T and finally get an element in Ω 1 . Of course we have to verify that everything is well-defined.
Let us now assume that k = C. The main motivation, which is also the historical one, for defining the Gauss-Manin connection is the following: For any ω ∈ H i dR (X) and a continuous family of cycles δ t ∈ H i (X t , Z) we have Here, by definition where β ∈ H i dR (X) and α ∈ Ω 1 T . Integrating both side of the equality (15) over a a basis Exercise 9. Discuss in more detail the above construction.

Gauss-Manin connection of families of elliptic curves
Let us consider the ring R = Q[t 1 , t 2 , t 3 , 1 ∆ ] and the family of elliptic curves in §2. 4. By Proposition 4 we know that the first de Rham cohomology of E is isomorphic to the first de Rham cohomology of affine variety U 0 . Therefore, we calculate the Gauss-Manin connection attached to U 0 . Proposition 6. The Gauss-Manin connection of the family of elliptic curves y 2 = 4(x − t 1 ) 3 − t 2 (x − t 1 ) − t 3 written in the basis dx y , xdx y is given as bellow: Proof. The proof is a mere calculation which is classical and can be found in ( [26] p. 304, [25] ). We explain only the calculation of ∂ where Note that in the fourth equality above we use y 2 = p(x) and the fact that modulo exact forms we have Exercise 10. Perform all the lacking calculations in Proposition 6.

Another family of elliptic curves
We modify a little bit the parameter space of our family of elliptic curves. Let be our previous family of elliptic curves and (19) The algebraic morphism α : connects two families, that is, if in E R we replace t with α(t) we obtain the family E H . The Gauss-Manin connection matrix associated to E H is just the pull-back of the Gauss-Manin connection associate to E. In this way we obtain Exercise 11. Verify the equality (20).

Modular differential equations 4.1 Introduction
After calculation of the Gauss-Manin connection of families of elliptic curves, we immediately calculate the Ramanujan and Darboux-Halphen differential equation (Proposition 7). The history of these differential equations is full of rediscoveries. The first example of differential equations which has a particular solution given by theta constants was studied by Jacobi in 1848. Later, in 1978 G. Darboux studied the system of differential equations in connection with triply orthogonal surfaces in R 3 (see [3]). G. Halphen (1881), M. Brioschi (1881), and J. Chazy (1909) contributed to the study of the differential equation (21). In particular, Halphen expressed a solution of the system (21) in terms of the logarithmic derivatives of the null theta functions, see §4.4. Halphen generalized also (21) to a differential equation with three parameters corresponding to the three parameters of the Gauss hypergeometric function. His method of calculating such differential equations is essentially described in §8.7 and it is near in spirit to the methods used in the present text. The history from number theory point of view is different. S. Ramanujan, who was a master of convergent and formal series and who did not know about the geometry of differential equations, in 1916 observed that the derivation of three Eisenstein series E 2 , E 4 and E 6 are polynomials in E i 's. Therefore, he had the solution and he found the corresponding differential equation. This is opposite to the work of Halphen who had the differential equation and he calculated a solution (the later in general is more difficult than the former). Halphen even calculated the Ramanujan differential equation years before Ramanujan and apparently without knowing about Eisenstein series (see [11] page 331). It is remarkable to say that Darboux-Halphen differential equations was rediscovered in mathematical physics by M. Atiyah and N. Hitchin in 1985. Even the author of the present text calculated Ramanujan and Darboux-Halphen differential equations independently without knowing about Ramanujan, Darboux and Halphen's work. All these rediscoveries were useful because they have helped us to understand the importance and applications of such differential equations and also to find the general context of such differential equations in related with Gauss-Manin connections and in general multi dimensional linear differential systems.

Ramanujan vector field
Our main observation in this section is the following: Proposition 7. In the parameter space of the family of elliptic curves The vector field R is given by Proof. The proof is based on explicit calculations.
Exercise 12. Perform the calculations leading to a proof of Proposition 7.

Vector field or ordinary differential equation?
Any vector field in C n represent an ordinary differential equation, for which we can study the dynamics of its solutions. For instance, the vector field R of the previous section can be seen as the following ordinary differential equation: where dot means derivation with respect to a variable. For a moment forget all what we have done to obtain R. We write each t i as a formal power series in q, t i = ∞ n=0 t i,n q n , i = 1, 2, 3 and substitute in the above differential equation. We define the derivation to be: for a fixed non zero number a. Comparing the coefficients of q 0 we have Comparing the coefficients of q 1 we have Assume that V is not zero and so we have det(M − aI 3×3 ) = (12b − a)a 2 = 0 which implies that a = 12b. We also calculate V up to multiplication by a constant: We realize that all the coefficients t i,n , n > 1 are determined uniquely and recursively: are Eisenstein series and In fact what Ramanujan did was to verify that the Eisenstein series E k , k = 1, 2, 3 satisfy an ordinary differential equation which is obtained from (24) after an affine trans- , see [22], p. 4 or [18]. Later, we will see that t k 's are convergent in the unit disc. If we set q = e 2πiz and look at t k 's as holomorphic functions in z, which varies in the upper half plane {z ∈ C | Im(z) > 0}, then they are basic examples of quasi-modular forms. Note that for b = 1 12 and a = 1 we have 2πiq ∂ ∂q = ∂ ∂z and so if we define then g k 's satisfy the Ramanujan differential equation (24), where dot means derivation with respect to z.
1. For a moment forget Proposition 8. Let t i = ∞ n=0 t i,n q n , i = 1, 2, 3 be formal power series in q with unknown coefficients as before and assume that t i satisfy the differential equation 24, where dot is 12q ∂ ∂q and we know the initial value t 1,2 = −24. Calculate the first five coefficients t k,n , k = 1, 2, 3, n = 1, 2, . . . 5 and compare them with the coefficients in the Eisenstein series.

Halphen vector field
Let us consider the family of elliptic curves considered in §3.5. A vector field with the properties (22) is given by The corresponding ordinary differential equation is satisfy the ordinary differential equation (27), where the derivation is with respect to z.

Relations between theta and Eisenstein series
As we mentioned in §3.5, the map α : T H → T R maps the Gauss-Manin connection matrix of E H to the Gauss-Manin connection matrix of E R , both written in the basis dx y , xdx y . We know that X = R or H are both determined uniquely by ∇ X dx y = − xdx y , ∇ X xdx y = 0. All these imply that the vector field H is mapped to the vector field R through the map α. Let u : H → C 3 , u(z) = (u 1 (z), u 2 (z), u 3 (z)) be the solution of H by the logarithmic derivative of theta functions. It turns out that α(u(z)) is a solution of R, and we claim that it is (g 1 , g 2 , g 3 ) defined in (26). Two solutions of (24) with the same t 1 coordinates are equal (this follows by the explicit expression of (24)). From this and the discussion in §4.3 it follows that it is enough to prove that both 1 3 (u 1 + u 2 + u 3 ) and g 1 (z) have the form 2πi 12 (1 − 24q + · · · ). Finally, we get the equalities: ) 3 E 6 (z).

Automorphic properties of the special solutions
Let us define For a holomorphic function f (z) let also define: Exercise 15. If φ i , i = 1, 2, 3 are the coordinates of a solution of R(resp. H) then φ i | 1 2 A, i = 1, 2, 3, ) are also coordinates of a solution of R (resp. H) for all A ∈ SL(2, C). The subgroup of SL(2, C) which fixes the solution given by Eisenstein series (resp. theta series) is SL(2, Z) (resp. Γ(2)) (the second part of the exercise will be verified in §8.

Another example
Let be the Dedekind's η-function. In [24] Y. Ohyama has found that satisfy the equations: We write the first four lines of the above equation as a solution to a vector field V in C 4 and let F (t 1 , t 2 , t 3 , t 4 ) be the polynomial in the fifth line. Using a computer, or by hand if we have a good patience for calculations, we can verify the equality dF (V ) = 0 and so V is tangent to T := {t ∈ C 4 | F (t) = 0}. Our discussion leads to: Exercise 16. Show that there is a family of elliptic curves E → T and a basis ω 1 , ω 2 ∈ H 1 dR (E/T ) such that ω 1 is a regular differential formal and where R is the restriction of V to T .

Introduction
We can think of an elliptic curve over rational numbers as the Diophantine equation where P is a monic degree three polynomial in x with rational coefficients and without double roots in C. In fact, this is the Weierstrass form of any elliptic curve in the framework of algebraic geometry. The moduli of elliptic curves is one dimensional and we have apparently three independent parameters in the polynomial P . It turns out that there is an algebraic group of dimension two which acts on the coefficients space of P and the resulting quotient is the moduli of elliptic curves, see §6. 3. In this section, we remark that the coefficients space of P has also a moduli interpretation. We consider elliptic curves with elements in their algebraic de Rham cohomologies and we ask for normal forms of such objects. It turns out that the three independent coefficients of the polynomial P are the coordinates system of the moduli of such enhanced elliptic curves.

Elliptic curves
Let k be a field of characteristic zero. For a reduced smooth curve C over k we define its genus to be the dimension of the space of regular differential forms on C.
Definition 1. An elliptic curve over k is a pair (E, O), where E is a genus one complete smooth curve and O is a k-rational point of E.
Therefore, by definition an elliptic curve over k has at least a k-rational point. A smooth projective curve of degree 3 is therefore an elliptic curve if it has a k-rational point. For instance, the Fermat curve is an elliptic curve over Q. It has Q-rational points [0; 1; 1] and [1; 0; 1]. However E : 3x 3 + 4y 3 + 5z 3 = 0 has not Q-rational points and so it is not an elliptic curve defined over Q. It is an interesting fact to mention that E(Q p ) for all prime p and E(R) are not empty. This example is due to Selmer (see [2,27]).

Weierstrass form
In this section we prove the following proposition: Proposition 10. Let E be an elliptic curve over a field k of characteristic = 2, 3 and let ω be a regular differential form on E. There exist unique functions x, y ∈ k(E) such that the map E → P 2 , a → [x(a); y(a); 1] gives an isomorphism of E onto a curve given by sending O to [0; 1; 0], and ω = dx y . We call x and y the Weierstrass coordinates of of E.
Proof. For a divisor D on a curve C overk define the linear system and l(D) = dimk(L(D)).
For g = 1 and D = nO we get l(D) = n. Using this for n = 2, 3, we can choose x, y ∈ k(E) such that 1, x form a basis of L(2O) and 1, x, y form a basis of L(3O). N The function x (resp. y) has a pole of order 2 (resp. 3) at O. In fact, we need the following choice of y, y := dx ω . Note that ω is regular and vanishes nowhere. The map σ : E → E, P → −P acts trivially on any x in L(2O) because σx − x has a simple pole, and hence by residue formula for (σx − x)ω, has no pole and so σx = x. We have l(6O) = 6 and so there is a linear relation between 1, x, x 2 , x 3 , y 2 , y, xy. The last two terms y, xy does not appear on such a linear relation: a point p is a non-zero 2-torsion point of E if and only if p is a double root of x − x(p) and if and only if y(p) = 0. We can further assume that the coefficient of y 2 is one and of x 3 is 4. After a substitution of x with x + a for some a ∈ k, we get the desired polynomial relation between x and y.
Proposition 11. Let E be an elliptic curve over a field k of characteristic zero and ω ∈ H 1 dR (E)\F 1 . There exist unique functions x, y ∈ k(E) such that the map E → P 2 , a → [x(a); y(a); 1] gives an isomorphism of E/k onto a curve given by sending O to [0; 1; 0] and ω = xdx y . Proof. We have a regular differential form ω 1 on E which is determined uniquely by ω 1 , ω = 1. We apply Proposition 10 for the pair (E, ω 1 ). In the corresponding Weierstrass coordinates by Proposition 2 we can write ω = t 1 dx x + t 0 xdx y , t 1 , t 0 ∈ k. Using (13) and ω 1 , ω = 1, we have t 0 = 1. We now substitute x by x − t 1 .
Exercise 17. Prove that the map E → P 2 in Proposition 10 and Proposition 11 gives an isomorphism of E onto its image.

Group structure
From now on will drop O and simply write E instead of (E, O). An elliptic curve carries a structure of an Abelian group. We explain this for a smooth cubic in P 2 .
Let E be a smooth cubic curve in P 2 and O ∈ E(k). Let also P, Q ∈ E(k) and L be the line in P 2 connecting two points P and Q. If P = Q then L is the tangent line to E at P . The line L is defined over k and it is easy to verify that the third intersection R := P Q of E(k) with L(k) is also in E(k). Define  1. Let E be an elliptic curve over k, a ∈ E(k) and f : E → E, f (x) = x + a. Prove that the induced map in the de Rham cohomology is identity.
2. For g : E → E, g(x) = nx, n ∈ N, prove that the induced map in the de Rham cohomology is multiplication by n. In fact in the Weierstrass coordinates, and using Weierstrass p function, we have the equality: This is a real equality between differential forms and not modulo exact forms.

Moduli spaces of elliptic curves
Let R = k[t 1 , t 2 , t 3 , 1 ∆ ], ∆ := 27t 2 3 − t 3 2 and T = Spec(R). Let also E be the subvariety of P 2 × T given by: be the projection on T . The differential forms dx y , xdx y form a free basis of the R-module H 1 dR (E/T ), dx y is a regular differential form on E, and dx y , xdx y = 1. The discussion in §5 leads to Proposition 12. The affine variety T is the moduli of the pairs (Ẽ, ω), whereẼ is an elliptic curve over k and ω ∈ H 1 dR (Ẽ)\F 1 .
Note that from the beginning we could work with the elliptic curve E in the Weierstrass form with t 1 = 0. We have the isomorphism For a proof see [28], Theorem 6.1 page 165.

.1 Introduction
In the present section we introduce quasi-modular forms in the framework of Algebraic Geometry. For an elliptic curve with an element in its de Rham cohomology, which is not represented by a regular differential form, we can associate three quantities t 1 , t 2 , t 3 which appear in Weierstrass form of E, see Proposition 11. These quantities satisfy a simple functional property with respect to the action of an algebraic group which turn them our first examples of quasi-modular forms. These are algebraic version of the Eisenstein series. In fact, we can describe the algebraic version of all Eisenstein series by using residue calculus, see §6.7. For future applications, we introduce quasi-modular forms for the elliptic curves enhanced with certain torsion elements structure.

Enhanced elliptic curves
Let N be a positive integer. An enhanced elliptic curve for Γ 0 (N ) is a 3-tuple (E, C, ω), where E is an elliptic curve over k, C is a cyclic subgroup of E(k) of order N and ω is an element in H 1 dR (E)\F 1 . An enhanced elliptic curve for Γ 1 (N ) is a 3-tuple (E, Q, ω), where E, ω are as before and Q is a point of E(k) of order N . Let us fix a primitive root of unity of order N in k, say ζ. An enhanced elliptic curve for Γ(N ) is a 3-tuple (E, (P, Q), ω), where E, ω are as before and P and Q are a pair of points of E(k) that generates the N -torsion subgroup E[N ] with Weil pairing e N (P, Q) = ζ. For the definition of Weil pairing see Chapter 3, Section 8 of Silverman [28].
Note that the choice of ω ∈ H 1 dR (E)\F 1 determines in a unique way an element ω 1 ∈ F 1 (ω 1 is a differential form of the first kind) with ω 1 , ω = 1. In this way, ω 1 , ω form a basis of the k-vector space H 1 dR (E). In a similar way we can define a family of enhanced elliptic curves (see [12], Chapter III, Section 10).
In the case N = 1 an enhanced elliptic curve becomes a pair (E, ω), ω ∈ H 1 dR (E)\F 1 . In §5.5 we constructed the moduli space of such pairs: is an isomorphism. Under this isomorphism the action of the algebraic group G is given by Proof. The first part follow from Proposition 12. The proof of the second part is as follows: We first prove (48). Let This implies that α induces an isomorphism of elliptic curves Since α * xdx y = k xdx y − k ′ dx y we get the result.

Quasi-modular forms
A quasi-modular form f of weight m and differential order n for Γ is a function T Γ → k with the following properties: 1. With respect to the action of G m , f satisfies 2. With respect to the action of G a , f satisfies the following condition: there are functions f i : T Γ → k, i = 0, 1, 2, . . . , n such that 3. (Growth condition) Let π : E → T be a family of elliptic curves over k, with possibly singular fibers, and S ⊂ T be a subvariety of T such that the induced mapẼ →T , whereẼ := E\π −1 (S) andT := T \S, is the underlying morphism of an enhanced family, say (Ẽ, * , ω) with the torsion structure * and ω ∈ H 1 dR (Ẽ/T ). The function f induces a mapT (k) → k. We assume the following growth condition for f : for E → T and the torsion structure * fixed as above, there is ω such thatT (k) → k extends to a function T (k) → k. In other words, we may change ω in order to guarantee the extension ofT (k) → k.
The variety S contains the loci of all closed points t ∈ T (k) such that either E t is singular or ω | Et is a differential form of the first kind or zero or some degeneracy occurs on the torsion point structure of E t .
We denote by M n m (Γ) the set of quasi-modular forms of weight m and differential order n and we set When there is no confusion we drop Γ and simply write M = M (Γ) and so on. If n ≤ n ′ then M n m ⊂ M n ′ m and We see that M has a structure of a graded k-algebra, the degree of the elements of M n m is m.
For n = 0 we recover the definition of modular forms of weight m. A modular form of weight m is a function from the set of enhanced elliptic curves as before but with this difference that ω ∈ F 1 is a regular differential form and not an element in H 1 dR (E)\F 1 . The action of G m is given by ( * , * , ω) • k = ( * , * , kω) and f satisfies f • k = k −m f, k ∈ G m and the growth condition as above (see Exercise 1 at the end of this section).
1. There is a canonical bijection between modular forms of weight m and quasi-modular forms of weight m and differential order 0.
2. Verify that f i is a quasi-modular form of weight m − 2i and differential order n − i.
In particular, f n is a modular form of weight m − 2n.
3. Show that the family mentioned in Exercise 16 is the universal family of enhanced elliptic curves for Γ(3).

Full quasi-modular forms
Let us consider again the case N = 1. In this case a quasi-modular form for Γ is also called a full quasi-modular form. Using Proposition 14, any full quasi modular formal turns out to be a regular function on Spec(k[t 1 , t 2 , t 3 ]), that is, a polynomial in t 1 , t 2 , t 3 and with coefficients in k. Using the same theorem, we know that t i , i = 1, 2, 3 is a quasi-modular form of weight 2i and differential order 1 for t 1 and 0 for t 2 and t 4 . This proves: Proposition 15. The k-algebra of full quasi-modular forms is isomorphic to The k-algebra of full quasi-modular forms has also a differential structure which is given by: ∂t i is the Ramanujan vector field. We sometimes use R : M → M to denote this differential operator.
In a similar way, the family y 2 − 4(x − s 1 )(x − s 2 )(x − s 3 ) = 0 is the universal family for the moduli of 3-tuple (E, (P, Q), ω), where E, ω are as before and P and Q are a pair of points of E(k) that generates the 2-torsion subgroup E[N ] with Weil pairing e(P, Q) = −1. The points P and Q are given by (s 1 , 0) and (s 2 , 0). In this case each s i , i = 1, 2, 3 is a quasi-modular form of weight 2 and differential order 1. They generate the algebra M (Γ(2)) freely. The corresponding differential structure is defined by the Halphen vector field.

Algebraic closure of the field of full quasi-modular forms
In this section we assume that k is algebraically closed. Let f ∈ M n m (Γ) be a quasi-modular form for a congruence group Γ. Recall that for Γ = SL(2, Z) we write T = T Γ . Using f we define full quasi-modular forms f i , i = 1, 2, . . . , a := Γ\SL(2, Z) of weight mi and differential order ni in the following way: where * 1 , * 2 , * 2 , . . . , * i runs through i-tuple of torsion structures attached to Γ. From Proposition 15 it follows that and f is a root of the polynomial Exercise 20. The algebra M (Γ(2)) is freely generated by three quasi-modular form s 1 , s 2 , s 3 of weight 2 and differential order 1. Show that the above polynomial for each s i is

Eisenstein modular forms
Let E be an elliptic curve over k and ω ∈ H 1 dR (E)\F 1 . We take the Weierstrass coordinates of the pair (E, ω) as we have described it in Proposition 11. Let also t be a coordinate system around the point O, for instance take t = x y . We have dx y = P dt for some regular function in a neighborhood of O. Let us write the formal series of P at O and then write it as a derivation of some other formal power series Q(t). Therefore, dx y = dz, z := Q(t) ∈ R{t}, We call z the analytic coordinate system on E. Note that the first coefficients in t 3 y, t 2 x are invertible and so Q(t) has coefficients in R.

Proposition 16.
We have Proof. We have z = Q(t) = −2t + O(t 2 ) and write t in terms of z, that is, t =Q(z) = −1 2 z + O(z 2 ). Note that Q ∈ R{t} and soQ ∈ R{z}. We write x in terms of z and we have: The elliptic curve E is invariant under the involution (x, y) → (x, −y). The coordinates t and z are mapped to −t and −z, respectively, and x is invariant. This implies that g k = 0 for all odd integers k. Calculating g 0 , g 2 we see that g 0 = g 2 = 0. The expansion of y follows from the equality dx = ydz.
We denote this modular form with G 2k+2 and we call it the Eisenstein modular form of weight 2k + 2.
Proof. The third property in the definition of a quasi-modular form follows from the fact that in the process of defining G 2k+2 , all the coefficients are in R. For k ∈ G a , the Weierstrass coordinates system of (E, ω) • k is (x + k, y) and so dx y does not change. This implies that g 2k+2 's are invariant under the action of G a . For k ∈ G m , the Weierstrass coordinates system of (E, ω) • k is (x,ỹ) = (k −2 x, k −3 y). In this coordinates systemt = kt andz = kz which give us the desired functional property of g 2k+2 's with respect to the action of G m . Exercise 21. Show the last piece of the proof of Proposition 16, that is, g 0 = g 2 = 0. Calculate G 4 and G 6 .
7 Quasi-modular forms over C

Introduction
The name quasi-modular form seems to appear for the first time in the work [14] of M. Kaneko and D. Zagier. In this article they give a direct proof for a formula stated by R. Dijkgraaf in [5] which deals with counting ramified covering of elliptic curves, see §B.1. In fact if we want to extend the algebra of full modular forms to an algebra which is closed under the canonical derivation then we naturally suspect the existence of the Eisenstein series E 2 . The full functional equation can be derived by consecutive derivations of the functional equation of a modular form. This is the way in which the author of the present text rediscovered all these, see [19], and for this reason called them differential modular forms.
The classical modular or quasi-modular forms are holomorphic functions on the Poincaré upper half plane which satisfy a functional property with respect to the action of a congruence subgroup of SL(2, Z) on H and have some growth condition at infinity. The aim of of this section is to show that what we we have developed so far in the context of algebraic geometry is essentially the same as its complex counterpart. The bridge between two notions is the period map which is constructed by elliptic integrals.

Quasi-modular forms
In this section we recall the definition of quasi/differential modular forms. For more details see [18,19]. We use the notations A = a A b A c A d A ∈ SL(2, R) and When there is no confusion we will simply write A = a b c d . We denote by H the Poincaré upper half plane and For A ∈ GL(2, R) and m ∈ Z we use the slash operator Let Γ be a subgroup of SL(2, Z). For instance, take a congruence group of level N . This is by definition any subgroup Γ ⊂ SL(2, Z) which contains: It follows that Γ has finite index in SL ( 2. f i | m A, i = 0, 1, 2, . . . , n have finite growths when Im(z) tends to +∞ for all A ∈ SL(2, Z). The set M is a bigraded differential C-algebra: It is useful to define The equality (37) is written in the form Using this we can prove that the growth at infinity condition on f is a finite number of conditions for f || m α, α ∈ Γ\SL(2, Z). The relation of || m with d dz is given by:

q-expansion
Let us assume that there is h ∈ N such that Take h > 0 the smallest one. Recall that Γ is a normal subgroup of SL (2, Z). For an f ∈ M n m (Γ) and A ∈ SL(2, Z) with [A] = α ∈ Γ\SL(2, Z) we have (f || m A)| m T h = f and so we can write the Fourier expansion of f || m A at α f || m A = +∞ n=0 a n q n h , a n ∈ C, q h := e 2πihz .
We have used the growth condition on f to see that the above function in q h is holomorphic at 0.

Period domain
Quasi-modular forms are best viewed as holomorphic functions on the period domain We let the group SL(2, Z) (resp. G in (33) with k = C) act from the left (resp. right) on P by usual multiplication of matrices. The Poincaré upper half plane H is embedded in P in the following way: We denote byH the image of H under this map. Note that any element of P is equivalent to an element ofH under the action of G because:

The map
is an automorphy factor, that is, it satisfies the functional equation: This follows from the equality Proposition 18. Quasi-modular forms f ∈ M n m are in a one to one correspondence with holomorphic functions F = φ(f ) : P → C with the following properties: 2. There are holomorphic functions F i : P → C, i = 0, 1, . . . , n such that 3. For all α ∈ SL(2, Z) the restriction of F i toH α has finite growth at infinity, wherẽ H α is be the image ofH under the action of α from the left on P.
In fact we have F i = φ(f i ). It is a mere calculation to see that the vector field (44) is invariant under the action of SL(2, Z) and hence it induces a vector field in the quotient Γ\P. Now, viewing quasi-modular forms as functions on Γ\P, the differential operator is given by the vector field X.

Elliptic integrals 8.1 Introduction
The study of multiple integrals requires an independent study of their domain of integration. For the elliptic integral (1) we have apparently five different domain of integration: a 1 ], [a 1 , a 2 ], [a 2 , a 3 ], [a 3 , +∞], where a 1 , a 2 , a 3 are three consecutive roots of P . However, the complexification and then the geometrization process of such integrals, showed that if we fix the integrand ω then all such integrals can be written in terms of just two of them. All such integrals up to some constants, which can be calculated effectively, can be written in the form δ ω, where δ is an element in the homotopy group G := π 1 (E, b) of the elliptic curve E : y 2 = P (x) with a base point b ∈ E. The integral is zero over the group [G, G] generated by the commutators of G, that is, elements of the form δ 1 δ 2 δ −1 1 δ −1 2 , and so we can choose δ from the first homology group: The homology group H 1 (E, Z) is a Z-module of rank two and in this way we get our affirmation. This simple observation can be considered as the beginning of singular homology. H. Poincaré in his book named Analysis Situs founded the Algebraic Topology and if we look more precisely for his motivation, we find his articles on multiple integrals. E. Picard was a first who wrote the treatise Théorie des fonctions algébriques de deux variables indépendantes on double integrals. For him the study of the integration domain was justified by the study of integrals, but after him and in particular for S. Lefschetz, it was done as an independent subject. The classical theorems of Lefschetz on the topology of algebraic varieties are an evidence to this fact. One of the beautiful topological theories which arose from the study of elliptic and multiple integrals is the so called Picard-Lefschetz theory. A brief description of this is done in §8.2. It can be considered as the complex counterpart of Morse theory, however, it is older than it. In families of elliptic curves that we consider the topology is fixed, all elliptic curves are tori. However, some interesting phenomena happens when we turn around degenerated elliptic curves. This is described by Picard-Lefschetz theory. It says that when we are dealing with families of elliptic curves, SL(2, Z) and its subgroups are there, even we do not mention them explicitly.
I have avoided to use Weierstrass uniformization theorem for elliptic curves. Instead, I have tried to use Hodge theoretic arguments in order to derive many statements which follow from it. The main reason for this is the possibility of the generalizations for other type of varieties. For an introduction to Hodge theory (Hodge structures, period maps, Torelli problem and etc.) the reader is referred to the books of C. Voisin (2003). In §8.5 we describe how Eisenstein series appear in the inverse of the period map. The case of E 4 and E 6 follow from the Weierstrass uniformization theorem, however, the case of E 2 is not covered by this theorem. In order to calculate the q-expansion of a quasi modular form we need first its differential equation and second, its first coefficients. In order to calculate such coefficients we need to write down the Taylor series of elliptic integrals in a degenerated elliptic curve. Doing this, we get the formulas of elliptic integrals in terms of hypergeometric functions (see 8.6) and immediately after, we give another characterization of the Ramanujan differential equation in terms of hypergeometric functions (see §8.7). This is in fact the method which G. Halphen used to derive a differential equation depending on three parameters of the Gauss hypergeometric function. We also get the Schwarz map whose image gives us the well-known triangulation of the upper half plane such that each triangle is a fundamental domain for SL (2, Z). The bridge between the analytic and algebraic versions of quasi-modular forms is the notion of period map constructed from elliptic integrals (see §8.4). In this section we also explain this. a 1 ], [a 1 , a 2 ], [a 2 , a 3 ], [a 3 , +∞] and a 1 , a 2 , a 3 are three consecutive roots of P in terms of two of them.

The monodromy group
In the framework of algebraic geometry, the arithmetic group SL(2, Z) is hidden and it appears as the monodromy group of the family of elliptic curves E t over C. In order to calculate such a monodromy group we need a machinery called Picard-Lefschetz theory. See for instance [1] for the local version of such a theory and see [16] for a global version.
The elliptic curve E t , t ∈ T given by (32) as a topological space is a torus and hence H 1 (E t , Z) is a free rank two Z-module. Smooth variations of t, gives us the monodromy representation where b is a fixed point in T . We would like to calculate the image of the monodromy representation in a fixed basis of δ 1 , δ 2 of H 1 (E b , Z). A classical way for choosing such a basis is given by the Picard-Lefschetz theory. Fix the parameters t 1 and t 2 = 0 and let t 3 varies. Exactly for two valuest 3 ,ť 3 = ± t 3 2 27 of t 3 , the curve E t is singular. In E b − {∞} we can take two cycles δ 1 and δ 2 such that δ 1 , δ 2 = 1 and δ 1 (resp. δ 2 ) vanishes along a straight line connecting b 3 tot 3 (resp.ť 3 ). The corresponding anti-clockwise monodromy around the critical valuet 3 (respť 3 ) can be computed using the Picard-Lefschetz formula: The canonical map π 1 (C\{t 3 ,ť 3 }, t) → π 1 (T, t) induced by inclusion is a surjection and so the image of π 1 (T, t) under the monodromy representation is Let us explain the above topological picture by the following one parameter family of elliptic curves: For b a real number between 2 and −2 the elliptic curve E b intersects the real plane R 2 in two connected pieces which one of them is an oval and we can take it as δ 2 with the anti clockwise orientation. In this example as ψ moves from −2 to 2, δ 2 is born from the point (−1, 0) and ends up in the α-shaped piece which is the intersection of E 2 with R 2 . The cycle δ 1 lies in the complex domain and it vanishes on the critical point (1, 0) as ψ moves to 2. It intersects each connected component of E b ∩ R 2 once and it is oriented in such away that δ 1 , δ 2 = 1.
Exercise 23. Discuss the details of the content of the present section. If we fix t 1 and t 3 and let t 2 vary then we get three critical curves. Describe the monodromy around each fiber.

Hodge structure of elliptic curves
Let E be an elliptic curves over C. We can regard E as a complex manifold and so we have de Rham cohomologies of H i dR (E), i = 0, 1, 2 defined using C ∞ and C-valued differential forms. In the C ∞ context we have also the wedge product H 1 dR (E) × H 1 dR (E) → H 2 dR (E) bilinear map and the isomorphism The 2πi factor is there, because in this way the above isomorphism is the complexification of an isomorphism of Z-modules H 2 (E, Z) ∼ = Z. The translation of all these in the algebraic context is done in §2 and we leave it to the reader the details of comparison of algebraic and C ∞ contexts. For this and the details of what we are going to describe the reader is referred to the classical Book of Griffiths and Harris (1978) or to the two volume book of C. Voisin (2002) on Hodge theory. There is a one dimensional subspace F 1 ⊂ H 1 dR (E) which is spanned by regular differential forms on E. We have the complex conjugation in H 1 dR (E) and it turns out that F 1 ∩ F 1 = {0} and so H 1 dR (E) = F 1 ⊕ F 1 , which is called the Hodge decomposition. The bilinear map ·, · constructed in §2.10 turns out to be ·, · : It satisfies the following inequality From all these we want to conclude two well-known facts about elliptic integrals.

We have
Proof. The first part follows, for instance, from [28], Proposition 5.2. The second part is known as Legendre relations between elliptic integrals, see for instance [28], Exercise 6.4 d. We give another proof of all these based on de Rham cohomology arguments presented in this section. Letδ i ∈ H 1 (E t , Z), i = 1, 2 be the Poincaré dual of δ i , that is, δδ i = δ, δ i for all δ ∈ H 1 (E, Z). The bilinear map ·, · in cohomology is dual to the intersection linear map in cohomology and so δ 1 ,δ 2 = 1. In the de Rham cohomology H 1 dR (E) we have We use this for ω = dx y and we see that the inequality (45) is equivalent to the first part of the proposition. The second part follows from Exercise 24. Discuss in more details the material of the present section.

Period map
Recall the notations of §6 for the base field k = C. Recall also that that for Γ = SL(2, Z) we have . If Γ is one of Γ(N ), Γ 1 (N ), Γ 0 (N ) then we know that the projection map β : T Γ → T (neglecting the torsion point structure) is a covering of degree Γ\SL(2, Z) (see Exercise 25) and so T Γ has a natural structure of a complex manifold. We define R Γ to be the pull-back of the Ramanujan vector field in T Γ .
Let us fix b ∈ T Γ and a basis δ 0 1 , δ 0 2 of the Z-module H 1 (E β(b) , Z) with δ 0 1 , δ 0 2 = 1. For any path γ which connects b to an arbitrary point t ∈ T Γ we define δ 1 , δ 2 ∈ H 1 (E t , Z) to be the monodromy of δ 0 1 and δ 0 2 along the path γ. The period map is defined by pm(t • g) = pm(t) · g, t ∈ T Γ , g ∈ G; 3. The push forward of the vector field −R Γ by the period map pm is the vector field X in (44).
Proof. It is enough to prove the Proposition for Γ = SL(2, Z) (Exercise 25, 4). The equality (48) follows from Proposition 14. The last statement follows from Proposition 6 and (16) as follows: We have used the notation pm = x 1 x 2 x 3 x 4 . Using the equality (17), (47) we have: is the Gauss-Manin connection in the basis in Proposition 6. Using (46) we conclude that pm is a local biholomorphism.

Inverse of the period map
In this section we consider the case Γ = SL(2, Z). Let We have inserted mines sign because at the end of this section it will turn out that g i 's are given by (26). Here, pm −1 is the local inverse of the period map, however, since H is simply connected, g is a well-defined one valued holomorphic function on H. For a moment, we assume that the period map is a global biholomorphism. From Proposition 20 part 2 it follows that g i 's satisfy From Proposition 20 part 3 it follows also that g is a solution of the vector field R, that is, Since 1 1 0 1 ∈ SL(2, Z), the functions g i are invariant under z → z + 1, and so, they can be written in terms of the new variable q = e 2πiz . Later, we will prove that g i 's have a finite growth at infinity and hence as functions in q are holomorphic at q = 0.

Hypergeometric functions
Let us consider the following one parameter family of elliptic curves E ψ : y 2 − 4x 3 + 12x − 4ψ = 0 and the cycles δ 1 , δ 2 ∈ H 1 (E ψ , Z) described in §8.2: for ψ a real number between −2 and 2, δ 2 is the oval vanishing in (−1, 0) and δ 1 ∈ H 1 (E ψ , Z) vanishes on the nodal point (1, 0). Whenever we need to emphasize that δ i , i = 1, 2 depends on ψ we write δ i = δ i (ψ). The cycles δ i , i = 1, 2 form a basis of H 1 (E ψ , Z) and it follows from Proposition 6 and the equality (17) that the matrix xdx y forms a fundamental system of the linear differential equation: that is, any solution of (51) is a linear combination of the columns of Y . This example shows a little bit historical aspects of the Gauss-Manin connection. From (51) it follows that the elliptic integral δ 2 dx y (resp. δ 2 xdx y ) satisfies the differential equation which is called a Picard-Fuchs equation. We make a linear transformation which sends the singularities ψ = −2, 2 of (51) to τ = 0, 1. We write (51) in the variable τ . The integrals δ 2 dx y and δ 2 xdx y are holomorphic around τ = 0. We write X := [ δ 2 dx y , δ 2 xdx y ] tr as a formal power series in τ X = ∞ i=0 Y i τ i , substitute it in (51) and obtain a recursive formula for Y i 's. We also obtain Y 0 = [a 0 , −a 0 ] tr , where a 0 is the value of δ 2 dx y at ψ = −2. This must be calculated separately. The intersection of the elliptic curve E ψ , −2 < ψ < 2 with the real plane R 2 has two connected component, one of them is δ 2 and the otherδ 2 is a closed path in E ψ which crosses the point at infinity [0; 1; 0]. It turns out that if we give the clockwise orientation toδ 2 then it is homotop to δ 2 in E ψ and Note that for ψ a real number near −2, by Stokes formula we have δ 2 dx y = ∆ 2 dx∧dy y 2 > 0, where ∆ 2 is the region in R 2 bounded by δ 2 , and so we already knew that a 0 ≥ 0. This explain the fact that why δ 2 is homotop to clockwise orientedδ 2 . The result of all these calculations is: is the Gauss hypergeometric function and (a) n := a(a + 1)(a + 2) · · · (a + n − 1). Let us now calculate the integrals δ 1 x i dx y , i = 0, 1. We have the isomorphism E −ψ → E ψ , (x, y) → (−x, iy) which sends the cycle δ 2 (−ψ) to δ 1 (ψ) and δ 1 (−ψ) to −δ 2 (ψ). This gives us the equalities: x j dx y Finally, we have calculated all the entries of Y : The monodromy around τ = 0 leaves δ 2 invariant and takes δ 1 to δ 1 + δ 2 . From this it follows that for a fixed complex number a: (55) where f is a one valued function in a neighborhood of τ = 0. From Exercises 26,4 it follows that f is holomorphic at τ = 0. We choose a in such a way that the value of f at τ = 0 is 0. This is equivalent to the following formula for a: According to Exercise 26, 4 we have a = 1 432 .
We write f = ∞ i=1 f n τ n and substitute (55) in the Picard-Fuchs equation (53) and we obtain the following recursion for f n 's: We will need the value f 1 = 13 18 . Exercise 26.
2. The integrals δ 2 dx y and δ 2 xdx y are holomorphic at τ = 0. 3. Do the details of the calculations which lead to the equalities (53).

Periods and Ramanujan
In this section consider the full modular group Γ = SL(2, Z) and the corresponding period map. We are interested in the image L of the map g constructed in §8.5. This is the locus L of parameters t ∈ T such that: Using Proposition 20, part 2 and and the equality (42), we know that the locus of such parameters is given by: The mentioned locus is one dimensional and the above parametrization is by using three parameters t 1 , t 2 , t 3 . We may restrict it to a one dimensional subspace t = (0, 12, −4ψ) as in §8.6, use the formulas of elliptic integrals in terms of hypergeometric functions (53) and obtain the following parametrization of L: where (a 1 , a 2 , a 3 ) = ( 2πi 12 , 12( 2πi 12 From ∇ R xdx y = 0 and (56) it follows that L is tangent to the vector field R. In other words, it is a leaf of the foliation induced by R. Since the period map sends R to −X, and the canonical map H → P sends ∂ ∂z to X, we conclude that I i 's can be written in terms of the new variable that is (I 1 , I 2 , I 3 ) = (−g 1 (z), g 2 (z), −g 3 (z)), where (g 1 , g 2 , g 3 ) : H → C 3 is given in §8.5. Let us define We get the equalities: ), ).

Torelli problem
In Hodge theory the global injectivity of the period map is known as global Torelli problem.
As the reader may have noticed we need only the local injectivity of the period map in order to extract quasi-modular forms from the inverse of the period map. The period map pm in §8.4 is a global biholomorphism if and only if the induced map p : T /G → SL(2, Z)\P/G ∼ = SL(2, Z)\H is a biholomorphism. The last statement follows from Weierstrass uniformization theorem. We give another proof based on a q-expansion argument. The quotient SL(2, Z)\H has a canonical structure of a Riemann surface such that the map p is a local biholomorphism. Let U be a subset of SL(2, Z)\H containing all z with Im(z) > 1. The map where D(0, r) is a disk in C with center 0 and radius r, is a coordinate system around each point of U . Using this mapS := SL(2, Z)\H ∪ {∞} becomes a compact Riemann surface, where the value of the above coordinate at ∞ is q = 0. From another side T /G admits also the canonical compactification T /G := C 3 /G which is obtained by adding the single point p = {∆ = 0}/G to T /G. A coordinate system around p for T /G is given by (C, 0) → T /G, τ → (0, 12, −4(4τ − 2)) (recall the one parameter family of elliptic curves in §8.6). The map p written in these coordinates is This is an invertible map at τ = 0. This implies that p extends to a local biholomorphism T /G →S without critical points. Since both the image and domain of this map are compact Riemann surfaces of genus zero, we conclude that p is a global biholomorphism.

q-expansion
The subgroup of SL(2, Z) which leaves the set { z −1 1 0 | z ∈ H} invariant is generated by the matrix 1 1 0 1 , therefore, the variable q gives us a biholomorphism between the imageH of H in SL(2, Z)\P and the punctured disc of radius one. In other words, q is a global coordinate system onH. Therefore, we can write g i 's of §8.7 in terms of q: where p : (C, 0) → (C, 0) is the map given by (58). It follows that g i as a function in q is one valued and holomorphic in the disc of radius one and center 0. If we write g i as a formal Laurent series in q, and substitute in (57), then we get a recursion for the coefficients of g i 's. There is a better way to calculate such formal power series. We calculate the first two coefficients of g 1 as above: The g i = a i E i 's as formal power series satisfy the Ramanujan differential equation (24) and so according to discussion in §4.3, we can calculate all the coefficients of E i knowing the initial values 1 and −24 as above and the recursion given by (24).

Schwarz map
The multivalued function is called the Schwarz map. We summarize its global behavior in the following proposition: and consider the branch of the Schwarz map in U which has pure imaginary values in 0 < τ < 1 2 . Its image is the interior of the classical fundamental domain of the action of SL(2, Z) in H depicted in Picture (2). Its analytic continuation result in the triangulation of H as in Picture (2).
Basic ingredients of the proof are the global injectivity of the period map discussed in §8.8 and the following exercise: Exercise 27. Let p be the branch of the Schwarz map described in Proposition 21. Prove the following: 1. lim τ ∈R, τ →0 + p(τ ) = +∞.

2.
|p( 4. The analytic continuation of p from the upper half (resp. lower half ) of C to R − has the constant real part 1 2 (resp. − 1 2 ).

Comparison theorem
Now, we are in a position to prove that the algebraic and analytic notions of quasi-modular forms are equivalent.
Theorem 1. The differential graded algebra of quasi-modular forms in the Poincaré upper half plane together with the differential operator d dz is isomorphic to the graded differential algebra of quasi-modular forms defined in §6 together with the differential operator R Γ .
Proof. According to Proposition 18, quasi modular forms can be viewed as functions on Γ\P. Now, the period map which is a biholomorphism gives us the desired isomorphism of algebras.

A Quasi-modular forms as sections of jet bundles
In this appendix we explain the geometric interpretation of quasi-modular forms in terms of sections of jet bundles of tensor powers of line bundles on the moduli of elliptic curves. The main ingredients of this appendix are taken from a private communication with Prof. P. Deligne. We leave to the reader the comparison of the material of this appendix with Lee's article [17] and in particular the notion of quasi-modular polynomial. For simplicity, we work with elliptic curves over C.
Let Γ ⊂ SL(2, Z) be one of the modular groups Γ 0 (N ), Γ(N ), Γ 0 (N ). As we noticed M = Γ\H is the moduli space of elliptic curves over C with a certain torsion structure. Let G be any algebraic group, for instance take G the multiplicative group (C * , ·) or the group (33) for k = C. We usually identify G with a linear subgroup of GL(n, C), for some n ∈ N, and hence assume that G acts on C n . A G-automorphy factor on H is a map: Any G-automorphy factor gives us a G-vector bundle on M and vice verse: the quotient gives us a G-bundle in M . For G = (C * , ·) we get line bundles on M . Holomorphic functions f : H → C n with the functional equation are in one to one correspondence with holomorphic sections of the G-bundle associated to the automorphy factor j.
For z ∈ H we have the elliptic curve C/ 1, z and the one dimensional vector space Cdτ , where τ is the canonical coordinate on C. This can be also identified with Lie(E) ∨ , the linear dual of the Lie algebra of E, that is, the linear dual of the tangent space of E at 0 ∈ E. This gives us a line bundle, say it ω. The corresponding automorphy factor is given by For a vector bundle F → M over a complex manifold M , the n-th jet bundle J n F of F is defined as follows: the fiber J n F x of J n F at x ∈ M is defined to be the set of sections of F in a neighborhood of x modulo those which vanish at x of order n. In other words, J n F x is the set of Taylor series at x of the sections of F up to order n. A section of J n F in a small open set U ⊂ M with a coordinate system (z 1 , z 2 , . . . , z m ) is a sum 0≤k 1 ,k 2 ,...,km≤n f k 1 ,k 2 ,...,km (z)(w 1 − z 1 ) k 1 (w 2 − z 2 ) k 2 · · · (w m − z m ) km , where f k 1 ,k 2 ,...,km (z) are holomorphic sections of F in U and w is an extra multi variable.
Let M := Γ\H and ω m := ω ⊗ ω ⊗ · · · ⊗, m times, be as before. A section of J n ω m corresponds to a sum where f i 's are holomorphic functions on H such that F (Az, Aw) = F (z, w)j(A, w) m + O((Aw − Az) n+1 ).
We perform i-times the derivation ∂ ∂(Aw) = (cw + d) 2 ∂ ∂w in both sides of the above equality and then put w = z. We get functional equations for f i 's: Here f = f 0 and we redefine the derivation of f i 's: ∂f i ∂z := f i+1 (the derivation in other terms is the usual one). Neglecting the growth condition for f i 's we conclude that f i is a quasi-modular form of weight m + 2i and differential order i.
We discuss briefly the growth condition.
1. The automorphy factor associated to ω and Ω are respectively j and j 2 , where j is given by (59).
2. The cohomology bundle H on Γ\H associates to each point z ∈ Γ\H the two dimensional vector space H 1 (C/ 1, z , C). We have a canonical inclusion ω ⊂ H and an isomorphism of bundles H/ω ∼ = ω −1 .

B Examples of quasi-modular forms as generating functions
The field Q(E 2 , E 4 , E 6 ) generated by three Eisenstein series

B.1 Ramified elliptic curves
Let E be a complex elliptic curve and let p 1 , . . . , p 2g−2 be distinct points of E, where g > 1. We will discuss the case g = 1 separately. The set X g (d) of equivalence classes of holomorphic maps φ : C → E of degree d from compact connected smooth complex curves C to E, which have only one double ramification point over each point p i ∈ E and no other ramification points, is finite. By the Hurwitz formula the genus of C is equal to g. Define  For g = 1 we do note have ramification points and for φ : C → E as before, Aut(φ) consists of translations by elements of φ −1 (0) and so #Aut(φ)) = d. Therefore, d · N d,1 = i|d i is the number of group plus Riemann surface morphisms C → E of degree d. In this case we have the contribution of constant maps which is given by N 1,0 log q = − 1 24 log q. Therefore, Exercise 29. Calculate N 2,2 and N 3,3 from the formulas for F 2 (q) and F 3 (q) respectively and prove that in fact they satisfy (63).

B.2 Elliptic curves over finite field
For an elliptic curve E over a finite field F q , q = p n and p a prime number, a theorem of Hasse tells us that there is an algebraic integer α ∈Q with |α| = √ q and such that #E(F q ) = q + 1 − (α +ᾱ).
See the article of van der Geer [30] for more history behind this phenomenon.

B.3 Monstrous moonshine conjecture
We write the q expansion of the j-function In 1978 MacKay noticed that 196884 = 196883+1 and 196883 is the number of dimensions in which the Monster group can be most simply represented. Based on this observation J.H. Conway and S.P. Norton in 1979 formulated the Monstrous moonshine conjecture which relates all the coefficients in the j-function to the representation dimensions of the Monster group. In 1992 R. Borcherds solved this conjecture and got fields medal. See [7] for more information on this conjecture.

B.4 Modularity theorem
Let E be an elliptic curve defined by the equation g(x, y) = 0, where g is a polynomial with integer coefficients and with the discriminant ∆ = 0. For instance, take a 2 and a 3 integers with ∆ := a 3 2 − 27a 2 3 = 0 and let E : y 2 = 4x 3 − a 2 x − a 3 . Let also p be a prime, N p be the number of solutions of E working modulo p and a p (E) := p − N p (we have not counted the point at infinity [0; 1; 0]). A version of modularity theorem says that there is an element f = ∞ n=0 a n q n in the algebraic closure of Q(E 4 , E 6 ) such that a p = a p (E) for all primes p |∆. In fact f is a cusp form of weight 2 associated to some Γ 0 (N ). Here, N is the conductor of E. This was originally known as Taniyama-Shimura conjecture and it is solved by A. Wiles, R. Taylor, C. Breuil, B. Conrad, F.Diamond. For further information see [4]. As an example consider E : y 2 + y = x 3 − x 2 . This has conductor N = 11. The corresponding modular form is η(q) 2 η(q 11 ) 2 = q − 2q 2 − q 3 + 2q 4 + q 5 + 2q 6 − 2q 7 − 2q 9 − 2q 10 + q 11 − 2q 12 + 4q 13 + · · · , where η(q) = q

B.5 Rational curves on K3 surfaces
A K3 surface by definition is a simply connected complex surface with trivial canonical bundle. Projective K3 surfaces fall into countable many families F k , k ∈ N. A surface in F k admits a k-dimensional linear system |L| of curves of genus k. A curve C in |L| depends on k-parameters and so if we put k conditions on that curve, we would get an isolated curve and so we can count the number of such curves. For instance take k = n+g, n, g ∈ N and assume that C passes through g generic fixed points and it is singular with n nodal singularities (and hence the geometric genus of C is g). In fact for a generic K3 surface the number N n (g) of such curves turns out to be finite. The generating function for the numbers N n (0), that is the number of rational curves in the linear system |L|, was first discovered by Yau-Zaslow (1996), Beauville (1999) and Göttsche (1994): = 1+ 24q + 324q 2 + 3200q 3 + 25650q 4 + 176256q 5 + 1073720q 6 + · · · (by definition N 0 (0) = 1). For instance, a smooth quadric X in P 3 is K3 and for such a generic X the number of planes tangent to X in three points is 3200. For arbitrary genus g we have the following generalization of Bryan-Leung (1999): ∞ n=0 N n (g)q n = ( −1 24 Some first coefficients for g = 1 and g = 2 are given respectively by 1 + 30q + 480q 2 + 5460q 3 + · · · , 1 + 36q + 672q 2 + 8728q 3 + · · · .