 Paul Carr and a post-talk of his to my know, and we were discussing a problem which is also in the sense of extrapolation and asymptotics. One other that came from that I mentioned briefly a couple of days ago. So every couple of days, somebody comes to me some nice numbers and say, does these work? And sometimes they do, and sometimes they don't. So if anybody has a nice sequence that they want to offer or any other kind of problem that they want to mention, now is the possible time. So today, first of all, let me remind you also people aren't here physically. The format of the course, this is lecture number seven out of 12, which means exactly half of the course is over. And the first three weeks, and the fourth week, which is this week, today and Thursday, were always Tuesday and Thursday from 4 to 5.30. I'm just reminding you now, and I'll say it again on Thursday, the last two weeks, that's next week and the week after, the course shifts because the room wasn't available to Monday and Wednesday. And I think from 3 to 4.30, but I've forgotten. Maybe it's 3.30. I don't remember. But I'll announce it again. And it's, of course, on every announcement. Simply don't shop at 4 if you don't want to miss one hour. OK, so is that a teach by any chance? I'm so near sorry that I can't tell. He said he might come. So I just mentioned you. I said that the question to do with asymptotics came up actually in conversation with you today. And I actually wrote a little program that kind of works and kind of doesn't. I might even mention it briefly just to emphasize the point that this kind of question, asymptotics, interpolation, extrapolation, evaluation of divergent series come up all the time in physics and mathematics. And they're a lot of fun. So I will start by, the last two lectures were mostly on these various versions of how to extrapolate, now how to guess the asymptotics of a sequence. And I did that two times ago. I reviewed it last time. But let me review it very briefly again, because there are last time I talked about variants. And one of the variants I said I didn't know how to solve. And then a voice came out of the heavens, but it was Campbell Wheeler, saying that he had worked out a way of doing it. And I was very impressed. And he done it in 20 minutes, because it was only a few minutes after I'd mentioned the problem. And I've thought about it often on for a couple of years, not very much. But then he sent me an email afterwards saying, actually, I sent it to you in May of last year. But of course, I'd never read it. So I looked at his method. And it's kind of cute. And it kind of works. But as he himself said, it kind of doesn't work. It doesn't work as well as the method I explained. The method I explained gives you the coefficients. It zeroes in on them. It gives you, for instance, 50 digits, 100 digits, if you have enough numbers. His doesn't quite. But it zeroes in. You can get quite a few digits. And then if you're lucky, well, first of all, you can improve the method. I didn't think about it that much, but he sent me an example. And I worked it out for myself. Well, I sent him a test example. I said, OK, here's the sequence. Can you find the exponents? And he did. And then I tried. And it does work. And it's fun. So I'll tell that to start today's course. It wasn't per se planned, because I didn't know about it. But it's planned now. So firstly, since you probably didn't catch his name, and very few of you probably know him personally, Campbell Wheeler. He's an Australian. But one can still usually understand his English, although sometimes less. And his mathematics is very good. I mean, his English is good, too. It sounds a bit different from America that I'm used to or British that I'm also kind of used to. OK, so first, let's remind you the basic method. And we'll come back to that for several things. So the situation that comes up many times, and I'm going to repeat it all this now the third time, but I'll do it very briefly. Let's say you have a sequence of numbers. And you know, say, in a typical case, you can compute each one. But it costs money and time. So let's say you know 500 values to 200 digits. I mean, obviously, these numbers can change. But you don't know 10 million values. You have some relatively restricted numbers. Sometimes it's a few thousand. Sometimes it's only 50. But you should know them to high precision. Sometimes they're integers. Then you just know them exactly. But sometimes they're real or complex numbers. And then we make an ansatz. There may be a power of n factorial. If there is, it's called Givray type alpha. I'll come back to that today if I get around to it. There may then be a smaller term, which is a pure exponential. There may be a yet smaller term, which is the power of n. And then there may be a power series. And in last time, I discussed that there are many variants of this. So eg variance, so eg an. Well, I explained the first time that all of this is kind of wind-addressed. Because if you have this, then if you just look at an over an minus 1, it starts with n to the alpha times a similar. So if reduced to this case, if you have this case, you take an over an minus 1. And it starts 1. And the next term is gamma over n. So basically, if you know how to do just the power series part, you can get alpha and then beta and then gamma very easily. So although that often happens, we can ignore it. And so variance, well, the easiest, and this is the one that came up in the problem I just mentioned of a T-stable car specifically. I mean, he knew that there was such an expansion. But this time there's a log n term as well. And then a very tiny variation of the method gives you c. And I computed it this morning to 100 digits. In principle, in his case, we know how to compute c in closed form with theta series. But it would actually be more work to compute it, work out all the theta series and not make a mistake. But here, I'd exacted this situation. I had 500 numbers to 200 decimals. And I got c easily to 110 digits from that information. So then another one, ignoring these preterms, would be c0 plus c1 over n to the 1 half plus c2 over n. And that, as I explained last time, is quite a bit harder. Of course, one can do the following. And that's what Immanuel Carnero asked. Can't you just restrict this sequence to squares? And then you're back in the previous case. And you can. And in fact, I even told an example from work of Andrews, where I had guessed from the vague numerics that it did a power series in n to the 1 third. But I didn't know the right way. And so I just took the cubes. But then I had to go up. I took the first 50 cubes. That meant n was going up to 30,000 or something, whatever 50 cubed is. And in order to interpolate well with so little data, I needed to compute them to 20,000 digits. It took four hours on a computer. Whereas last time, I explained a method that works in these variance situations with square roots and cube roots. And then the same calculation took three seconds instead of four hours and also gave 50 digits of the leading terms. So last time, I talked about such various variants of the basic method. But there was one variant that I said I actually didn't know how to do. And that's the one where Campbell immediately said he did. So let's assume that we have a sum of two such terms. So let's say beta to the n, some ck over beta 1 to the n, over n to the k. So this, of course, everything is asymptotic. And there's a beta 2 to the n and maybe a beta 3 to the n, times the third one. But I only finally meant in the case I had there were one of the cases I showed last time. There were two. Well, I don't like to put prime double around with the n. It's somewhat mixed notation. So let's say that your ansatz that you expect that there are three exponential terms. So you see if there are three power series and you add them, the sum of power series is a power series. But the sum of power series, the even power series multiplied by n to the 1 third is still a power series and n to the 1 third. With different exponentials, it isn't. So the trick that we used here, if I didn't have the factorial to immediately get beta, is just take an over an minus 1. Then if n is large, that's almost exactly beta. And you apply the extrapolation method to the quotient, an over an minus 1. But here, of course, if beta 1 in absolute value were to be bigger than beta 2 and beta 3, then there'd be no problem. Because if n is 500 and this is exponentially much bigger, you can just ignore those two terms. You applied the method. You'd get this series. And if you're really lucky, you can subtract it off and get that. But the problem is that these might be complex numbers with the same absolute value. So if there are three of them, one could be, for instance, real and two complex conjugate, they could be completely unknown numbers. And so last time I explained that there is a nice way if you know what these exponents are. And I gave a very complicated example from quantum spin networks. Paper, graphite, leaders, and van de Venber, there were many terms. But there was a complicated recursion. And from the recursion, from the leading term, you knew that beta 1, beta 2, and beta 3 were specific numbers, which did indeed all of the same absolute value. And then you can use a method to eliminate one part of this series at a time. But what I said is if we suspect that it's like this, but we don't know what the betas are, I didn't know a good way. I mean, very roughly you might do it by plotting and seeing the oscillation and doing kind of harmonic analysis, but that would be extremely inefficient. And so Campbell's method does work. So let me first, before I tell the method, tell this test case that I actually took. So the test, which I sent them, just as you know, I said here are some numbers, which I constructed for the purpose, and see if you can do it. So I took three betas. Originally they were the squared of 19, three plus the squared of minus 10, so I squared of 10, and three minus the squared of minus 10. But for two reasons, I rescaled all three of them by three over 13. One was of course to make it harder, you can't just guess by looking, you say, aha, that's this, you know, I have that number to two decibels, and then you try squaring and you see 19.000. I try to make it not quite easy to guess. You have to get a certain amount of precision. But also, these numbers are quite close to one. So the numbers didn't blow up very much. And then I just chose, so this was beta three, and then I just chose the K and CK, and CK prime and CK double prime. I just asked Pari to get, I went from zero to a left, and just asked for random one-digit numbers, and it doesn't matter at all what they were, but it's one sequence started seven, one minus 10, and the last one was minus two, and one started seven, also seven, zero, and again, minus 10, and one, and the third one started four, minus two. Actually, these weren't the CKs. If I called the CK, it was actually, I'll say exactly what I took, I beta one to the M times the sum CK over N to the K, but I multiplied it, you know, again, that you can't just guess by pi, and then the second term I multiplied by the cube root of pi again to make it a little harder to guess, and then you take beta two to the N, and the sum CK prime plus CK double prime squared of minus 10 over N to the K, so this is a real number with these values, so this was meant to be essentially random, and then he wrote back very quickly, and he said the computer took 12 seconds, and I think beta one, beta two, and beta three, and he gave me eight digits, and they were indeed correct, so then I looked at what he'd done, and first it seemed to give very few digits, and that's how it gives a bit more, so just for fun, well, it's a fun method anyway, it's one more variant. So you remember how we did with A and with the original one? The trick, remember, was you picked the number H, which as a mnemonic I said, think of eight, but it could be 20, it's not too big and not too small number, which you have to choose, you try several depending on the situation, you multiply your given sequence by A to the N, and then you take the H difference and divide by H factorial, so then this from by simple computation, I'm assuming now that A and N does not have the exponential of the factorial and the power of terms, so it's just C zero plus C one over N and so on, then you find out very easily that this starts a bunch of zeros, and the next term is C H plus one over N to the H plus one, and therefore, if you just stop, you take a large N like 500, then here you're off by one over 500, but here you're off by one over 500 to the ninth, which is already very accurate, so that was the very simple method. So remember that this delta N, delta H of any sequence, A N, would be the sum of M from zero to H, let's call it R, it's easy to read, minus one to the R, binomial coefficient H over R, A, and then you shift up by R, retain the forward difference, and then, well, that's it, okay? So that's what I had done, but of course, this is the delta with minus one, so Campbell's idea was this, you do the same, but here H, remember, was small, so here N was our number that's very big, it's the number of terms you have, and H is maybe eight, if you try to take the 500 difference right away, you'll get complete nonsense, but he said, let's do it differently, not, see the reason you get nonsense is you're taking the difference and the difference of the difference, and so you're magnifying any fluctuation immensely, but he said, well, what if we do the same, but we take not the difference, but again, H over R, A N plus R, but I multiply by some other number, X to the H minus R, maybe this is also H minus R, it doesn't matter, there's a sign. So he said, let's take this, and now we can take H much bigger and to fix ideas, but of course, one could vary this, you could H to be two N, or half N, or 0.75 times N rounded off, he just took N terms, so in other words, you're using the values, so let's call this one now A N delta, so we make out of our sequence a new sequence, which is this kind of X deformation, that was his idea, but you notice since I took N terms, I could, as I say, take two N terms, then this would go up to three N, that mean if I only have five N terms, my N would have to stop at 170, or I could take this H to be only a fifth of N, then I could go up much further, but he took N, as I said, that's a parameter you could vary, so here N goes up to one, up to N over two, if you know N values, so if you know N values which might be 500, you have to stop here at N over two, because you're adding to the original index this. Now let's look what this is, so remember my ansatz now is that A N is supposed to be the sum of a small number, maybe three, pure exponentials, presumably of the same sort, or you could easily tell them apart, we won't actually use that directly, but you should think of the three betas as being all in the same absolute value, and in the case I had there, one was real and the two were complex conjugate, there could be anything, and then here we'll have a C, we'll have the sum K from zero to infinity, I mean of course it's on the asymptotic, and then just as before this in power series, CK, but there's one power series for each of the three numbers, so the problem is find beta one, up to beta J numerically, to reasonably high precision, hopefully enough that you can either do very high precision, so you know them as real numbers, or if you're lucky you find them to reasonable precision, but if they're simple, for instance, algebraic numbers, you might be able to recognize them, and then, and also, then C zero J, C one J, and sum which are less important, but actually you don't have to do that because once you have the betas, if you have them exactly, then I explained the method last time to reduce this problem to the old one, so the real question is, can we find these exponents when we don't know what they are, because if we do know what they are, we know what to do, so let's look at this, well first let's assume that I just said one term, beta to the n, so just one and no C's, well then beta to the n here would give me beta to the n plus r, but beta to the n plus r is beta to the n times beta to the r, but then beta to the r, x to the, sorry, this is now, this h is now n, h to the r times x to the n minus r, with binomial code, that's just the binomial expansion of beta plus x to the n, and so we find that this thing will look like the sum j from one to capital J, and then it will be this beta j to the n times beta j plus x to the n, and then times the Cj zero plus lower terms that don't quite work out, but they still, the next one is the order of one over n, one over n squared, so let's pretend that that's not going to bother us, and in practice it won't really bother us, so now what we've done is we have new betas, the new beta is, sorry, we've released by beta j times beta j plus x, we can call this number, I don't know, so new number, yj, but all of the betas have the same absolute value, so therefore they're still competing with each other, but the beta j plus x don't have the same absolute value, you know the approximate size of beta j, because if you have 500 terms, you see it grows like one to the n or two to the n or two to the minus n, so you know roughly the size of beta j, you can divide by that, and so you can take x of the same sort, so in my example, as I said, I put in the three thirteens to make the absolute values here fairly close to one, so in my case you could take x of the order of one, but you take x of the same order as the bj's, I mean it's not exactly equal, but it's of that order in absolute value, take some complex number, and so if this is x, then here I have beta one, beta two, and beta three, sorry, x would be let's say this, then I have beta one plus x, beta two plus x, and beta three plus x, which might be here, and now you see that the betas had completely, had the same absolute value, but I've shifted them all three by something of the same order as all of them, so now they have completely different order of magnitude in my picture, this one has ordered magnitude less than it used to be, it's gone inside the circle, this is almost what it was because I crossed a little, but this one's quite a bit bigger, but now I could turn the x, so what I did just to run the program, so I could show you the one line Paris program, here it is, I took my same test that I'd given him, I took that vector without knowing the answer, I tried x, and so I tried x to be e to the i t over 10, i j over 10, and j was simply an integer, I went from zero to 62, because 62 over 10 is slightly bigger than two pi, so I went around the surf, that doesn't matter exactly, and for each one, what you do is, the ideas of one of these is much bigger, if beta one plus x, let's say is bigger than beta j plus x, per j different from one, so it's the biggest one, well then if n is big enough, this exponential term, remember the beta j's at the same size, this exponential term will completely dominate the others, so therefore the a n tilde will be now a new number, which I called y one to the n, times some new in a c zero star, plus c one star over n, there'll be some new expansion, to which I can apply the old method, which means that I then take the ratio of two of these and do the old method with h now is h again, and so I did that, but first you have to see that, so I just took the ratio of the last two, so what you do is you take this x, and then for each one, we have this a n tilde, which for me n was 500, well it was 250, because remember we've only half as many, and I want the ratio, so I took the ratio of the last two that I had, and so here's the table of what happened, was here's j, and here's this y j, and remember y one is supposed to be beta one, times beta one plus x, so I can solve the quadratic equation, y, x is the number I chose, y one is the one that I got by taking this ratio, so this we roughly y one, I solve the quadratic equation, so I take this thing, I call this number y one, and then I solve the quadratic equation, so x is this, and so I did this, so when j was zero, then I got as the answer 1.0058995, but when, sorry that was sorry, this is j zero, but then if I took one, two, three, four, one, two, three, but not four anymore, four didn't work, I got the same, plus 10 to the minus nine, times i, and then they got a little, so I had four that were almost exactly the same, and then the next one was quite a bit off, 0.935, and then number five was a completely different number, so as you took this going in steps of 10, four or five times it was this value, and also to the left, and this was the best one, and so I can tell you the numerical values of beta one, beta two, and beta three, beta one is of course real, and it is 1.00589975, and this one is 0.692307, something or other, I'm not gonna write it out, plus 0.72975i, and here also there was, I wrote it, there was an i as well, but now, so for four you got something that was neither meat nor fish, but for zero to three it was very close to this, for four it was intermediate, but then for five all the way up to 25, it was almost the same, and then at 26 it was nonsense, then it jumped around a lot, and eventually as you went around this earth you got some more that gave you a number, you know like the six, nine, so now what you do is clear, you take the best one of these, which here was zero, because it was also minus one, minus two, minus three, so this was the best one, here you take the middle one between five and 25, so that's 15, and I take that sequence a and delta, but now I don't just take the quotient and take the last value, but the whole vector, and apply the usual extrapolation method, and so when I did that, so then if I did extrapolation using the parameter h equals three, so much less than eight, and this was using x, j equals zero in this thing, then that gave me the b one value, that's the first one, that gave me beta one plus about two times 10 to the minus 11, so it gave 11 digits, that's already very much enough to recognize it, and when you took the ones that were better, because there were many more values from five to 25, if I took the j equals 15 value and tried different h's than the one that gives the fastest convergence, now it turned out you could go up to 10, and then this gave me beta two, and the error was now, I'm dropping the signs, one times 10 to the minus 27 plus i, well minus, that doesn't matter, plus i times 10 to the minus 27, so in other words, one of them got 11 digits and one of them 27, very much enough to recognize algebraic numbers, but you see it's not quite a method, there's not a well-defined thing, you have to do some trial and error, I tried 62 values, went around the circle, because I don't know where these betas are, but for some x of the rough order of magnitude, one of them should be much bigger in absolute value than the others and should dominate, so it's a very, very nice idea, very much in the spirit of the other, but vagress, he said himself, it's not a completely well-defined thing where you zero in, but once you have it, then you can zero in more and more and it does work. Anyway, I wanted to tell that because it's kind of a success of the course, maybe there'll be more that one of the people in the audience could improve or could solve a method or could solve a problem that I posed, although in this case, although I'd forgotten, I'd told him about this problem long ago and he had already told me the solution, but I'd somehow not internalized it, so apologies to Campbell. Okay, so that was about the extrapolation method in a slight variant, but as you saw last time I mentioned now with the cube roots and so on, there are many, many variants once you know the method, if you've got a problem that doesn't 100% fit, you can usually massage it, tweak it, somehow make it fit, but here it was, as I said, trickier and I had actually not seen a good way to do it. I tried something similar, but just with a few terms and it didn't work well at all. I never thought of taking the age, so to speak, we have the same order as n and that here worked very well. Okay, so that was the first round. Okay, so I have several possible topics to do today. So in any case, I want to finish with all side topics today and next time Thursday, so that the last two weeks, the ones that will be Mondays and Wednesdays, I want to give a specific thing in more detail, probably for the whole four lectures, which is an application of the circle method to really explain the circle method of Hardy-Brahman-Nuchin, but in a new problem, the problem is not new, that actually has to, but in a situation that's much more complicated than the one they had. So before I go on with other subjects, I want to mention something that I've mentioned a couple of times, which is how do I, how do you recognize numbers? So here there was already, there was some algebraic numbers, like three plus squared of minus 10 times 313s. If you have that, lots of decibels in that case, you can just ask Parry, I mean, many programs have that. There's, well, there's the famous LLL, Lens for Lens for Lavage algorithm, and that is an algorithm to look for the shortest vector in high-dimensional lattice, so maybe a 20-dimensional lattice, so you have a quadratic form in 20 variables, and you look for integer arguments to make the quadratic form as small as possible, so the shortest vector. That is, it was developed for number theory, but it has many applications, one that even Lens for only found out by accident because the people invented and never told the invention of the method properly, they were afraid that asked for some royalties, and this was worth hundreds of millions of dollars, but GPS uses the Lens for Lavage algorithm crucially. So if you're old enough to remember when GPS first came into use, actually originally it was only in the military, then it became declassified, and a few people had it, it was very expensive, but a few taxi drivers, and everybody's got it on their phone, and it used to be that if they had GPS, and you said, can you take me to some village, 100 miles from Tres, they could find the village. They certainly couldn't find the house, it was within 500 meters, and now they can bring you right up to the house, probably they can see into your eye by now with the thing, and the improvement was not, it uses triangulation, there are various radio waves being bounced off, satellites are sent by radio transmitters, and then you know, you can measure the strength of the signal, blah blah blah, and you work out how far you are, and you're triangulated, but it's very approximate, but the idea of how you use Lens for Lavage is you send a radio wave which is bounced off, and then it interferes with itself, and so you can see whether it's interfering positively or negatively, and you know the frequency. So what you can find out is the distance from you to that far away point, the approximate distance in kilometers, which is what they used to use, but also the distance in wavelengths, but only multiple other wavelengths, you don't know how many wavelengths are there, you just know it's in phase, but if you think about it, that exactly means wavelengths is integral, it means you're in a high dimensional lattice, and so somebody, I don't know the details how it works, but somebody had the wonderful idea of using the LL algorithm, so as I said, the problem there is find a short vector in some given lattice in R to the N, where N might be 10 or 15, I mean not a million, but also not one or two, so you have to find a vector in some high dimensional space. Now what's called in Paris-Lyn-Depp, you put in the vector of let's say seven numbers to high precision, and in depth you're gonna look, are they linearly dependent, this is the Paris notation of that vector, you look, is there an integer linear combination which is very small? So for instance, if you give the numbers one, so you have some number, and the actual truth is it's you know, 37 19s plus 52 19s times Euler's constant, I'm taking random numbers, plus you know, minus 11 19s times E and something times pi, but and you suspect that maybe X has something to do with the numbers X, one gamma and E, which is X of one in Paris, because as I mentioned, Paris doesn't even have E because it's not an important number. So you would just put this, do linear dependence, and here even in very low precision, this is a trivial case with one digit numbers, you would immediately find 19 minus 37 minus 52 and 11 as the output. So it will tell you that this vector of relatively small inches is essentially orthogonal to the input vector. Now you don't have to know why because it's just programmed in many other languages, but just out of curiosity, how can you use an algorithm to find a short vector in a high dimensional space to solve this? Does anyone know the trick? I could also ask, can you see the trick? I sure wouldn't have thought of it. It's very simple. You take, you see we want, here we want, well, this is not necessarily M, it's gonna sum N, D is the dimension. We want N1 up to ND in Z to the D, such that the sum, Ni, well just this, Ni X to the I is very small, very small, so we want, ideally it should be zero, but of course nothing is exact on the computer, and here you want them not too big because of course, if you take even just one in pi, then we all know that there's some integer combination that would just arbitrarily small, the integer in your combinations are dense, so you can make that smaller than 10 to the minus humility with numbers that have nothing to do with pi. You want the NNs not too big, but sometimes they are very big because you have a sequence of numbers and they might be in our 10 digit numbers and there might be seven of them, so then you'll need a certain amount of accuracy. So the idea is very, very simple. You define a quadratic form, so you first take the sum of the ND squared, we're gonna make that quadratic form as small as possible, so that'll guarantee that the NDs are not too big, and then we add, remember the X, I are given, you just don't know in an exact form, you take this linear form squared, that's a quadratic form, you multiply by 10 to the 50, that's a quadratic form, and now you make that as small as possible. Well if that's small, let's say it's smaller than 10 to the 15. Well then, since both terms are positive, this is less than 10 to the 15, so every ND is less than 10 to the seven, so they aren't very big. But if this is less than 10 to the 15, then this is 10 to the minus 35, but that's the square, so you've got 10 to the minus 18. So that's the simple trick, and of course you can vary the power 10 to the fifth, but you put some very big number. And then by the way, there's another thing, though you can also, if you have a real number, a real or complex, and it's given numerically to very high precision, and you put the degree D that you expect, and you do a test, I wonder if this is algebraic, let's say a degree at most four. So you would put algebraic dependence of your number and four. For instance, you could try algebraic dependence of pi, which in pi b is called pi and four, and you can put a precision, or if you're working to a thousand digits, it will assume you want to use all thousand digits. And then it will give you the best fourth degree polynomial that practically annihilates pi, but it'll have gigantic coefficients. And of course, this is just a special case because an algebraic equation for number x, well it's called the alpha, is just a linear combination with integer coefficients of one alpha after the D. So this is a special case of in depth, so you can recognize the linear dependence of different numbers or algebraic. So I wanted to talk very briefly today about this question. If somebody gives you a number, you found it with one of these asymptotic methods, and you have 50 or 100 digits, like we had this today for Atisha's problem, we have 100 digits, and in this case, we know the answer in terms of theta series, and it's such a mess, your chance of recognizing it's an algebraic number, if you don't know, would be zero. But very often you can, and I wanted to give you one non-trivial example that I mentioned, I think of the first day from my own work, but it's a paper with Martin Miller, that actually came up, where first of all, you had to find the number of high precision, and that's also not quite obvious, and then you had to recognize it, and that's not obvious. And so it's a fun example, it's not quite asymptotics, but it's very much in the spirit of what we're doing in this case. So this was a paper that we wrote on certain type Miller curves, and the type Miller curves gives you a linear differential equation. And in this case, it was a second order equation, and so I can tell you what the equation was. I have two polynomials, A of t is t times t minus one, so I'm working, it turned out, this was a particular example that was related to all type Miller curves have to do with Hilbert multisurfs, which means some real quadratic field. Here it was q of square root of 17, and so everything is in terms of alpha. And then there was a fourth degree polynomial. The details don't matter, even if you're taking notes, just put dot, dot, dot, it doesn't play any role at all. So let's call this t to the fourth minus beta t cubed plus beta t squared minus t. And here beta is lambda is 31 minus seven squared of 17 over two. And they're just essentially random numbers, and beta is lambda plus lambda inverse plus one, which is whatever it is. And the gamma, I don't have gamma yet, but I will in a second, is 27 minus five squared of 17 over four, just to say that these numbers are explicit. So we have one polynomial of degree four and another polynomial of degree two, which doesn't play any role at all, but it is, but I might as well give it, just so you see it's explicit. And that we don't possibly have enough information about this that we can guess anything just by eyeballing it. I mean, the problem is much too complicated. So here are two polynomials and the differential equation is l y equals zero, where l is the differential operator d by dt times this polynomial a of t times d by dt plus the second polynomial. This is standard form for second order differential equations. You should basically always try to write them that way. Okay, you can't always do it after renormalizing you can. Okay, so that was the differential operator. And so there are two solutions. l of y equals l of y squared star equals zero. So y is given by a power series of which we have lots of terms and you just put an unknown power series. You can normalize its linear start with one and then you just insert it into the differential equation and you can find the first 500 coefficients. And similarly, y star is y there's a double, the exponents of this equation are equal. And so there's a log term. So the second term is log t times the first term plus a new power series. And the new power series you can always subtract a multiple of this thing. So we can assume it starts with zero and we do. And then the next term is it doesn't matter at all what it is it's this over 64 t. Now comes the point. So this was the particular differential equation we had. And now what we were trying to understand and we knew it actually had to be true for abstract reasons that there must be a multidore parameterization. And we actually knew what the group was. So what that means is that you have z or tau called it z or z it's easy to write z in the upper half plane. And then we're going to have f of z is a multidore form but still unknown of wage one because it's a second order of equation or sixth order of equation eight five in z. So you know what a multidore form is and I won't repeat with respect to certain group gamma which we know and this group gamma does not contain one one zero one this SL2 but it does contain translation by alpha and then some other generators. So we know that this multidore form will have the Fourier expansion unknown is some some a n q to the n where q will be e to the two pi i times z over alpha because it has to be periodic. So we know that there'll be a q expansion we don't know what the ends are we don't know what f of z are because we don't know what z is but there's going to be and there's supposed to be also a multidore function. So remember what that means that means that if a b c d is in my group gamma then f so let's call it gamma then f of gamma z which is a z plus b over c z plus d is c z plus d times f of z but t of gamma z is simply t z is simply t of z. So what we know is that and then why if you substitute of t of z that has to be f of z that's what it means to parameterize a linear differential equation with multidore forms. So we can find this this program this thing as a power series of t just many terms you want you just put in unknown coefficient put the different differential equation it gives a recursion you solve you can get you know a few hundred coefficients it's a linear equation of course the coefficients will be in q squared of 17 because everything is in q squared of 17 but now we want to find this f. So the method in classical cases where you know that this model form in sl of 2c is very nice. There are always in this case the two exponents are always equal so one of one solution is y and the other I erased it but the two solutions here y is holomorphic and y star is y log t plus y1 which is again holomorphic so power series okay and I gave it the first few terms so that means that since those two series but sorry what we know is that the two series here are the two solutions of this equation will be f of z and the other one well some other one but not necessarily the one you have will be y star that's exactly how the differential equation looks the two independent solutions are a model form weight one and z times the model form and so the whole lattice they spend is f of z times mz plus n and that's just right when you applied the model group that becomes the monotromic group of the differential equation and the modularity helps you make everything work so then you see how that works now that means that z is equal to y star over y which is therefore some well-known some explicit polynomial well it's log t plus a polynomial which starts a power series I mean 439 minus whatever that number was 97 squared of 17 over 64 t et cetera so y star over y is going to be our z and so the q should be e to the two pi i z so it should be well let me take capital Q to be e to the y star over y well that will be t because the log and then plus the exponential of this will be 439 minus 97 squared of 17 over 64 t squared of course the later coefficients are different but you can compute 100 decimals so here is the expansion of q which is the thing we're looking for the e to the two pi tau in terms of t and of course you can easily invert this since you get minus the same number and again you have hundreds of coefficients now in the good cases that I knew from earlier work like Fritz Berger's wonderful work on the upper reproof for say of three this q really was the little q it was e to the two pi z the group is SL2z and then you just get the power series this is the usual q expansion of a multiple function and if you know many multiple functions maybe you can recognize it and in that case it was a quotient of a function it was very easy to recognize and you get then by substituting into f you get the power series of f of z has a q series and it's a multireform a very small weight it's easy to recognize so that's how you do it in practice if you believe that your differential equation has a multireframetization then you take the two solutions of the differential equation one is holomorphic one is a log term call them y and y star exponentiate y star over y call that q that is an invertible power series because y star over y starts with log t so when you exponentiate it starts with t so you can insert and now then you get that y which is a power series of t which is supposed to be f of z was also y of t becomes some explicit you know a n q to the n the only problem with that is we don't know that the z we want is really this z it could be some other z and so what happens when you do this is that this q is actually a constant but we don't know what the constant is times the real q so the real q remember is it's written here is e to the 2 pi z over alpha and only with that z so z is alpha over 2 pi i times log q only with that z well the group act on z otherwise it just won't work but capital q is the one that we do know little q we don't so there's a constant and the question is how can you find this constant so the original idea was the little q of course of z is in the upper half plane then q which is e to the 2 pi i z over real number is of course in the unit disk and so the sum a n q to the n has radius of convergence one always for any multiple form but now it's q to the n is the ones we actually have and so the radius of convergence will be absolute value of a inverse because this is scaling factor so now what you can do is you can take the first 500 coefficients of this thing make a very rough guess at the radius of convergence by taking the nth root of the nth term and well one over that and taking the limit but unfortunately these coefficients are quite regular they had a nice recursion but after this change variables they're very irregular so you can kind of eyeball and you get two digits and we found that roughly a was roughly 7.5 but you can't recognize the number that you only have two decibels and on top of it even if a is real which we didn't even know but even if it turned out it is it could be positive or negative it turned out to be negative and the radius of convergence will only tell you up to sign and so there's a tiny trick here which is actually irrelevant because it's not part of the story I'm telling here if somebody wants to ask I can say it takes two minutes but this is just a radius of convergence so limit as n goes to lim inf of a n to the one over n gives me that absolute value of a is roughly 7.5 but there's a small trick that you can use and you turn it into something with exponential rapidity so better using what you know about the multiple form in this case it's completely irrelevant we could compute this and this one will actually write out just for fun so this is not just one one four one one four five five six six two three two one one okay so that's I think fifty digits or anyway some large number of digits and now the question is what the hell is that number and so in the paper it's written after some trial and error we can recognize this number in closed form but it was still a question mark but later we had analysis and it turned out it was indeed correct this number is two well that's not very hard to guess three plus squared of seventeen okay that's a number in our quadratic field of norm eight or minus eight so that's not so bad and then there was five minus squared of seventeen over two that's also not so bad it's got norm two it's a prime but it was to the power seventeen minus one over four so you know that's really much harder to recognize and so with some trial and error we figured out well I figured out of course on the guy who loves numbers that it had to be that the conviction that it is that is once you've found this as a possibility you compute it you only need eight digits to find out but then you compute them all and they all agree so you really know it's true okay in all numerical things that's a good way don't use all the information you have use half of it to make a prediction and then use the prediction to compute the other half and then check because you'll feel much more if you've predicted twenty digits you know the chance of doing that at random is ten to the minus twenty use them all you never know if you cheated so it's it's always a good idea just very briefly how do you do this well it's not that hard we're in cube squared of there I did love I think of the person that there might be a pie somewhere but for various reasons I thought that this should be of the four algebraic numbers or products of algebraic numbers to algebraic powers and the only field is cube squared of seven and so the numbers here so you should take the log so log of a well without the minus sign would be a combination of log two log of this and log of this but the combination itself would be not just an integer combination but also a square of seventeen but then you can assume that the numbers here are small and the only interesting prime here except for seventeen was two so you could look for the prime factors I mean two actually factors is pi pi prime and so all of these involve only two pi and pi prime so if you look here at the log of absolute value of a and at the log of pi two and the log of pi two prime and then you apply and the n squared of seventeen times the log of pi two and squared of seventeen times the log of pi two prime that's only five numbers and so now you ask lindep and you immediately get tiny numbers and and they're these but if you didn't think of doing that that it may be you have powers which themselves in cube squared of seven you'd never find so the moral is not you know how clever we were we had some reasons to know that but the moral is one can recognize numbers even complicated numbers but only if one has an idea what type of number they'll be so another problem I mentioned in earlier lecture the individual numbers turned out to be polynomials with small rational coefficients in pi squared so they themselves were not easy to recognize they were a combination of one pi squared and pi to the fourth but if you know that and you have a lot to do so you use linear dependence so the idea is it's always a combination of thinking knowing your problem and having enough digits that when you find it it's unique and then you use these two things from parry or some other program linear dependence and algebraic dependence so because people often think it's complete magic how can you possibly know this but you always have to have an idea you there's no algorithm that would I just give you this number even to a thousand digits that'll tell you this is what it is but if you know our problems connect with cube squared of seventeen and could have algebraic numbers to algebraic powers then you can quite easily guess and even if there'd been a few more factors we could have put in a couple of couple more primes log of some other primes of cube squared of seventeen multiplied by one and squared of seventeen we would have equally found it because we had enough digits that even if we had ten unknown inputs we could find the right combination but if you don't know what ten things to try you will never find it so that was kind of my lesson about what you can do and what you can't do okay so that was kind of meant to be fun well now I wanted to talk about two more topics but the second one I was sure I wouldn't uh... be able to finish but in fact I'm not even sure anymore finish the first but I'll try to because although it's fun uh... first of all it's actually published and it's even in package preprogrammed so you don't have to know it works but it's fun and also it was co-discovered by five people uh... one of whom is big here of mine it's all there one is van Veenchoud and I don't know if it's uh... capital or not it's capital this was I don't write the references are given but it would be maybe in the fifties or anyway it's many years ago certainly before our time the next person is Anki Cohen he's a very old friend of mine and the inventor of Paris well he's also a very good number theorist the next is our colleague Fernando Rodriguez Viegas I won't write it out because he's right here and everybody knows when the last one was me so it wasn't quite teamwork we never worked together Euler did this thing long ago and invented but it's basically the essence of the algorithm but in a way that if you try to do it algorithmically on the computer would never work but of course he didn't care there weren't any computers anyway it was a theoretical consideration how you could understand something then van Veenchoud as I say is of the rough time I think just after World War II I don't remember anymore uh... made something you can implement that works and it's in books on numerical analysis but it's not as efficient as the final one then Anki Cohen who made Paris wanted to implement it and when he did that then he found an improvement and then I forget whether he was visiting Bordeaux and showed it to Fernando or Fernando was visiting Trieste and he showed it to him but anyway Anki showed it to Fernando who then found a further improvement and then I visited one of them they're both very old friends and they showed me and I found yet another improvement and so we wrote a little paper together so the paper is something like 1998 uh... doing this and it's cute not at all important and not really new but it is fun so the the method which is now uh... we always called it some else and there's now actually a thing in Paris called some else and the problem is compute to a high accuracy accurately fast and with minimal storage so you don't need a lot of numbers you don't need a big computer I mean a lot of space this space uh... the value of an infinite series well this is some with alternating terms now it turns out that they don't have to alternate you pretend they alternate and for the proof they will have to alternate but then we applied to other functions but they're not exactly alternate and it still very often gives you know we applied to function we know the exact answer it it often works anyway but it's meant to be for alternating terms so we'll write the sum and by the way it could even diverge so the theorem that we all know from uh... you know beginning very beginning analysis is that if the a case are all positive numbers and ten to zero doesn't matter how slowly then this something but the alternating sum will always converge to something but it can be very slow and the question is to compute it to high accuracy so let me first tell you the bottom line which is how good it is so uh... so we want to compute uh... so we have we know n values or we can compute the first n values so n might be in a two hundred and we won't use just that data so just the first two hundred coefficients a zero to a hundred and ninety nine and then predict the the value of this infinite series as accurately as possible and for a large class of functions uh... we can show that the formally we will get actually is is the unique best one so i can say roughly the uh... i'll write the algorithm in a second but the accuracy relative accuracy of course if you multiply the series by a million it's it's linear you just so it's relative accuracy meaning the the size of the error compared to the size of s for a very big class of functions which i'll write down the second of uh... sequences is always the same it's universal it's five point three two eight to the minus n and this is an exact number so if you have let's say five hundred terms of your series but you have them to high accuracy maybe they're exact or to very high accuracy but you only have five hundred terms then you can get five point three to the minus five hundred is the accuracy so if i turn that around you get you need approximately end to be roughly one point three one times capital K to get k decimal digits so if you want for instance hundred digits then you need about a hundred and thirty terms independently the function that's very amusing it's always the same speed of convergence the time okay the storage space is o of one and it's universal o of one it's actually six numbers so you might say wait a second if i five hundred numbers don't have to have a vector of the five hundred numbers no of course you have to be able to find the first five but you might have an algorithm and the algorithm might not be recursive it might be recursive then you have to make a table and then you have to store although five hundred numbers is nothing five million numbers is doable on the computer and you'll never have five million numbers but in fact we all have to store six because actually we'll use each ak only once so even if ak is given by some function a of k that is computable for given k as k goes from zero to two hundred you can compute it each time until it's too slow and you're getting annoyed and you don't even have to save it we'll use each value just once and then throw it away so ankhikon call that using them on the fly like catching a fly ball so the storage is o of one you can't beat o of one the accuracy you can hardly beat uh... you know the number of digits is simply linear in the number of terms and finally the what's the last thing that we want storage space accuracy of the time so this is universal it's also universal o of one per value read in so we're going to have a loop where k will go from zero to n minus one as that's the number of terms you have for each k you have to compute that one that might take a long time but the but the time of the computation is o of one it's like three multiplications and two divisions so it's simply so basically the time of computation is exactly comparable to the time to read in the series so if somebody has pre-computed them and gives you a vector then the time here is o of just the time to read the vector if you don't read the vector you'll never be able to give the answer so it's it really can't be better to up to maybe the value of the o constant and the algorithm itself is not uh... too complicated so I'll write it in kind of semi-code but it's if you know parry it's almost parry so here's the algorithm so remember what i'm assuming is we have these numbers a of k so this is something that my computer is capable of computing in n might be for instance two hundred so n is the number of terms we're going to use so I'm going to use this for k from zero up to n minus one i'm going to use the first n values and so the algorithm it is uh... only two steps the first is in initialization you first take d to be three plus the square root of eight to the nth power it's a very weird algorithm why on earth would you start with three plus the square root of eight and then take to the nth power it looks completely crazy and actually we won't use this because I'll then replace d but since I'll never use this one again I can call the new thing d so I'm using actually parry syntax I replace d by d plus one over square root of d this will remain and this is an integer and of course it is roughly since square root of eight is two point eight uh... it'll be roughly five point eight just the number we just saw to the nth unlike the four point eight in my problem with immanuel where we had two plus the square root of eight which is four point eight and this is five point eight okay so this is fixed and then I'm going to have three more numbers uh... which I'm going to compute in a loop and their initial values they're going to be called bc and s and the initial value of s is simply zero the initial value of c is this minus d which I'll never change this d will survive but bc and d so they will uh... they're they're going to this is the initial values and now the algorithm you'll see it's really short it's universal for k I'll use parry notation so this means we do a loop for k equals zero you do what is written right after then for k equals one you do it until n minus one and then you're finished so for each one we're going to update the original value of c then the original value of s and then the value of b in turn so c will be b minus c so you know in any computer language certainly in parry this doesn't it's not a mathematical statement that c equals b minus c meaning that b is to c it means you already had the value of b and c and you now set c equal the difference of what was previously b and c so that's uh... you know but that's in many many languages but if you've never done computer programming then you might find that confusing because it looks like an equality but it's actually setting it equal then you increase s by a of k so s sorry I've left out something there must be a b c times a of k so let me correct it from the yeah c times a of k if I just put a of k then of course at the end my s would just be the original sum that wouldn't make sense at all so c is a of k and then no a of k is... oh sorry excuse me uh... your a k is and now this was a vector but I'm assuming it's a function uh... but of course it could also be a vector then you just read in the vector so a k are the summands without the sign excuse me I'd put the a k but I haven't put that it's meant to be equal so it's I could write a k but if you know parry well actually in parry you can't put c times either as you can you have to put a star for multiplication it won't lie allow you and also if it's actually parry you don't have a square root sign you have to put as in tex square root of eight but I don't think that would really bother anyone the rest is pure parry as as it stands here you need the star but a of k I can't call it a sub k because it doesn't have k I could put a vector but then it should be k plus one because parry vectors start with one so let's just pretend it's a function and then finally I'm going to update b and that I won't write in parry form because it's too much of a nuisance I'll put what it actually is so n remembers our fixed number 200 k is going from zero to n minus one you'd have the factor k plus n times k minus n over k plus one times k plus a half and you multiply b by that and then well you could put it on one line in parry but you could at the end with the semicolon but you can just output s the sum and you normalize by this number d and that's the answer so what this will do for you is for given n you see it doesn't matter with the a of k r I mean it doesn't care with a of k there's just unknown numbers a zero to a k so if you fix n like five then it'll be some fixed rational linear combination of the first five values and it's the one that's supposed to give you the best guess, guesstimate of what the infinite alternating sum will be if you go to infinity so that it and that's what it does so it's quite fun that you know you have this strange number dn so where do I have a little table of numbers right here so here for n equals one two three and four so if I have one I have only one term and even there it gives an estimate it tells you you should take two thirds of the first term see a zero is too big because after a zero you're going to be subtracting positive things but a zero over two is too small if you had to guess you would say if there's a single number but obviously to try to estimate an infinite sum using just one term is kind of a little okay the next term is sixteen a zero minus eight a one divided by seventeen so I'll put the denominator in front so this uses two values a zero and a one the next one is one over ninety nine times ninety eight a zero minus eighty a one plus thirty two a three and the fourth one is one over five seventy seven times five seventy six a zero minus five forty four a one plus three eighty four a two minus one twenty eight a three so that's using the first four values and what you see immediately is that this denominator is the big number that was our d which is growing like five point eight to the three so already for n equals four it's already five hundred and seventy seven the coefficient of a zero is just one less and this is exponentially big so it's very very close to a zero well it's gotta be the series is supposed to be in the limit a zero minus a one and so on but you're just throwing away all the terms after the nth and trying to replace them by an intelligent combination similarly the next coefficient this is quite a bit less than five seventy six but it's only thirty that's only five percent less so roughly this is something like point nine nine eight a zero minus point nine five times a one and the next term is much further from one but if you take n equals twenty then the first three or four terms would be very close to one minus one one minus one after all that's what it has to be in the limit but the point is you're only using some tiny number of terms like here only four you have a very non-obvious linear combination you compute them there is a closed formula but you don't even need the closed formula for these coefficients c because you computed inductively each c is b minus c and b you compute inductively by this the s is nothing to it but those are the coefficients of c to get the linear combination so in this case this would be the first c this would be the set well made with the sign these would be the c's five seventy six five forty four three eighty four and one twenty eight and the five seventy seven is the d that we computed the beginning that you have to divide by it actually you don't even have to keep d if you want to have even less storage you could throw away d as well and just put c as minus this because in fact d as I told you is always one bigger than the final c but that's so silly that don't worry about it okay so that's the algorithm and now let me I still look for several minutes let me first state it in well this is written as a computer algorithm but of course it's completely incomprehensible in the sense that even if you don't know paris you can easily imagine that the computer is no trouble adding square of eight to three taking the nth power taking that plus one over d over two especially if you know it's an integer you can even round it off this like Fibonacci numbers it's an integer minus one minus d and zero is trivial and then you see that n times I have to do three operations which involve one subtraction one location one division the four additions of subtractions two locations one of the two okay in other words just a all of one like ten arithmetic operations just the four elementary operations and then you have all of your numbers so it's as I promised very very short the program itself is one line one line for initialization one line for the loop and then zero lines I mean if in Paris in Paris you at the end of the thing you have to put a semicolon I just put s over d then I don't need that line so that's the whole program you you can put a semicolon here so you read in this you have this line you output s over d so now let me write it in more mathematical form and then I'll give the proof and that will exactly fill up today and then I'll talk about highly divergent series next time okay so here's the actual what we called the proposition because theorem seemed I guess too big a word it's easy enough so for a given for integers I'll copy it straight from the paper n in case remember n is the number of terms we're going to have and k is going to go from zero to n actually I think only to n minus one I don't remember it doesn't matter you define rational numbers dn is the one that I already told you so it's three plus the square root of eight the n plus three minus the square root of eight to the n over two so this is in z and then c and k will also be an integer and there are two different formulas for it it's minus one to the k times this limiting value dn remember c zero was dn minus one so here you have the sum m from zero to k n over n plus m I'll try to write neatly a binomial coefficient n plus m over two m two to the two m and there's another formula for it which is also minus one to the k and now you take if you sum this from zero to n you would have the whole sum and so I could also go from k plus one to n of the same thing so those are the closed formulas but this is bad in that it's nice for a mathematician to write a closed formula this takes longer to compute you need all these big binomial coefficients these c and k satisfy recursion and the recursion is the one written here it's much faster to compute now it's this for each k would be roughly o of k so o of n terms n binomial coefficients of another n so now and we have to do it for every k up to n and then we have n terms and another n even if you don't store the binomial coefficients you're talking about n cubed operations here remember we had ten operations it was o of n to the zero it was just a subtraction uh... this is even irrelevant uh... three multiplications and division so it was really and a couple of additions so it's much more efficient but this is the closed form and then as I told you the approximation so s remember remember the problem I'll go it's still written you know it isn't I raced it so remember the problem was given be the numbers a k and the a k should be nice enough in the proof I'll say exactly what I mean by nice and now my approximation well you already know because I just gave you the algorithm is that we wait from zero to n minus one we wait the a k's without the minus one to the k because these things themselves will tend to minus one to the k's you saw there you just wait to seek the a's by c over d but it's easier to first take the integer and then divide the end and integer by another integer well it's only an integer if the a k's are integers so this is the thing but I haven't yet the proposition this is all definitions okay and then the theorem is then for a k nice and I'll say in a second what it is for the proof so if the sequence has good property but it's already mentioned many sequences don't and the method still works fine and some of us we understood why and sometimes to be honest we didn't really but it's it does but then the relative error is always less than or equal to one over dn which is remembered this number of this universal number which is growing like 5.8 to the n so not to say it and this is not a O of this is actually true so s minus sn is always less than or equal to absolute value of s divided by dn so it's even with no O constant it's simply true if it's a nice sequence and most of the sequence one encounters are nice in that sense but they aren't then then the proof doesn't necessarily apply but the algorithm is still there it's programmed anyway you can write this it takes less than a minute to just type that into paris you don't have to anymore because some else is now a command you can just call it but originally I used it for years before it was there and it's you know I did store it somewhere it's a one line program so I don't can race all of this advertising about how fast and how little storage and so on so here's what is nice mean and something analysts will certainly like ak is the kth moment so it should be a positive measure on zero one so in other words you have ak is the integral from zero to one x to the k d mu and d mu is a measure if you greater than or equal to zero which unless it's some singular measure which it won't be but for the theorem it doesn't matter it'll just be some non-negative function maybe a smooth positive function times dx so you know it might be w of x dx well it's always w of x but this could be a distribution or measure but roughly it's it's a positive function times dx okay so now I'll give the proof and for the proof I'm going to make a sequence of polynomials but first I'll just assume I have some sequence and then I'll tell you how you pick the sequence so we're going to have so here's the proof it's not at all long but I do have to look at my notes because well I did copy it into my handwriting so I could look at my handwritten notes it would look better we'll have we'll choose a sequence of polynomials which will be chosen nicely in a moment the sequence of polynomials pn of x the number dn which for the particular choice I'm going to make is going to be that dn but for the proof for most of the proof it doesn't matter I could have any sequence of polynomials and then the method will work dn will always be the value of pn at minus one and so and the cn remember that the cnk went from zero to n minus one actually they're given you take pn of x and subtract it from pn of minus one that's still a polynomial of degree n sorry I didn't say of degree pn is n so I have a sequence of polynomials of degree exactly n so they span the space of polynomials dn is going to be the value of at minus one the only thing I will definitely need is that it's non-zero but for our sequence it's going to be that you know five plus well that number which is certainly not zero so now this is polynomial degree n if I subtract it from this then it's still degree n but now it vanishes when x is minus one so I can divide by one plus x and these are the coefficients so that's the intelligent way to say what dn and cnk are for the particular polynomials I'm going to choose it's going to be this and for that you can reconstruct the polynomial but it's not the right way to to do it so now let's just look at the proof so now if I take sn which is by definition the sum so I'm going to define sn as what the algorithm says I'm supposed to do I take my n terms I weight them with these cnk and I divide the sum by dk well according to what I've just done then you can see that this is one over dn because I put that in front and dn remembers pn of minus one and then I'm going to integrate pn of minus one minus pn of x divided by one plus x dx because the cnk are exactly the moments of that and ak is the most sorry not dx dmu remember that ak is x to the k dmu and so if I take this times dmu and integrate I will get the sum cnk ak but the sum c but that is the integral of this thing dmu so that's that's that formula so you see it's very easy well but because of this you see that the actual sum we want which is the sum from zero to infinity minus one ak is simply the integral from zero to one dmu over one plus x because the sum of minus one to the k x to the k for x between zero and one is just one over one plus x that's kind of obvious so therefore the first term is pn of minus one times the integral dmu over one plus x which is s and then there's an error term and you see that the error term is less than or equal to mn divided by this dn which well absolute value but let's say it's positive times s well I can put absolute values everywhere well m will be positive and mn is just the maximum of the nth polynomial on the interval absolute value on the interval from zero to one because in the second integral this is bounded by its maximum the integral dmu over one plus x now everything is positive and so that is my s so that's why it's a relative error this is the maximum that I have to divide by pn of minus one so now okay now finally I say what the polynomial is and so finally the choice of the polynomial that's very fun so you choose uh... you write cosine of two nt that's an even polynomial with period pi and so you can write it as a polynomial in sine squared of t and that's going to be my pn so if you know your trebuchet of polynomials pn of x is the there are two trebuchet of polynomials s and t and one of them is called t and pn is just that one so that's just a change of the same shift that we used a few days ago remember for one minus two x you're going to go for gangbar these are orthogonal polynomials so pn of x is an orthogonal family for something simply because the these but now it's clear that mn is simply one because if I mean as t relates over the real number sine squared t goes from zero to one and this is cosine it's absolute values bounded by one so we know that the mn is one and that gives the estimate I told you that the error is uniformly divided by s over dn which is just what I claimed now dn is easy because dn remember is defined as pn of minus one but if you have sine squared t is minus one then sine of t is equal to plus or minus i and so you can now compute the uh... cosine of two n times that and you get a formula you find exactly dn and so one line computation so that is the dn so for this particular polynomial the maximum is trivial it's one because the function itself its values on the interval are cosine of something so it's a function that look like this uh... the dn will be exactly the one I told you and finally the cnk remember I talked about uh... orthogonal polynomials and I told that they always satisfy recursion here the recursion is this remember the recursion was always that the n plus first polynomial is a linear function of x times the nth plus the constant times the n minus first here's the recursion and actually that's all you need this one is the one that would give the recursion of the algorithm and then you can also write down the formulas that pn of x by standard formulas for the Chebyshev polynomials you can write it down and it happens to be this but it doesn't really matter times 4x to the m so this is a closed formula and then that would give the closed formula I wrote in the proposition because I said it's much easier to use the recursion so you see the proof is very simple the whole thing is simple but the fun thing is that it's incredibly fast that it's completely uniform whatever function you put in it always has the same speed of convergence if you have n terms like 1 over 5.8 to the n so 5.8 is logarithmically 70% of 10 so you need n only a little bigger than the number of digits you're aiming for if you want 100 digits you take 130 terms so in the paper we gave a couple of numerical examples and since I still have eight minutes left I'll just give them a sample of problems but you can use this obviously for anything and the first two will be straight up case that actually had come up some you know one needed the values of those sums and they were very slowly convergent so and so the first one is the sum of the product n from 1 to infinity of gamma 1 plus 1 over 2n minus 1 divided by gamma of 1 plus 1 over 2n so if you think about this this is just the product gamma of 1 over 1 plus k to the plus or minus 1 if you take the log it's an alternating sum but it's quite slow to compute because gamma let me finish the sentence and I'll answer gamma of 1 plus epsilon of course you can compute to high accuracy but it takes a little time it's a transcendent function then you take the log and so if you applied the method and we gave a few digits it doesn't matter at all what they are but if you wanted a thousand digits and you took this product it wouldn't work at all uh... well this one the way I've written it now is positive and you could use Euler-Mclaurin or many other things so this completely ragged or you don't really need it but so sorry I wanted to give two examples but Emmanuel that question so my question is so if one was interested in getting the best possible error term in the sense that the to get the maximum possible value of this dn so I guess my question is with regards to the optimality of this choice okay I'll try to answer afterwards but that's the previous thing let me come back to that at the I want to give three examples that I'm in the middle I gave one and it's kind of you know it's a distraction I'm just gonna make it'll take two minutes and then I'll come back but the papers published on my website and we do to discuss there are two variants of the method this is certainly the optimal one I think if you're exactly in this class the function there to be it depends how much you know you could have a function that has some other behavior like the measure you might know is very big at the left on the right in the paper we discuss other variants and there are two others I think we call them algorithms A, B and C I didn't even look them up anymore this is 20 years ago and they work somewhat better in the same situation or better in a more general situation or situation where these hypothesis are not satisfied so there is some discussion but I think for a very large class of the numbers well I erase the little table but starting with two-thirds are kind of optimal so as far as I know if you say dumb I only know four terms of a series it's alternate but I I expect to be fairly regular just from these four terms can you predict the value of minus one to the k a k then I think it will be the one that I said starting with 576 over 577 a zero and so on so anyway for a very large class it is optimal in this thing you can see that if I assume that I'm doing it this way with the polynomial and I'm taking p of minus one then there's no better polynomial than Chevy-Chev that's easy because Chevy-Chev keeps hitting the max for many times so it is pretty much but I'm not an expert and I don't remember even what we did to at the time there is a discussion and the answer is you can sometimes improve it so sometimes there's a variant which gives better accuracy than 5.8 so bigger exponential and secondly there's a variant which maybe gives a less good exponential but works for a bigger class of functions so there are certainly lots of variants and we didn't spend a lot of time again unless it's a question about this example can I wait till I finish the three examples because I'm so to speak in the middle of a very long sentence we just give three typical examples A, B and C what we actually called them A, B and C although there's no reason the next actually came up in somebody's paper connected with the kitchen, kinsons constant you take the dialog rhythm which is again and use it to compute and the dialog rhythm is a transcendental function and again I'm not going to write out the value but again you can anywhere on this eight value eight digits but you could give a thousand digits in so to speak no time at all and the third example I don't know why I called them A and B because the third is not C the third is let's say the Riemann's Ata function where of course Euler did it but that's not alternating but of course we know the trick if I take instead of well since I want to start at zero if I want these Riemann's Ata function I better take n plus one to the s and I want it to be alternating but of course that's very well known that that is simply the Riemann's Ata function multiplied by a simple known factor 1 minus 2 to the 1 minus s because it's the sum of the odd terms minus the sum of the even terms so it's the sum of uh... all terms minus twice the sum of the even terms which is simply 2 to the minus s A to the s so you have that and so this gives you immediately if you take z of a half which still converges because it's the terms are going to zero you get minus one point zero but for instance if you take minus one plus i then you get to again I'm not going to write out the values uh... minus zero point one one four dot dot times i you can compute this on any computer I'm in any computer system parier mathematical and you find that you get in in a few seconds you have hundreds of digits and they're completely correct it's not an alternating sum because now the sum and it's going to end to this complex power it's kind of random as well as the minus one to the s but for reasons that are not entirely clear to us it still works and similarly you can take the derivative of the Riemann's Ata function you get minus one to the n log n that of course does fit the thing and this one we actually know what it is in terms of zeta prime of a half and so you get zeta prime of a half very high accuracy and uh... and many others but then you can actually even take it when it diverges so if you take for instance minus one if you if I take s to be minus an integer then we know that zeta past is a rational number by order and then the method will converge almost instantly and give you the rational number on the nose so that's completely divergent it works and an example that a friend actually a student of mine has suggested is let's take the derivative again but I take them some minus one to the n log n so this doesn't even make sense but of course it does make sense as the log in the derivative of this thing well now it should start at one maybe uh... and so this one will put minus one and then it's zero point two two five seven and this is in fact known in this case of the it's one half log of pi over two because we know the value of the derivative of the zeta function so we don't know the derivative we know the value of zeta but this term would not I forget whatever it is you get that so in other words you can use the method even when it's divergent terms going to infinity but regularly enough or oscillatory but in completely different way and you know not at all of the right form so now I can ask take any questions that I kind of answered so I guess you kind of already addressed the question a bit because so here in these cases like for example where s is minus one plus i these ak's are not the case moments of some positive measure they're not even certainly not they're not even positive numbers okay so it works more generally than this obviously if it's a positive number of positive measure then they're positive and that's the situation we had in our mind at the beginning we know that if you have positive numbers that are going to zero or eventually going to zero that the sum at least converges but here I gave lots of examples here it's still positive but it's divergent and here it's not even positive it's not even real in fact and it's running all over the place uh... but I don't know is if you took out the minus one to the end so you so if I took this without the minus one to the end and called ak the kth term multiplied by minus one to the kth to force it into the mold where it would still work I mean I just didn't think of doing that so probably it would equally work but there is discussion that on the papers actually ten pages long what I told you is the first two pages given the algorithm and so and the proof if it's a moment and then the rest of the papers variance discussion what if these hypothesis aren't verified uh... I don't want to go into theory in this course this course is about practical methods and first of all this isn't that important anyway since the other methods I've told will equally work and secondly it's pre-probed and packing you don't have to know why it works you just type some out and you'll get the answer so if you type in if you have a usual sum in packing like let's say you want the sum from one to a thousand of one over n squared you would type this but that'd be really stupid if you did that because then it would give us an exact rational number with an absolutely gigantic numeric non-letter so if you want to get the pi squared over six well an approximation you should put one point over n squared then it treats each terms a real number and you'll get it to however many decimals you're computing to so that's if you have a finite sum but when you use some out like the example I just gave it will actually as a function of precision that you're currently working with it will decide what you want and so it'll put for instance n equals one to infinity minus one to the nth I think that you have to write it maybe it's even include in the notation you could just do this you don't even have to say n from one to a large number it'll automatically terminate at the right at the point it sees that you're working to four hundred decimals so you want four hundred decimals you can't get more than your inputting and so that means that the number of things you the number of terms you take is five hundred so it will stop at the right point automatically and then it'll give you something to four hundred decimals and it's always correct and it takes zero time when you you type it in you hit the return button and you get the answer it's essentially instantaneous if unless of course the function here something takes a long time to compute but if it's a vector or if it's very rapid to compute so as I say I don't want to talk about theory because it's not that important all these questions are reasonable it's not a theoretical course but they are kind of answered in the paper which if anybody wants a copy I can give them but it's they can also print it out so now if you've stopped my hours and even gone two minutes over time but still we can have another quick question okay then no questions thank you Campbell if you're still there for the nice algorithm and for giving me something to talk about for the first half an hour of today's course okay so next time will be very rapidly divergent series as I said and then next week and the week after will be an application of this circle method a very non-trivial one and if I have a little time at the end this problem is very very very slowly divergent sums but that's the one where I can't find my notes they're either in Bona or in China or somewhere and I couldn't find them so I'll have to reconstruct and I think I won't get to it anyway so it's kind of theoretical next week but yeah but today is only Tuesday so Thursday day after tomorrow is still this time same place same time four to five thirty on Thursday but next week and the week after it's only two more weeks after this week is Monday and Wednesday and I don't quite remember I think it was three to four thirty it was certainly an hour and a half and I think it was one hour earlier so three it's anyway it's on the announcement I'll certainly say it next time I forgot to check it it could be two thirty to four anyway if you don't come next Thursday you have to look on the internet or on the poster which is outside actually I think I have the poster right here in my notes so then I can know I was right for once it's three to four thirty