Prime Numbers Near a Trillion
Transcript
Let's go ahead and open things up today with a question that might seem like it's incredibly unrelated to the title of the video. So if you guys go to 3b1b.co. Live, link is in the description. You've all been there for some of the warm-up animations. I want you to just make an estimate for the following question. It looks like a couple of you have already started coming in with answers here. Consider the numbers between 1 trillion and a trillion plus a thousand. Okay, so this range of a thousand integers that's pretty high. Which of the following would you guess is closest to the proportion of these numbers that are prime? So if you were to go through the painstaking process of, you know, looking at all of those numbers between a trillion and a trillion plus a thousand, considering which of them are prime, what do you guess is the relevant proportion there?
So don't worry about getting it right or wrong. I'm mostly curious where people's intuitions are on this one. So while we don't necessarily have to do those painstaking calculations, I have gone ahead and written up a simple program that can do that for us. So if we hop on over to Python, it's not exactly the most sophisticated program for getting primes in the world, but it'll get the job done for us. So if I type something like get primes between 0 and 50, you know, we take a look. Okay, it's got 2, 3, 5, 7, all your favorite prime numbers between 0 and 50, you're gonna find in there. But maybe you don't like that range. Maybe you want to look between a thousand and a thousand fifty. And there you go. There's the primes between a thousand and a thousand fifty. And there's fewer of them. In general, as you get bigger and bigger, the primes get sparser and sparser, essentially because each one has more options for what it could factor into.
You know, if you're just doing the guess and check on something like 143, you just have to check all the numbers up to around its square root. Whereas if you're checking around a trillion, you have to check on the order of, you know, something like a million numbers, all the primes up to a million, whether or not they go into it. So you might think that when we, let's say we define the list where we're going to get all of the primes, you know, get the primes between a trillion, which is 10 to the 12th, and a trillion plus a thousand. This involves a lot of number crunching to actually find those primes. And you can see by the fact that, you know, the program I wrote isn't going to be the most efficient thing in the world. It takes a little bit of time before it gets there. So we can look at that list in just a moment. But before I want to properly take a look at what everybody thinks. And we have a great split! Oh, I love questions that split up the audience like this. That's always fun. So what do you think?
What do you think is the actual density of primes up there? Ooh, the correct answer is only third place. Usually in lockdown math, the correct answer is always at top. So this is exciting for me. It seems like most, or the largest number of people thought that D, one out of 250, that there would only be four primes in that range. After that, it was people who thought only one in a thousand, that up there, you know, primes are so rare they only come one in every thousand. The correct answer, the closest proportion here, would have been one in 25. So a lot more frequent than people might have thought. And what's interesting is actually if you ask this question to a mathematician, they would be able to pretty quickly tell you what the correct answer is, not because they're doing all that number crunching. And in fact, if you were to talk to a mathematician, they would look at this problem, they would do a small little calculation in their head and they'd say,
the closest is one in 25, but really it's going to be closer to, you know, one in every 27 or 28. That would be a bit more accurate. You might wonder how they do that, because if we look at the number crunching that our computer had to do, it had to check all of the potential factors for all of the numbers we were looking at, and it does give us all of the primes between a trillion and a trillion plus a thousand. So as you can see, they're, they're sparser than they are for just the numbers between zero and a thousand. But there's a meaningful number of them. You know, we've got one trillion seven hundred fifty one, one trillion seven eighty seven. The Boeing engineers are probably pleased that that's in there. And the actual length of that list is 37. So there's 37 primes in there. So the proportion out of the thousand is 0.37. Or the way we were phrasing it, it was one out of something,
so we might take the reciprocal of that and do a thousand divided by the number in there. And it's about one in every twenty-seven. But what the mathematician would do is they would say, I know this very cute fact about prime numbers, which is that the density of prime numbers near a given value, like a trillion, is around the natural log. So I'm going to type math dot log here, which takes a natural logarithm of that number. And we can, you know, check if you want, what does the documentation tell us. It says this returns the logarithm of X to a given base. If the base is not specified, it returns the natural logarithm, which is log base e of X. And just as a reminder, if anyone needs a little reminding on what logarithms mean, we talked about this all in the last lecture, so feel free to pop over. But when you have an expression like L in X, which is telling us the log with
base e of X equals Y, that is saying the same thing as e to the power Y equals X. It's asking the question e to the what equals X. So for example, the natural log of 10, it's around 2.3. And that's a kind of useful value to know if you want to make conversions between exponentials written with e versus exponentials written with 10, but the natural log of 10 is around 2.3. So that's saying the same thing as e to the 2.3 equals 10. Now the cutesy fact here is that prime numbers, their density is actually kind of related to this natural logarithm. If we went over and we took the natural log of a trillion, which was the number defining our range at the lower end of that range, you'd see that it's 27. And that was about the ratio we were looking at before, right? A thousand divided by the length of our list of primes. I mean, that's quite close. And the fact that that happens at all is, I don't know,
I might not call that my favorite piece of math because I use that term a lot, but it's definitely going to make the list of top five favorite pieces of math. That the log with base e has anything to do with prime numbers. So I want to show you another kind of cute fact associated with the relationship between natural logs and primes, because you might wonder why is it that we call this thing the natural logarithm? There's lots of logarithms, lots of different bases. What makes this one more natural? And I think the more often you see it show up in nature, the more that name starts to kind of make sense. So I'm going to play a game that will seem truly strange for a moment.
I'm going to take an infinite series, for example one that's, you know, a favorite among a lot of people. If you take 1 over 1 plus 1 over 4 plus 1 over 9 plus 1 over 16, and in general you're always taking 1 over n squared, and you add up all of those numbers. If you keep adding and adding them, they'll stay below a certain bound and they'll actually approach a certain number. And it was this open question in Europe, it was posed in Basel by I think one of the Bernoullis for a while, like what is the number that this equals? And eventually Euler, genius of the day, was able to prove that it equals pi squared divided by 6, which is very beautiful, the idea that pi is at all related to just adding up the reciprocals of squares. But it gets crazier than that. I'm going to play this weird game that's going to kick out terms that don't look like prime numbers, keep the prime numbers,
and then also scale down ones that are sufficiently prime similar for us. I'll show you what I mean. So 1 is not at all a prime. We're not even going to include it. 2 is a prime, so I'm going to keep that 1 over 2 squared term. 3 is a prime, so I'm going to keep the 1 over 3 squared term. 4, it's not a prime. But I'm not going to kick it out because it is the power of a prime. So I'm going to say that 1 over 4 squared term can stay, but because you're only the square of a prime, I'm going to scale you down by a half. It's kind of a way of saying you look sort of like a prime, but because you're only a power of it, I'm scaling you down by that power. 5 is a prime, so we keep the fifth term. 6, not a prime, not a power of a prime. We don't like it at all. It gets kicked out. 7, we keep it, and you can sort of see where I'm going here, but I'll write a couple more examples because it's such a bizarre way to
manipulate a series. You would think that this isn't going to get us anything nice at all. 8, it's a power of a prime, but because it's a cube, I'm going to scale it down by a factor of 3. So I'm going to take one third of the eighth term. 9, it's the square of a prime, so I'll take one half of the ninth term. 10 gets kicked out, we ignore it entirely. 11 stays as is, and on and on. So each one of your terms looks like the power of a prime. 1 over pk, and because this series, we're squaring them all, it's 1 over the power of that prime squared, but we scale it down by whatever that power is.
Now, because we've manipulated this in a pretty chaotic way, I mean, the primes are distributed in a pretty random fashion, you might think that this is completely uncomputable. It's just a crazy situation. And it's going to be smaller, you know, for sure it's going to be smaller than the pi squared over 6, because we left out the 1, we left out a lot of composite numbers, and prime powers bigger than, with a power bigger than 1, we scaled down. So it's definitely a smaller number. You might be able to guess where this is going based on the title of the video. What it ends up equaling is the natural log of what it was before, of pi squared over 6. And that's not just true for this particular sequence of sums of squares. There's a number of other formulas that get us something related to prime, where we could, sorry, something related to pi, which is evidently related to primes, in a way that's, um, I mean, you play the same game and you have this weird
fashion of taking logarithms, and not just any logarithm, the log base e. So just to talk through what I mean in this other context, if you take 1 minus a third plus a fifth minus a seventh plus a ninth, and kind of alternate back and forth between the odd numbers, you get pi divided by 4. I have a video all about this, Mathologer also has a video about it if you're curious. Very beautiful why it's true. But even stranger is when we play this game of keeping the primes and kicking out others. So 1 we're going to kick out. If we keep the third term, that's negative 3. Then the 5, we keep that. The 7, I guess it's a minus 1 seventh. The 9, we keep it but we scale it down, because it's the square of a prime. And in this case, because we're only looking at odd numbers, it looks like we're keeping quite a few of them. We have to get bigger before we kick them out. So like 15, that gets kicked out. 17 is positive, it gets to stay as is. 19 gets to stay as is. 21 gets kicked out.
23 gets to stay. So a very bizarre thing. I mean now the pluses and minuses, they don't alternate nicely. It's like minus plus, minus plus, minus plus plus, minus minus. It's a, it almost seems like a random sequence. 25, we can scale that down because it's 5 squared. 1 over 25. And this doesn't equal pi fourths anymore, but it does equal the natural logarithm of pi fourths. So evidently there's this relationship between taking logarithms with base e, which is to say, answering the question e to the what equals a value, and these sort of prime patterns. And it's quite beautiful when you think about it, because if you look at like this entire sequence up here, it's going to equal some number such that e to that number is related to pi. So you have this formula that's interrelating all of the prime numbers, and their powers for that matter, excluding the composite, so it's still a cool sequence, it's not just like all the integers.
We're taking e, raising e to the power of that sum, and you get something related to pi. I mean, clearly better than Euler's formula. I think you'd have to agree. So, we might at the end of the lesson get to why that's true. It'll depend on how much time there is. But the next two facts I'll show you, we will definitely explain why they're true. So we're going to play a couple more games with series here. These ones are going to be a little bit simpler facts to think about than the first two that I showed. But the relation with primes is just, oh man, if that doesn't make you love math, I don't know what would.
But if we played an alternating game that doesn't go through all the odd numbers, but it goes through every number. So I'm going to take 1 minus a half plus a third minus a fourth, on and on. And you might visualize this with a number line, where I'm going between 0 and 1 here. When we take 1 minus a half, you're hopping backwards by a half. And then plus a third, you're hopping forward by a smaller amount. Minus a fourth, you hop backwards by a still smaller amount. Then plus a fifth, and then backwards might get you here, and then forward might get you something like that. And you're alternating back and forth, and because each one is smaller than the last, you can probably see that it has to zero in on some kind of value. And as a matter of fact, it does. It zeroes in on a value that's around 0.69 or so, and more precisely, it comes in on the natural log of 2. The answer to the question, e to what is equal to 2. Kind of strange, don't you think?
That something like e would show up with relation to just odd numbers oscillating back and forth like this. And there's another relation that natural logarithms have to a sequence that looks like this. You might ask, what happens if we don't alternate back and forth, but we add them all together? What does that approach? Because in the same way that, you know, when we added all the squares, the sum of the reciprocals of the squares, that approached a beautiful thing, it was pi squared over 6, you might think an even more natural question to ask is, don't square them at all. Take 1 plus a half plus a third plus a fourth, on and on, what does this approach? Now as it happens, it actually, it doesn't approach anything. No matter how small a number you choose, this sequence is eventually going to get bigger than it. So I could say, keep adding terms and eventually you'll get bigger than 100. If you have some patience, keep adding terms and
eventually you'll get bigger than a million. And that's kind of surprising, because each one of these numbers is getting smaller and smaller, so as you're making your additions, you would think it's going to slow down, it won't get you past something like 100. But I can explain to you why this is going to happen, it's actually a very pretty proof. If I group my terms appropriately, so I'm going to group a third and a fourth together, I'm going to group all the numbers between a fifth and an eighth, all of the numbers between a ninth and a sixteenth, all of the numbers between 1 over 17 and 1 over 32.
So into these groups that grow in size by powers of 2, what I can say is that a third plus a fourth, well both of those numbers are bigger than a fourth. A third is bigger than a fourth, and, well a fourth isn't bigger, but it's exactly equal to, but that does mean that their sum, yeah their sum is definitely going to be bigger than 1 fourth times 1 fourth, which is the same as taking 2 times a fourth. Similarly, this sum here, 1 fifth plus 1 sixth plus 1 seventh plus 1 eighth,
each one of those terms is bigger than an eighth. All four of those terms are bigger than 1 eighth. So the group of them together is bigger than 4 eighths. Similarly over here, all of the numbers between a ninth and a sixteenth, all eight of those numbers are bigger than 1 and 16, so the sum all together is bigger than 8 times 1 over 16. And you might see where I'm going with this, you know, here I have 16 numbers that are all bigger than one in 30, excuse me,
bigger than one in 32, talking while writing, and of course all of these are just equal to one half, so this two fourths is the same as a half, four eighths is the same as a half, eight sixteenths, that's a half. So in other words, what I can do is group all of my terms so that the sum instead looks like taking 1 plus a half plus a half plus a half on and on forever. And that you can see, okay, if I keep going sufficiently long, it is going to get bigger.
And it also gives you a little instinct that this might actually be related to logarithms, because the size of our groupings grow according to powers of 2. So if you were wondering, how long do I have to go before the sum gets bigger than 10, you might have the instinct that, hmm, I'm going to have to add together, let's see, I have 1 and then the rest of them are halves, so I'm going to have to add together 18 different groups that each look like a half, so I might have to get up to the point where the size of my group is like 2 to the 17th or 2 to the 18th, something like that. And you would be spot on that it grows, well, it doesn't grow exponentially, it grows logarithmically, because if you're asking how far do you need to go in order to get to that point, it would be logarithmic. And as you might guess, it's actually the natural logarithm. So if I add up all of the terms to about 1 over n,
it ends up being approximately the natural log of n. And if you want to get even more accurate, it's the natural log of n plus a certain constant, this is a constant we'll talk about later on in the lesson, but just for an order of approximation, this gives you the idea that you need to get up to around the natural log of n. So I'm going to go ahead and pull up the quiz and ask you another question, just to see if you've been paying attention so far. So our question asks, which of the following is closest to the smallest value of n for which the sum 1 plus a half plus a third plus a fourth on a 9 you keep adding until you get 1 over n. How long do you have to go until that sum is bigger than a million?
So remember, your first instinct here might have been that this entire sum converges to something, in the same way that when you add the reciprocals of squares, it converges to pi squared divided by 6, very beautiful. You might have thought that you keep going to this and it converges. In fact, what happens is it'll always get larger, but you can be more quantitative than that, and you can ask, how long does it take before this gets larger than a million? So I'll give you a little bit of time to think through what the answer to that will be, and I will say, because we're kind of converting between E-related things and base 10-related things, if you wanted a little reminder, I can pull up the fact that the natural log of 10 is around 2.3, if you wanted to use that for estimation purposes.
So just to see if you were paying attention to the result that I just described of this thing growing like a natural logarithm, let's see how you answer. And I'll give another 20 seconds or so here.
Alright, even if you're not necessarily finished, I'll go ahead and see where people are on this one, lock in the answers, and then explain where it comes from. So, the correct answer is that it's around 10 to the 400,000 or so, which is a huge, huge number. The estimated number of atoms in the universe is around 10 to the 80th, so it would be as if each atom in the universe had a universe inside of it, that would get us to 10 to the 160, then each one of those had a universe inside it, that only gets us to 10 to the 240. You'd have to keep iterating like that over and over, and it would even, even that crazy idea, like mental thought for how you can get up to a big number, would take forever to get you to something of the size 10 to the 400,000. Alright, now the way that you would think about something like this is to take a look at what I just said. When we add up all these numbers up to the point 1 over n, it's about the natural log of n.
So what you're looking for is the value when the natural log of n is approximately a million. That's how long you have to go before the sum gets bigger than a million. This is the same statement as saying that n is about e to the power of a million. Okay, but of all of our answers, we're expressed in terms of powers of 10, so in order to make the conversion, I would think to myself, 10 to the what is equal to e? That way I'm going to be able to make a little substitution in here with the power of 10. Well, this is asking me what is the log base 10 of e?
And from properties of logarithms, like what we learned last time, this is the same as asking log base e of 10, but we're taking the reciprocal of that. Okay, and another way you could think about that is that e to the 1 over x equals 10. That these two expressions are the same, so we're looking for the natural log of 10, but we take 1 over it. Now our estimation for the natural log of 10, if you happen to know, it's around 2.3. All you would really need to know for this one is that it's roughly 2, or even that it's on the order of 1, because all the exponents in our options were looking very different. So if you're asking what's 1 divided by 2.3, I mean very roughly, it's like a half. So we could think of n as being very, very roughly something that's like 10 to the 1 half to the 1 million, just to get us something kind of close.
So that looks like it's 10 to the 500,000, and we know that that 1 half really should be a little bit smaller, because we're taking 1 divided by 2.3, not 1 divided by 2, so the number should be something a little smaller than 500,000. And indeed, of all the options here, there's one that's much closer to 10 to the 500,000 than anything else, so our very rough approximation would get us there. Alright, so that's pretty fun. Now, to start explaining where on earth some of these things are coming from, like why is the natural log present in these circumstances, I want to take a moment to start talking about E and the role that E plays in math in a way that I think sometimes it can be a little bit misunderstood.
So, just to start off, I'm going to pick a number from the audience, so in your own time, feel free to go to 3b1b.co and enter whatever your favorite number is. But the thing I want to talk about to begin here is how... Ooh, lots of answers coming in. That's always fun. When you see a family of functions, okay, so let's say we see something that looks like... I'll pop on over here... Something that looks like e to the r times x for various different values of r. This is something you see all the time in engineering, in math, in physics. We describe a bunch of different exponentials with some kind of parameter, like r sitting there.
And we say depending on what r is, this can give us a shallower exponential growth, something that grows exponentially but a little bit more slowly, versus a steep exponential growth. Okay? Once you're writing things in terms of a family, I think a lot of people have this instinct that these are all of the functions that e produces, like e the number is producing this beautiful family of functions. But it's important to realize this is the same statement as creating a family of functions that just look like a to the x with various different bases, where it could tweak what that value of a is and say, you know, sometimes it looks like 2 to the power x, sometimes it looks like 3 to the power x, or 4 to the power x. Tweaking that base gets us various different exponentials. That's actually playing the same game. For any one that you have here, like, you know, the function 3 to the x, taking powers of 3, I can choose an r such that e to the r x equals that. And in fact, there's nothing special about e. I could have chosen as the base here something like pi.
I could say look at the family of exponentials that look like pi to the r times x. It's not that pi is producing these numbers or pi is related to this family in a particular way. It's a choice that we're making to write it that way. And almost always, the choice that we make in physics and engineering and math all over the place to write families of exponentials is with e. So the right question to ask isn't what does e have to do with such a family, but why is it the right choice? I'll give you another example of where this can come up. I mean, they're all over the place, things that look like exponential curves. But one that's very important for probability and statistics is the bell curve. So it's something that we almost always write in the form e to the negative x squared. And a way you might think about this, by the way, is if we take just e to the x, we get this thing that grows and it kind of decays as you go to the left.
And if we made it negative, it would decay as you go to the right. So whenever the input to e to the x is getting very negative, it decays. So to make it decay on both sides, you could take e to the negative x squared. And then it's decaying on both sides and you get this nice bell curve. And because of that square, it sort of smooths things out, whereas if we had taken something like the absolute value of x but negated it, okay, then it decays on both sides, but we get this awkward cusp. That doesn't explain why this very specific curve comes up in statistics. but if you ever kind of want to remember oh what was the what was the formula for a bell curve again you can kind of think through the fact that this should have roughly that shape. And quite often it comes with some kind of parameters, though. For example, I could put in something, maybe a value I'll call s in there, that will determine how wide and skinny this bell curve is,
something like a standard deviation in the context of statistics. S wouldn't be that standard deviation. We would have to reciprocate it and square it and do some things. But the idea that when you tweak what's in that exponent, it changes the bell curve. That's the only point I want to make here. You can think, just looking at this, that somehow bell curves are produced by the number e. But that's not exactly true, because I could also write a to the negative x squared, and I get the same family of curves. As I tweak the value of a, I'm also changing what that width is, so I could come up with other ways of describing the standard deviation of this in terms of a. And it's the same family of curves. It's not just that they look similar. They are, in fact, the same thing.
And this is not too hard to show algebraically. It almost makes it look a little bit more deceptively simple than it really is. So we've got a lot of answers for what people wanted to enter as an example number to go with, so let's go ahead and see. It seems like the most popular answer, by a little margin above i, is 69, which I assume is because if you take all of the natural numbers between 1 and 9, and then you look at the divisors for each one of those, you look at the numbers, you list all their divisors, and you add up the divisors, it adds up to 69. And adding up divisors like this is a very fun and common thing in number theory, so I assume that's why people chose it. But the point here is that if you see some kind of function like, let's see, how should I write it? 69 to the power x. I could also write that. I could write the same thing as e to the power of the natural log of 69. Okay, I've written that kind of sloppily. Let me do it again.
e to the natural log of 69. That's the same thing as the number 69, right? Because it's saying e to the what equals 69, but then I've taken e to that, so I should get 69 back. All of that to the power x. And by the rules of exponentials, this is the same thing as e to just some constant, whatever the natural log of 69 is, times x. So I could replace that with a constant, which happens to be around 4.234, as any mathematician will be able to tell you, well-known constant of nature, the natural log of 69.
And the point here is that this just looks like e to some constant times x. So you might wonder, why do we make this choice, right? Because it didn't have to be pi. I could write that same function, sorry, it didn't have to be e. I could write that same function sorry it didn't have to be e I could write that same function as pi raised to a special power namely the log base pi Man, I'm writing quite sloppily here. Log base pi of 69 times x, that would be the same function. We could describe everything with a base of pi if we wanted to. And to just give one more example of where I think this, even though it's a, like it's a simple conversion if you know logarithms, that anything that looks like a to the x can be expressed as e to something times that, I think it's clearly not very appreciated that you can make that conversion, because any time that we talk about imaginary exponentials,
and I get that it's kind of a weird thing to talk about e to the i times t, once someone learns, you know, and I've made a number of videos in this series about it, Mathologer has videos, lots of people have videos about it, the idea is that e to the imaginary constant times some value t walks you around the unit circle, and in fact it walks you a distance of t radians. And the importance of this, the way that it comes up in, for example, electrical engineering, is it gives you this oscillating pattern. As you scale up t, you have something that's oscillating, and it gives a very nice way to describe sine waves and cosine waves and signals that oscillate. And there's actually one electrical engineer that I used to know, and he would always say, oh I love the number e. What I like about e is it's the number that spins.
That's really what makes e special, I realized this. e is the number that spins. But the problem is that's not, that's not exactly true. It is true that e to the i t spins around, but that's not special to e. I could also take 2 to the i times t, and that will also produce values that walk around a circle. And we can think through more exactly, 2 is the same thing as e to the natural log of 2, so 2 to the i t is the same as e to the natural log of 2 times t, all of that times the imaginary number i. Which basically means it's doing the same thing as e to the i t, it's just rescaling time. It's walking a little bit more slowly. And then similarly, if you were to take something like your favorite number to the i times t, that would look like e to the approximately 4.234 times t, all times the imaginary number. Which just means you're walking around at a different rate. So e is not the number that spins.
The idea of complex exponents walking around a circle doesn't have to do with e per se, it really just has to do with a lot of what we talked about I think in lectures 4 and 5. And I'll go over it again in just a moment here as a quick reminder. So the thing that's special about e, the reason that we always choose to write things in this way, has to do with rates of change. That when you take the derivative of e to the power t, this is the same thing as itself.
Which is to say if we were to graph this, you know maybe e to the t represents an amount of money you have over time or something like that. And we were to look above a value of t, the slope of this graph, the rate at which it's increasing, is actually equal to its own height. So the farther you are along the curve, meaning you have a greater height, the steeper it is. So the more money you have, the faster it grows. This is the power of compound growth. But that's actually true of any exponential. What makes e special is that they're exactly the same, it's not just that they grow in proportion with each other.
So if we were to write a family of exponential curves as e to the r times t, as opposed to writing it as a to the power t, and thinking of changing that value a, the value in doing that is that taking the derivative by the chain rule, we take the derivative of the inside, which looks like r, and we multiply by the derivative of the outside, which is e to the rt. And if anybody here doesn't know calculus by the way, we're about to start doing a fair amount of it, I have a whole series on it that you can pop over and take a look at, lots of other places on YouTube and such to give a quick primer. But if you're coming in and you're not familiar with calculus, like just be warned that that's where we're about to start going. Because if you want to understand natural logarithms, and by extension the number e, the importance that they have has everything to do with rates of change and the inverse of that operation, as you'll see.
So anyway, why would it be nice to express a function like this? Well what it's telling you, let's say this was something like the size of your investment. This is an expression saying how much money you have at a given point in time. If you want to know the rate of change of that, how much is it changing per unit time, it's proportional to itself, and r gives you that proportionality constant. If r was 0.01, it's telling you that the rate of growth is 10% of the size of the thing itself. So the choice that we make to write things this way is, it's basically a way to make all the constants involved more readable. So if you're to look at these statistics associated with bell curves, and the way that we actually tend to write things, the pattern ends up looking something like 1 divided by s squared, and sometimes that x instead of writing it as x. Strange parentheses. I might say x minus m for some value of m.
Both of these terms end up having really nice readable meanings, where m, this isn't specific to the e fact, but it's just a common thing you'll see, m gives you the mean of the distribution, where this pile is, and s gives you the standard deviation. And when we choose to write this family with e, it's giving those constants readable meanings. And a similar thing happens with how we describe complex exponentials. When we choose to write the idea of walking around a circle with e, it gives a very readable meaning to what this term t is. It's saying, what is the distance that you've walked along the unit circle? And you can actually understand this with derivatives pretty well, where if we say, what is the derivative, what is the rate of change of some value that looks like e to the i times t, by the chain rule, this is going to look like i times itself, e to the i times t. Now what would that actually mean? That means that if you're sitting at some kind of number,
if this is your current value for e to the i times t, the rate of change is i multiplied by that value, which is a 90 degree rotation of this vector. Maybe I would draw it like this. This right here would give you your rate of change. So you might move that over and consider it a velocity vector. So this is kind of like your velocity vector, this is kind of like your position vector, which I might write something like an s. So what this whole expression of e to the i times t is essentially saying is, whatever this does, if it's somewhere in the complex plane, at every given point, the rate of change of my vector is a 90 degree rotation of itself. And so that's why we're walking around the circle at a speed of one unit per second, because the length of the position vector is one,
so the length of the velocity vector is one. And it's also why, if you were to look at two to the i t, it walks around at a different rate. Because there, the constant is not just i, a 90 degree rotation, it's i times natural log of two. i times something would mean that this, where are we, this operation here is not just a 90 degree rotation, it's a 90 degree rotation and a scaling. So your velocity vector would end up looking a little bit shorter, and you'd be walking around the unit circle more slowly. So that's kind of the important thing to understand about e, the fact that it's a choice that we're making to write families of exponentials this way, but because it is its own derivative, that ends up making these things play much more nicely. Now, this lets us take derivatives of anything else if you wanted. If you did describe your money's rate of growth with a to the t, to take its derivative,
you could first do a conversion, write the whole thing as e to the natural log of a times t, and the reason you would is then when we're, I sort of squished my font here, then when you're taking the derivative of that, the derivative of the inside is the natural log of a, and then that's multiplied by itself, e to the natural log of a times t, which you could then spell out even further, convert it back into a to the t. so if you did describe all of your investments as a to the power t which kind of feels more natural to a lot of people that oh you might say rather than e to some investment rate times t just think of 1.05 to the t and that describes you know something like five percent growth If you were thinking of that growth in a continuous sense, not year over year, what's the new percentage, but moment by moment, what's the rate of growth, you would have to say the rate of growth is the natural log of that base, which just feels a little bit more awkward.
You could do it, but it would feel more awkward. Now, all of this leaves open the question of why? Why on earth is the derivative of e to the t equal to itself? It's this very nice property, so you might wonder where this thing comes from. And it really has everything to do with how you define the number e. And this can be a little bit frustrating, where in some contexts you'll see people say, what is the number e? Well, it's the number defined such that this derivative equals itself. And then other contexts, you might find e defined in a different way that is very conducive to whatever the circumstance there is.
So you might wonder, okay, can we come at this a little bit more directly, and try to understand derivatives of exponentials, and see why the special value 2.718 would fit into it. And to do that, let me draw myself a new graph here. Let's say I have some kind of exponential. And if I want to understand the rate of change, the slope tangent to that point x, the way we often think about it is think of two nearby points, so another one that might be x plus a little constant times h.
And then we're going to look at the slope between those two points and consider what happens as h goes towards zero. So if this whole graph was a function a to the x, if we wanted to give a very direct look at what might the derivative of this expression be, we can make an attempt to calculate it ourselves without depending on a pre-established fact handed down from on high that e to the t is, or I guess in this case e to the x is its own derivative, and then manipulate based on natural logs and such. So what does this look like if you try to come at it directly? Well what you would say is that the change in the height of the graph divided by the change in the width, the sort of rise over run, dy dx, looks like the difference in the outputs at those two values, so the output at the high value, which is x plus h, minus the value at the low value, a to the x, all of that divided by the step in the x direction, which is just of size h.

Ask anything
We've read this whole study set, so questions about it get the best answers.