"A good stock of examples, as large as possible, is indispensable for a thorough understanding of any concept, and when I want to learn something new, I make it my first job to build one." – Paul Halmos

The man who knew elliptic integrals, prime number theorems, and black holes

I went to see The Man Who Knew Infinity yesterday. I have nothing much to say about the movie as a movie that wasn’t already said in Scott Aaronson‘s review, except that I learned a few fun facts during the Q&A session with writer/director Matthew Brown afterwards. Namely, it’s a little surprising the movie was able to get high-profile stars like Dev Patel and Jeremy Irons on board given that it was made on a relatively low budget. Apparently, Dev Patel signed on because he really wanted to popularize the story of Ramanujan, and Jeremy Irons signed on because he was hooked after being given a copy of Hardy’s A Mathematician’s Apology.

(Disclaimer: this blog does not endorse any of the opinions Hardy expresses in the Apology, e.g. the one about mathematics being a young man’s game, the one about pure math being better than applied math, or the one about exposition being an unfit activity for a real mathematician. The opinion of this blog is that the Apology should be read mostly for insight into Hardy’s psychology rather than for guidance about how to do mathematics.)

Anyway, since this is a movie about Ramanujan, let’s talk about some of the math that appears in the movie. It’s what he would have wanted, probably.

and goads Ramanujan into stepping up to the board, presumably with the intent to embarrass him, whereupon Ramanujan immediately writes down the Taylor series expansion of the integral as a function of . In the movie it’s a bit unclear whether this meant he worked out the answer off the top of his head or knew it already, but my inclination is to assume the latter based on the fact that this integral appears in Carr’s Synopsis, which Ramanujan famously studied in India.

In any case, how might we go about finding this Taylor series? A natural strategy is to first compute the Taylor series of the integrand, then integrate it term-by-term, especially if, in the spirit of Ramanujan, we’re willing to play fast and loose with issues like where the Taylor series converges and whether we can exchange infinite sums and integrals here. Using the general form of the binomial theorem, the integrand expands to

where

which simplifies to

.

It follows that we have

so we’re left with computing the integral of . This is straightforward to compute using Euler’s formula, which gives

.

Using a second application of the binomial theorem, the term is

.

Since we know the answer is real, we can ignore the imaginary part of this integral and focus on its real part. The integral of the real part

vanishes unless by symmetry considerations, so is the only relevant term and we get

where the integral is just . This gives the final answer

which Ramanujan wrote as

.

Ramanujan’s prime number theorem

Ramanujan claimed, in his letters to Hardy, that he had found a more or less exact formula for the prime counting function (the number of primes less than or equal to ). Upon closer inspection by Hardy and Littlewood, this formula was later shown to be incorrect. This is part of the ongoing tension in the movie between mathematical intuition, as exemplified by Ramanujan, and mathematical rigor, as exemplified by Hardy; Hardy emphasizes that situations like this are why intuition is not enough and Ramanujan needs rigor as well. But the movie never explains what, exactly, Ramanujan’s error was. So what was it?

Edit, 5/9/16: In fact Hardy writes about this error in The Indian Mathematician Ramanujan (beginning on page 150), as I learned from Alison Miller in the comments. It’s well worth reading everything Hardy has to say, but on the subject of in particular, he writes

Ramanujan’s theory of primes was vitiated by his ignorance of the theory of functions of a complex variable. It was (so to say) what the theory might be if the Zeta-function had no complex zeros. His method depended upon a wholesale use of divergent series… That his proofs should have been invalid was only to be expected. But the mistakes went deeper than that, and many of the actual results were false. He had obtained the dominant terms of the classical formulae, although by invalid methods; but none of them are such close approximations as he supposed.

So, it sounds like what happened is that Ramanujan found a version of the explicit formulas relating to the zeroes of the Riemann zeta function. However, he believed, incorrectly, that the zeta function had no complex zeroes, and so didn’t include the terms in the explicit formulas having to do with those zeroes; this simplifies the formulas but at the cost of introducing errors which Ramanujan did not do enough computations to notice. Hardy once said elsewhere of Ramanujan that he

had indeed but the vaguest idea of what a function of a complex variable was was

and says here, more specifically, that he

knew nothing at all about the theory of analytic functions

so this is perhaps unsurprising.

Black holes

At some point in the movie there is some text claiming that Ramanujan’s work is now being applied to understand black holes. It’s easy for such claims to be overblown: for example, when Grothendieck died, some articles claimed that his work had applications to subjects like cryptography, robotics, and genetics. These claims come from a combination of two claims:

Grothendieck’s work had a big impact on algebraic geometry.

Algebraic geometry is applied to cryptography, robotics, and genetics.

However, as far as I can tell, Grothendieck’s work in particular has no direct relevance to cryptography, robotics, or genetics, although I’d be happy to see evidence to the contrary.

But this black hole claim seems to check out, sort of. I believe it refers to Ramanujan’s work on mock modular forms, which he studied in the last year of his life, after leaving England and before he died (not shown in the movie). Ramanujan described various examples of such functions, but a general theory, including a general definition, was missing until surprisingly recently, when Zwegers showed in 2002 that they were related to harmonic Maass forms.

A more famous example of this relationship comes from Monstrous moonshine itself, as follows. Perhaps the most famous non-mock modular form is the j-invariant, whose Fourier expansion begins

.

The story of Monstrous moonshine begins with McKay’s famous 1978 observation that the coefficients of can be written as sums of the dimensions of the irreducible representations of the Monster group; for example, the dimension of its smallest nontrivial irreducible representation is , and . Frenkel, Lepowsky, and Meurman later showed that this is because the j-invariant is the generating function for the dimensions of the graded pieces of a vertex operator algebra on which the Monster acts, and which describes a certain conformal field theory related to the Leech lattice.

Here the relationship to black holes comes from Witten (via John Baez), who suggested that the Monster conformal field theory might have something to do with 3d (really 2+1d; 2 space, 1 time) quantum gravity, and hence with 3d black holes, via the holographic principle. A tantalizing piece of numerical evidence for this conjecture comes from calculations of black hole entropy. The lightest black hole in one version of the theory has states, and so its entropy is

These aren’t supposed to agree exactly because there are quantum corrections to the semiclassical approximation. There is a parameter that can be varied in the theory, and as the agreement between the quantum and semiclassical answers becomes exact. This is proven using a known asymptotic for the coefficients of the j-invariant, namely that

.

It’s very curious to think that this might be related to black hole entropy.

Incidentally, the proof of this result (with good error terms) relies on the Hardy-Littlewood circle method, which was pioneered by Hardy and Ramanujan in the work on the asymptotics of the partition function. This is a major part of the movie which we’ll defer discussion of to a second post.

While some of Witten’s conjectures and suggestions in that paper were too optimistic, there definitely seems to be substantial content that can be extracted after a little adjustment. See e.g., the last section in https://arxiv.org/abs/0907.4529 for slightly more up-to-date developments. There wasn’t any physical reason to expect exceptional symmetry in all of the extremal CFTs, and that bit was just wishful thinking. The smallest case happened to be (subject to a still-open uniqueness conjecture) limited to only one isomorphism class that happened to have monster symmetry.

Do you know why, in the movie scene where he plays squash with Littlewood, Hardy was talking about Ramanujan giving meaning to the negative values of the gamma function? (I would have expected to hear about the negative values of zeta, instead…)

Actually, I recommend that anyone interested in the movie take a look at that lecture, to read what Hardy actually had to say about Ramanujan. A large chunk of it is accessible to a general audience, and in fact, the opening will be familiar to anyone who’s seen the movie. I’m lukewarm on A Mathematician’s Apology, but I found this piece engaging and fascinating. A sample:

There is quite enough about Ramanujan that is difficult to understand, and we have no need to go out of our way to manufacture mystery. For myself, I liked and admired him enough to wish to be a rationalist about him; and I want to make it quite clear to you that Ramanujan, when he was living in Cambridge in good health and comfortable surroundings, was, in spite of his oddities, as reasonable, as sane, and in his way as shrewd a person as anyone here. The last thing which I want you to do is to throw up your hands and exclaim “here is something unintelligible, some mysterious manifestation of the immemorial wisdom of the East!” I do not believe in the immemorial wisdom of the East, and the picture I want to present to you is that of a man who had his peculiarities like other distinguished men, but a man in whose society one could take pleasure, with whom one could take tea and discuss politics or mathematics; the picture in short, not of a wonder from the East, or an inspired idiot, or a psychological freak, but of a rational human being who happened to be a great mathematician.

Ah, thank you very much for that link! I was trying to track down a copy of this earlier and failed. To be clear, when I said “as far as I can tell” I meant “as far as I can tell through googling,” as opposed to “as far as I can tell by directly scrutinizing Ramanujan’s work myself”; I’ll edit to clarify that.

And unfortunately, I don’t know what the remark about the Gamma function is about.

And giving it another look, I see that Ramanujan’s first letter (on page xxiii) answers my question about the negative values of the gamma function. I was partly confused because I was thinking this meant values at negative integers, where gamma has poles.

But actually he was talking about s negative and non-integral; he asserted that the standard gamma integral should still be defined for those s, and have value Gamma(s).

Nice post! As for the proof of the asymptotic formula for the Fourier coefficients of j-function, one can derive it by more “elementary” means if you grant yourself some familiarity with Zagier’s work on Singular moduli. We do this in a joint work with Prof. Ram Murty: http://www.mast.queensu.ca/~murty/Murty-Sampath.pdf.

Nice! The current consensus seems to be that Witten’s conjecture concerning 2+1 quantum gravity is not quite right: further checks didn’t work out. Gerald Hoehn wrote:

In addition, we show that it is impossible that the monster sporadic group acts on an extremal self-dual N=1 supersymmetric vertex operator superalgebra of central charge 48 in a way proposed by Witten if certain standard assumptions about orbifold constructions hold. The same statement holds for extremal self-dual vertex operator algebras of central charge 48.