Welcome to a Mathologer masterclass
video. We haven't had one of these for a while :) This masterclass is devoted
to understanding a stunning mathematical identity due to the genius mathematician
Srinivasa Ramanujan. Have a look at this: 1 divided by … and now it comes: 1+1
divided by 1+2 divided by 1+ 3 and then 4, 5, 6 all the way to infinity. A very curious
infinite fraction monster. Then there is also this infinite SUM monster. And the pattern
for this second monster is obvious, right? longer and longer products of consecutive odd
numbers in the denominators. Okay, now let’s add the two monsters There, there. All this is
equal to, brace yourself :) …. Well, there’s pi, because there’s always pi :) And there’s a factor
of e. Really ? Well, not quite finished yet. Square root of pi times e over 2.
Hands up anyone who guessed that? Nope, not a lot of hands. Seriously, what
a crazy result. How on Earth do those two very different infinite monsters on the right
sum to this very simple product on the left, tying together the numbers pi and e? Of course
Ramanujan was a genius at this kind of thing, and our identity is just one of the thousands that
he discovered. Some people consider the identity here to be Ramanujan’s most beautiful. Others
think of it as the “simplest” among Ramanujan’s very hard results. Clearly “simple” is very
relative here. In 1914, the year that Ramanujan left India for the UK., he challenged the
mathematical community to prove that his identity is really true. There it is, as problem no. 541
in the Journal of the Indian Mathematical Society. Today’s mission is for us to rise to Ramanujan's
challenge, and to puzzle out how these two monster jigsaw pieces came together in the mind of
the mathematical genius. Along the way, we’ll encounter some of mathematics’ most celebrated
results such as the Wallis product for pi. The Gaussian integral And an infinite
expression that’s almost as crazy as Ramanujan’s infamous deep connection between
-1/12 and the infinite sum 1+2+3+ and so on. As usual lots to look forward to. But a warning.
To be able to understand everything that follows, knowing some baby calculus would be really
helpful. No calculus? No problem :) Just enjoy the mathematical fireworks courtesy of
one of the smartest persons who ever lived. OK, time to begin. An infinite sum and an infinite
fraction, which one first? Definitely the sum, right? What does that infinite fraction even
mean? So let’s start with Ramanujan’s sum. Some of you will be familiar with a closely
related infinite sum, that one there. So the denominator products are now consecutive
integers, not just the odd numbers. Okay, so as a warmup, let’s make sense of this
second sum. Just relax and watch. Should all look very natural to those of you
who’ve dealt with infinite sums before. Let’s first turn this sum into a
power series in the variable x. Make a copy. Let’s calculate the derivative of
this power series. Some baby calculus required here. There, the derivative of x^4 is 4 x^3 Do
the same with all the other terms. simplify a bit. Now the bit in the front That’s 1. Okay, lots of
coincidences. Can you see where this is going? Align the top and the bottom. Okay, so the top
is a function in x, let’s call it y(x). Not a terribly original name but it will do :) So
y on top and y’ its derivative at the bottom The top is contained in the bottom Nice :) And
that means that we can replace the orange bit by y. That’s a differential equation. To solve it, we
want a function for which, when you add one, you get the derivative of the function. Are there any
simple functions that satisfy this differential equation? I’m sure many of you will have
already guessed. Well, if the + 1 wasn’t there our differential equation would say that our
function is equal to its derivative. Now, which super famous function is the same as its
derivative? The exponential function, of course, e to the power of x. Now, the exponential function
is not the only function that is equal to its own derivative. 2 times e to the power of x is
also equal to its derivative. and so is 3 e to the power of x. In fact, the functions that have
this special property are exactly the infinitely many functions of the form constant times e
to the power of x. Now what if we throw the 1 back into our differential equation? That kind
of thing can create havoc with solving a DE, but here it’s easy. We can compensate for that +1 just
by subtracting 1 from c times e to the power of x. There in the orange, those are all the solutions
of our differential equation. But which of those infinitely many functions is equal to our power
series? Well, that’s easy to figure out. Just plug in x = 0. Then the right side just goes
away. And so we see that y at 0 is equal to 0. Plug in 0 at the bottom Okay, y at 0 is 0. and e
to the power of 0 equals 1 and so c is equal to 1. Quite a few of you will have seen this kind of
trick before. Now, finally, plug in x=1 and we are done. This means that our warm-up infinite
sum amounts to e - 1. Pretty magical the first time you see this. Okay, warmup’s done. Let’s
now try to make sense of Ramanujan’s infinite sum in exactly the same way. There, all odd
numbers again, that’s Ramanujan’s sum. Extend this sum into a power series, using just odd
powers of x. Can you see why that’s a natural choice? Pretty natural, right? Well, let’s keep
going. Make a copy. Calculate the derivative. The bit at the front that’s 1 again. Okay,
now how do things line up this time around? Very good. But what about the powers? Slightly
off. But that’s easily fixed. Just pull out an x at the bottom. As before, we’ll name the top power
series y(x), with the bottom its derivative, y’. And, so, as in the warm-up, we can replace the
orange by y. The differential equation we get here is pretty similar to the warmup one. The
only difference is the extra x on the right. Okay so what are the solutions? What functions
will solve this differential equation? Well, Marty just taught my first year students
here at Monash uni how to solve a differential equation like this. As in the warm-up, there are
infinitely many solutions, and the value of y at x = 0 pins down which of these solutions is equal
to the infinite series. Okay, so what’s the value at 0. As before the right side wipes out and so
again y at 0 is equal to 0. Great. Unfortunately, Marty’s gone on holidays, so he’s not around to
teach you how to solve this sort of differential equation here. Anyway, there are general methods
that work, and again, you can sort of guess the solution. If you want to give guessing a go, here
is a first Mathologer challenge for you: get rid of the 1 and see if you can solve the resulting
simpler equation and let us know what you come up with in the comments. But let’s get on with it,
and let me just show you what the solution is. Whoa. Looks scary, doesn’t’ it? But it’s actually
not too bad. Don’t worry and just run with it for the moment :) We’ll have a close look in a second,
but first, let’s finish our current mission, to figure out Ramanujan’s sum. Okay, so our
differential equation work so far has given us this identity. Remember what comes next? Yep,
to get Ramanujan’s sum we simply plug in x=1. So, Ramanujan’s sum on the right is equal to that
weird integral thing on the left. Interesting :) We can calculate the integral there, at least
numerically, and the whole left-hand side comes to around 1.41. Aha! Very familiar, right? Maybe
the whole left-hand side is exactly the square root of 2? And … nope. There is no aha. Sorry :)
The left-hand side is NOT exactly root 2. Too bad, root 2 would have been a dream come true. But
still, we’re getting somewhere. Let’s look again. e to the power of 1/2 that’s root e. So, a REAL
aha this time. Root e is one of the components of Ramanujan’s identity. There root e is part of the
rooty thing on the left side of our identity. So, we seem to be getting somewhere. What about the
integral? That will also look familiar to many of you. Right? Normal distribution, bell curve,
important maths. What about the whole thing, the integral? Well, that’s just the area
between 0 and 1 under the bell curve. And that bell curve should definitely ring another
bell. Okay, okay cringy joke :) Bell curve ringing a bell, sssss. The super famous Gaussian integral
that I mentioned at the beginning of this video, remember? The total area of the bell, from -∞ to
∞ is famously equal to the square root of 2 pi. And half that is … :) Big AHA :)
Square root of pi over 2. Looking good, right? Multiply the two roots. That’s EXACTLY
the left side of the identity we are chasing. We're definitely on the right track. What’s
next? Well that yellow area splits into two bits, the area between 0 to 1 which arose in the
Ramanujan sum, and the tail bit beyond 1. Well that yellow area splits into two bits, the area
between 0 to 1 which arose in the Ramanujan sum, and the tail bit beyond 1. Expressed in integrals
this splitting into two areas is just a sum. Now pull root e inside the brackets. OK, so
remember, we’re chasing Ramanujan’s identity. And we pretty much have it cornered. We’ve already
shown that the first green-yellow bit is exactly Ramanujan’s infinite sum. So, what remains to show
is that the second green-yellow bit exactly equals Ramanujan’s infinite fraction. Very, very nice and
ingenious. But now how can we show that the value of the infinite fraction is really that second
green and yellow bit? Not obvious at all…. Hmm…. I’ve got an idea. Let’s switch to genius mode :)
Okay genius mode on. It’s that simple. Well, maybe for Ramanujan… :) Throwing an x at the problem
worked really well for the infinite sum. So, let’s try to go backwards, extend everything in front
of us to an x identity in a natural way and then try to construct that infinite fraction starting
from that second green and yellow bit. Okay, split up the left rooty side again. Now remember that
1 came from an x And that root e came from this That’s a fairly natural thing to do, right?
And, most importantly, this new identity is definitely still true for all x not just x=1.
Why? Well, because the two yellow integrals will always add up to the yellow root pi over
2 on the left, no matter what x we choose. Nifty :) Again, just to make sure that we are
all on the same page let me say this again: At this point we know that the identity up
there is true for all x. Nothing to prove anymore in this respect. Done and dusted :)
What remains to be done, in genius maths mode, is to show that the function in the right box
can be written as an infinite fraction. AND that this fraction becomes Ramanujan’s fractions
when we set x=1. Okay, so now let’s focus on the fraction function. I’ll be lazy and call it y
again. Solving for y we get this difference. What comes next going backwards? Well, what
about a simple differential equation for y? To find the differential equation, we need the
derivative of y, and so let’s take derivatives on both sides. Hard? Not at all. It’s really just
a matter of shovelling symbols around using baby calculus. Piece … of ….cake. Here is what you
get. Pretty sure many of you will immediately spot the gigantic coincidence. There, all of y
is contained in its derivative. and so we can replace the orange bit by y. Looks very familiar,
doesn’t it. This new differential equation for the fraction is very similar to the one for the
sum. Only difference is the minus instead of a plus. Cool :) As usual, this differential
equation has infinitely many solutions. Now, what do we usually do to pin down which of these
infinitely many solutions we are dealing with? Well, by now you all know the drill:
We calculate y at 0 :) Okay so plug in x = 0. Now what’s that on the right? Well, the
integral is from 0 to 0 and so the second term is equal to 0. Now what’s that on the right? Well,
the integral is from 0 to 0 and so the second term is equal to 0. And e to the power of 0 that’s
just 1. And so y at 0 equals root pi over 2. That all works like a charm: and so the function
y is the special solution of our differential equation that takes on the value root pi over 2
at 0 :) Final stretch. Let me now show you how you can get that infinite fraction from this new
differential equation. Absolute magic, promise. Okay, still in genius mode, to derive the monster
fraction, we start with the new differential equation and first take derivatives on both sides.
On the left, the derivative of the derivative is the second derivative. The derivative of -1 is 0.
And the derivative of x times y? Well, that’s just the product rule from baby calculus, right? And we
get x times y’ plus 1 times x. Now repeat. Repeat forever and ever after. Aha! Notice the
1, 2, 3 on the right? Ramanujan’s 1, 2, 3, fraction is just around the corner :)
Now fasten your mathematical seat belts. Here comes some real mathematical
magic. Divide the first equation by y And do the same for all the other equations. Have
a close look. Can you see what comes next? There, there, and there. Yes, I can hear the yells for
me to substitute. And I’ll do that, but first a little more aligning using algebra autopilot
before we engage the SUBSTITUTION autopilot :) How amazing was that? And it looks like we’re
just about done. In fact, it looks like we proved a lot more that what Ramanujan challenged
us to do. Right? We know this is an identity that works for all x. THEN we know that the first
box is equal to this infinite power series. and now we also know that the second box is
equal to this infinite fraction. Which lands us with this identity. We can choose x however we
like, and we get Ramanujan’s challenge identity by subbing x=1. Tada :) And we’ve made it. Impressed?
Relieved? I sure hope so :) However … Sadly, there’s a however :( This more general identity
is definitely true and Ramanujan himself was very much aware of some version of this identity.
But you regular Mathologerers will know that infinity can easily fool us, and for what we’ve
done so far to really count as a proof, there are still a few things that need to be checked. And
that’s what I warned you about at the beginning, that we’d be entering the quicksand territory
of crazy things like 1+2+3+and so on “equals” -1/12. So, we’ll finish with that, pointing
out the quicksand and how to avoid it. Okay, so what’s the problem? To see the problem,
we have to recall how we came up with this infinite fraction. Well, we began by noting
that y satisfies this differential equation. and that y at 0 equals root pi over 2. Now, we
found ONE solution of the differential equation in the form of our infinite fraction. However, we
did this SOLELY by manipulating the differential equation, nothing else. In particular we did not
use the fact that y at 0 equals root pi over 2. This tells you that there is more to be done,
right? After all, how can we be sure that the solution we found is THE solution that also
takes the value root pi over 2 at 0? OK, problem isolated, but now also easily sorted,
right? We’ll just plug x=0 into our fraction and hopefully hammer the resulting expression
into root pi over 2. Okay, plugging in … now! And now we need a very, very good hammer. How
can we see that this very curious infinite fraction has the value root pi over 2? Well,
let’s see. To get a feel for what’s going on, let’s make things finite and chop things
off at some point, say after the 7. Now look at the bottom bit, the 5 and 6 and 7.
That’s the fraction 6/7th in the denominator, with 5 in the numerator. So, we can flip and
multiply. And so the bit in the red box is this Now, keep flipping until you
run out of things to flip :) So, with fingers firmly crossed, the whole
infinite fraction should be equal to this infinite product. All even numbers on top and
all odd numbers at the bottom. Does this remind you of that other infinite product that I showed
you at the beginning of this video? This infinite product here which is equal to … remember ? …
pi over 2 Super big AHA :) Again, that’s the famous Wallis product. In the Wallis product all
the integers appear twice, 2 time 2, 3 times 3, and so on. But, in our new infinite product each
integer occurs just once. What does that suggest? Well, taking the square root of the Wallis
product should give us the value of our product, right. And so our product should equal root pi
over 2. Exactly what we were hoping to find. YESSSS :) Wallis’s product was the very good
hammer we needed and Life is good again :) That was pretty crazy, wasn’t it? But here’s something
even crazier. It turns out that our new infinite product is NOT equal to root pi over 2. What? Yes,
if you actually try to evaluate the product by going 2 over 1 times 4 over 3 times 6 over 5 and
so on you’ll find that this infinite expression explodes, … diverges to infinity. Another
Mathologer challenge for the keen among you: try to pinpoint why the Wallis product does not
explode. Anyway, as you can see, we are in a situation that is very reminiscent of Ramanujan’s
infamous 1+2+3+ “identity”. which really does not make sense as an identity but which at the same
time captures a deep connection between 1+2+3+ etc. and -1/12, a connection that really works
like an identity under certain circumstances. And the same turns out to be true for our infinite
product here. These impossible “identities” really work in our scenario here, in that the infinite
function fraction, properly treated, really is the correct solution to that differential equation,
and Ramanujan’s general x identity really is true. Too deep and too crazy to go into here, but in the
end it all works out. Ramanujan’s identity really delivers: mathematical genius, mathematical magic,
and real magic :) What more do you want? :) The inspiration for this video was a 2020 blog post
by John Baez and the construction of the infinite fraction was contributed by Leo Stein. Very nice
stuff. I’ve included links to the blog post plus lots of other relevant articles and Mathologer
videos in the description of this video. Finally, I note that x = 0 is a critical value for the
general formula up there. The formula only works without invoking more mathematical magic
for x > 0. Also included in the description of this video are articles that cross all the t s and
dot all the i s of this amazing formula. Anyway, I hope you enjoyed this reconstruction of what
may have gone on in Ramanujan’s incredible mind when he challenged the rest of the world to make
sense of his wonderful identity. Let me know in the comments what worked and what didn't work for
you. And that’s it for today. Until next time.