 going to pick up what we left off on Friday. So we were talking about complex numbers. So just to remind you quickly, if we have a number of like 3 plus 2 I, so we can write this as A plus I B. So here I is the square root of negative 1. And we can think of these numbers in sort of a geometric way as points in the complex plane, which is usually written as a mole C like that. And here if we have a number like 3 plus 2 I, we can think of that as the vector from the origin to 3 2. But also this number has, so this is A, this is B, this is the real axis, this is the imaginary axis. So this is a complex number like this. The real part is the part without the I, the imaginary part is the part with the I. We can do a simple piece in the usual way. What I sort of ended with last time is that we can also think of these in polar coordinates. So in polar we can have A plus I B. So if we think of this as having some angle theta and some length R, then R is the square root of A squared plus B squared and theta, well theta is whatever it is, it's the, so the tangent of theta is B over A. And this is called modulus and this is called, and theta is called the argument. And I'm not going to go through multiplying and dividing the arithmetic way, but I can do that on Friday. However, what I finished with at the end of Friday is if I multiply, so if I multiply say Z which has modulus R and the argument theta and I multiply by some other number W which has modulus S and argument B, then what I do is, so is I multiply the moduli and I add, so the multiply complex numbers, so if I think of them graphically, here's theta, let's just make R and S be one so I don't have to worry about that for now. Here's Z and let's put W over here, so this has angle C and modulus S. Then when I multiply these two numbers together, I add the angles. So put it out here, I said it would be one and I'm hiding it. So ZW would be over here. I know this picture is horrible, but this is, I don't know, how many people have seen this before? Okay, so I mean this makes sort of multiplication of complex numbers a little bit more like something else, a little more intuitive and also a little more useful. So for example, we can see here if you think about the number I here, what's the argument of I? What angle does I make with the real axis? 90 degrees, we usually call it pi over 2, but okay. So the argument of I pi over 2, if I multiply I by itself, as we already know is negative 1, that's how we set it up, but also notice that negative 1 has an argument of pi. So the modulus of negative 1, which is just the absolute value of negative, I don't have to keep writing down, you just write absolute value. So the size of negative 1 is 1 and the angle, the argument is 180 degrees, it's pi. If we multiply by I again, well that's I times negative 1 and again here the modulus is still 1, the argument I've added on the other quarter term, 3 pi over 2 and so on. I to the fourth is one again, which has modulus 1 and the argument, well, is either 0 or 2 pi depending, it's the same issue as the polar coordinates. If I go, so there's I cubed, I is 4, 1. So just like polar coordinates, if I go 2 pi around, I'm back where I started. So the same thing. Okay. If you divide, then you subtract angles. So that's, if I want to divide complex numbers, so if I want to multiply, is that clear? The division is subtraction of angles, maybe not quite. So for example 1 over I, this is, this is negative I because the modulus of 1 is the angle 0, the modulus of I is the angle, I mean the both modulus 1, the argument of 1 is 0, the argument of I is pi over 2, I'm going to subtract, so this guy, the argument of negative I, negative pi over 2, which is the same as pi over 2. So I subtract angles, then I go off. Okay. So, I mean there's actually a fair amount of geometry in complex numbers, which just comes from this business with multiplication corresponds to addition of angles. Now there's a sort of a surprising, when you first see it, the relationship between complex numbers is something else you already know where, in what other context do you know that multiplication of things corresponds to adding of something else? Logs. Logs, well logs go the other way, right? Logs, addition of the, of the, of the inner thing corresponds to the multiplication of the outer thing. So, so you're close. You just put backwards. Exponentials, right? If I multiply two exponentials together I add the power. So this is not a surprise, it's actually the same thing. So I want to put this notion, so we have this notion for a minute, I'll put it aside for a second, and I want to look at a couple of infinite series. So the infinite series for the sign, let's say the McLaren series. So we know that the sign of X has the McLaren series, let me just write the terms. So there's no constant term. So the McLaren series, which I'll write over here, equals 0 to infinity of minus 1 to n, because it's an alternating series. So the powers are just the odd powers. And that means that there's no constant term. The first, the linear term should be an X. Then there's no degree 2 term. The next term is X2 over 3 factorial. There's no fourth degree term. Then the next term is X to the fifth, or the five factorial, and so on. I'm going to stop there. And the cosine fits in between, it's the other term. So the cosine is the even terms here. So the cosine starts with 1, there's no linear term. Then the next term is X squared over 2, so that's a minus. And then the next term is X to the fourth over 4 factorial. And then the next term is X to the sixth, blah, blah, blah. Now these look kind of like something else. Well, let me just write down e to the x. It looks sort of like this, except the signs are wrong. Right? e to the x has the series just X to the n over n factorial. So it has all of the terms. Everything that's on one of these two lines is there, except the signs are wrong sometimes. So what would happen, I guess I can leave that up, what would happen if we decided that X was going to be a complex number? In fact, let's take X to be a purely imaginary number. Let's take e to the i times X. Just for fun, that's a good idea. And let's see what we get from this series. So the first term is a 1, and then the next term here gives us an i times X. And then the next term here gives us i squared, x squared, but i squared is negative 1. So that gives us a minus x squared over 2 factorial. And then the next term here gives us i cubed over 3, i cubed x cubed over 3 factorial, but i cubed is negative i. And then the next term is i to the fourth, but i to the fourth is 1. And then the pattern repeats. In the fifth term, I would get an i x to the fifth over 5 factorial minus, so now I have an i to the sixth, which is really i squared times i to the fourth, so that's a minus 1. So that's x to the sixth factorial to the seventh factorial. And here it's going to be minus i. And then the next one, and it will just keep going. The eighth term will just be x to the eighth over 8 factorial and so on. So here I go, plus, plus, minus, minus, plus, plus, minus, minus, plus, plus, minus, minus. And I have an i, not an i. Not an i, have an i, not an i, have an i. So every other term has an i in it and every, I don't know how to say it, the signs, s, i, g, n go plus, plus, minus, minus, plus, plus, minus, minus. Now, this looks a lot like these two things stuck together. Notice that the cosine terms, this part, this part, this part, this part, this part, that's exactly the cosine. So this is the cosine. And then these other terms, well, they're almost the sine, except they have an i in front of them. If I just put an i in front of every term here, I will get this term, this term, this term, this term. So if I just look at the series, without paying any attention to what it might possibly mean, it says that e to the i x is the cosine of x plus i times the sine of x. So this, this is a very famous formula. Usually it has a theta. So usually you would write e to the i theta is cosine theta plus i sine of theta. It goes by the name of Euler's formula. And you may have seen, sometimes we're not really quite understood, or maybe you understood, that e to the i pi, so what's e to the i pi? So if you're following anything that you would understand, just read. It's the cosine of pi plus i times the sine of pi. Well, the sine of pi is zero. The cosine of the pi is negative one. That tells me that e to the i pi is negative one. Which in fact, if you write it this way, e to the i pi plus one equals zero, then you have like all of the math constants in the formula. All the important numbers. You have e to the pi, you have i to the i, you have zero, you have like lots of important constants all in one formula. So what is that saying? What is this really telling us? I don't know. If you think of polar coordinates, so this is telling us that our polar coordinates for complex numbers are really exponentials. Because if you look at these polar coordinates that are here, where are they? I don't know. Somewhere there were sine of the formula. Let me just do it here. If I have a complex number z, it has real part a and imaginary part i times b. So z is a plus i b. Well, if this is an angle theta and this is a link r, then what is b? Well, b is r sine theta and a is r cosine theta. And we've just worked out, so if I have z is a plus i b, so that's r cosine theta plus r times plus i r sine theta. I can factor the r out. Now this is e to the i theta. So that means that if I think of my number in polar coordinates, the radius is just the real number that comes in front and the angle we can write as e to the i theta. It also makes the calculation that I did that multiplication is just adding angles, almost obvious once you have this. So if I wanted to multiply if z is r e to the i theta and w is s e to the i c, well then z times w is just the usual way that you would multiply these things. That's r s e to the i where you add the angles. That's e to the i theta plus i c. So that just says multiplication is adding angles. It's exactly the same. Division, I would just change the sine as i g n of this guy and multiply so it would be subtracting angles. So again we have this relationship. This relationship also means that all of the many of the stupid trig formulas that are hard to remember like what is the cosine of theta plus phi or what is the cosine of phi theta become trivial. If we wanted to figure out a formula for, we wanted to figure out the trig formula. So in some sense to teach trigonometry, first they should teach complex numbers and then it would be a lot easier. That was kind of a joke but not really. So suppose I wanted to know what the fifth power of this is. Well this is easy, right? This is just e to the i times phi theta. So that was easy. But also I can do it as cosine theta plus i sine theta to the fifth. Maybe fifth is too high to start. Let's do the double way. So that's cosine square theta plus 2i sine theta cosine theta minus sine square theta. So from this I can now immediately read off the fact that, so that's going this way. And going this way this is cosine 2 theta plus i sine 2 theta. So there's the double angle formula. The cosine of 2 theta is cosine squared minus sine squared. And the sine of 2 theta is 2 times the sine cosine. And if you want a fourth angle formula you do the same thing by just figuring out squaring this again. If you want a fifth angle formula you square it again and multiply by cosine plus i sine. Is this clear to people? No? Whatever? I mean it's not. Let's see what did I skip? So this also, so maybe that's enough. So this means then that you should be able to, so if we were still moving quicker I would make this be a quicker problem, you should be able to find the powers of complex numbers without too much trouble if you have to do the only angle. So for example, what is 1 plus i to the tenth power? So you can do this a long way by just figuring out the tenth power of this bitomial which kind of is a sucky way. Or you can think 1 plus i is here. In polar this has a length of square root of 2 and the angle is 5 over 4 into the tenth power. So what's the angle? The tenth power of that. Yeah, 10 pi over 4 is 5 pi over 2. So this is square root 2 to the tenth, e to the tenth pi over 4 i which is the same as, so this is 5 pi over 2 and square root 2 to the tenth is the same thing as 2 to the fifth because take half of them and square them. And 2 to the fifth is 32. So this is not hard, makes it actually a little easier if you know that this angle here is 45 degrees. So 5 pi over 2, of course 5 pi over 2 is the same thing, we can subtract out multiples of 2 pi, so this is really pi over 2. Pi over 2 is the same thing as 4 pi over 2 or 2 pi plus pi over 2. So what number is this? What complex number has an argument of pi over 2? I. The length of it is 1 and it's 38, it's 32. So let's say I start here with a length of square root of 2, I wind it around a bunch of times, I wind it around 5 times and I land here at 32 I. The angle here is 5 times this angle because, what did I do wrong? Oh, it's 10 times the angle, okay that's it. It's 10 times the angle and that's why it lands up here because 5 times the angle is here. So 10 times the angle is here. Okay, so the main point of doing this is twofold. This is not a class in complex analysis. If you are going to be taking physics or advanced physics, especially optics or quantum mechanics or things like that, and for sure you will use a lot of complex numbers. Quantum mechanics is essentially all complex numbers. And we're going to use them from time to time. So like if you looked at paper homework, the paper homework would do at the end of the week. There's something about complex homework in there. Not really. And so complex numbers will come back again. So the point of bringing them up now is, number one, the polar coordinates that we talked about before, here they are again, in a different form. And then these complex numbers will also come back a little bit in a couple of weeks. But this is a very important formula. Oilers formula is very important. So now I'm going to change topics yet again. So that was appendix, I don't know, I, something like that. There's some stuff in there about the marvelous formula. It's really just this. But let me move along. So the remainder of the course will seem like we're changing gears. There is a relationship between what we've been doing and what we need to do. Which is Bill talking next. But we're going to change gears a little bit now for the rest of the class. And we're going to talk about differential equations. Which means this is a, so differential equations come up a lot in a lot of things. So a lot of times you have a situation where, so we won't, sorry, we won't talk about differential equations in all of its detail. Or even in a lot of depth. But we'll have enough to sort of scratch the surface so you'll have some familiarity with it. There's an entire semester course on differential equations that is calculus four. But these come up in a lot of, in a lot of applications. You've probably encountered a couple already. So for example, you might have a situation where you have some population. And we want to describe the growth of, you know, the population of bacteria or rabbits or whatever. And we want to know how does the population grow. Well if you only have a few, then the growth rate is not very much. Because it may not grow greatly. The next generation will be small because you only have a few things breathing. But if you have a lot, then the growth rate is large. That's saying that the change in population is proportional to how many you have. We think of p as a function of t. And this function of t is telling us that the birth rate or the change in population is related to the current population times some constant. So if every, let's say your bacteria and every bacteria divides once an hour, then that means that the growth rate in terms of hours will double every hour. And so this factor would be something like two. So the population here is proportional to the population growth rate. So this is a differential equation because we're saying there's some function p of t satisfies the fact that it's derivative is some constant times itself. So this is a differential equation because it's an equation involving derivatives. We don't know the function at the start. This is sort of like in the infinite series where we have a series we don't necessarily know what the function corresponds to and corresponds to something. So here we have a relationship between the function and its derivative. Now do we know any function that satisfies the fact? So do we know some function whose derivative is a constant times itself? The exponential. So here, it's easy to see that e to the kt satisfies that equation. So if p of t is e to the kt, then we can check because p prime of t is k e to the kt. And here we have, we want p prime is k times p. And here we have k e to the kt equals k e to the kt. So it's good. So if you have some formula and you plug it into the equation and it works, then that is called a solution of the differential equation. So we would say that k e to the kt, not k. e of t, k e to the kt is a solution is a solution of this differential equation. You just plug in and check and it works, then that's a solution. Are there other solutions? So let's actually, let me make this be a specific equation. So let's say that I have the differential equation, obviously it doesn't need to be a p, sometimes it's a y. And sometimes we don't write the v of t. So we would write the differential equation y prime equals 3 y. So what is the solution of this differential equation? Give me a function y, let's say f of x. So somebody tell me a function of x whose derivative is 3 times e to the 3 x, yes. Are there any others? I add a constant, maybe, let's check. e to the 3 x plus 5. So does that work? Let's check. So then y prime is e to the 3 x. And so is it true that y prime is 3 e to the 3 x plus 5? Because e to the 3 x is not, did I lose the 3 somewhere? Well, this is 3 here. 3 e to the 3 x is not equal to 3 e to the 3 x plus 15. So I can't add a constant. Any other possibility that I can do? So there's an entire theory that tells you exactly whether we have all the solutions or not in that layer. But just from playing around, does anybody have, yeah, over 3 in the, do you mean? So that doesn't quite work because when I take the derivative I get 3 e to the 9 x. I mean I get, yeah, 3 e to the 9 x. And that doesn't equal 3 times 130. With 3 times 130 the 9 x is just e to the 9 x. So that doesn't quite do it. Really nobody has any idea? Yeah. Integrate both sides. Well, with respect to what? This is remember d v x. And this is a function you don't know. So you can integrate both sides if you're clever. And we'll get to that really soon. But we can't just integrate straight away because this is not x. This is y. So it's possible but not that possible. So, okay, I guess I'll tell you. You can add a constant but you don't add a constant. You multiply the constant. So if we take y equals any constant then its derivative is 3a e to the 3x which is 3 times y. So there's a constant of, there's a constant there but it's not an additive constant. It's a multiplicative constant. So your idea of an additive constant is right. You just have to add it in the right way. Not by adding it. So anyway there's lots of solutions to this equation and they depend on some constant a but not adding it. It's not the plus c that you get from integration. It's a times c. And that's actually related to your question because we just integrate both sides. If we manipulate this a little bit we end up taking the log. And so we're adding the constant in the log and so when we ask for an attribute it becomes complicated. So his comment about the log and your comment about integrating both sides are both good comments. They just need a little grrr to make them happen. So we'll do the grrr later. Okay, so now thought that you might have done this a little bit in your differential calculus course. No? No we did like exponentials in there a little bit but it was a long time ago. We forgot. So we're starting a little easy. Variations that we can do here. So for example, so the idea here is the point of this right now is to get you to think about differential equations a little bit. If we have say a weight on a spring, if we have a weight on a spring we know something about this. We know from Hooke's law which we did a little while ago says that the force is proportional so the amount of effort it takes to stretch this is proportional some constant. Some constant times X where X is the amount we move. Now if we aim, if we make X go up then maybe it's negative here. Just X is the height. So this is the spring the way that it's drawn the spring has a restorative force. But we also know that force is mass times acceleration and acceleration is the second derivative. So we also know force equals mass times acceleration which is the mass times. So if the block is at position X then this is the second derivative. So if Y describes the position of the block, well I guess I have it at X. So we have minus KX equals I guess there's a G here. So let's look at all of that. So this K is not that K. So we can absorb all of this junk into some constant let's call it. And we have a differential equation here that tells us there's some function X of time which is proportional to negative, so the second derivative of X, X is describing where this block is minus some constant times X. So if this X of T is describing the position of the block then X of T will be described by this sort of differential equation. This is called a second order differential equation because there's a second derivative. Now what function do you know whose second derivative is the same function except for changing the sign. Also the cosine. And in fact, as we'll see later, the solution to this kind of an equation depending on the value of this K is related to sines and cosines. So X of T here looks like, so I'm just going to make up some numbers, A sine T plus cosine T. So for suitable choices of A and B and suitable time scales of T, this will solve this equation. So I didn't relate K and A and B and stuff like that. Also come back to this population equation. I mean this works well for small populations with lots of resources, but sometimes you have limited resources. There's limits to growth. So let's think about this, just try and think about this as an equation that is describing a situation. So we start with the population is some proportion, oops, the derivative of the population, the growth of population is proportional to how many there are. But if there's too many, there's not enough food. So let's imagine these are rabbits and they live in this big nice green field with lots of grass and no wolves. They live in a nice rabbit preserve. It's not like strawberry preserves, it's different. So they live in a nice rabbit preserve and the rabbits have lots of grass and they can breed like crazy. And now there's just tons of rabbits. You go to visit the rabbit preserve and it's like get out of here, get out of here. You can hardly walk through. It's like those, you know, those horrible movies you see about chickens and egg farms and they're just everywhere. So how would we adjust this to say that in this, in this place, there can only be say 1,000 rabbits and if there's more than 1,000 rabbits, if there's more than 100,000 rabbits, there's not enough food and they start to die. How would we adjust this thing? So this says the growth is proportional to how many there are. But if there's too many, then the growth will be negative because they won't get enough food. So how can we adjust this to say that there's some upper limit to the growth? How can we make the derivatives be positive for small values and negative for big values? So what would this say in terms of, if I'm thinking now not of the solution, but I'm thinking of, well, anyone have any sort of idea? So that's what I decided not to draw, but since you said it I guess I will. So the solution that we're looking for would start if this is time and this is the population. You're saying, well, if we have not too many, then they go fast. Maybe they start kind of slow because there aren't too many. And then it's springtime for rabbits and they go really fast. So here we have just the added need for rabbits. And after a long time they have lots of descendants. But then if they start running out of food, maybe they overshoot something like that. Right? That's what you're saying? So this is the kind of solution that we're looking for. So that's good. Let me just smooth it out and make it simpler. Or you could think of bacteria in a dish. You put a couple of bacteria and pretty smoothly you got a few. And then they just go crazy, but then they hit the edge of the dish. And then they stabilize at a given population. So this is often called the carrying capacity because it's the capacity of whatever the system is. And in fact such a solution, so what we're going to do is put another factor in here that says that if it gets too big, a is some other constant unrelated to k. So this is sort of how fast they grow in the absence of limitations. And this is the limitation. Once you achieve this limitation notice that everything here is a positive number. Well except for this one with the minus sign. So that would mean A the derivative is negative. Which means that if for somehow I manage to have 15,000 rabbits, then things will die off. Because the population rate would be negative. It would be something forcing it back down to the level of A. This is called the logistic equation. The names don't really matter. But in case you can count these names, this is a logistic differential equation which is a model of population growth with limitations but it comes up in other states. So what we'll be doing for the next several weeks is we'll be examining differential equations in general and solving. We won't be doing so many modeling problems although we'll talk about some of these models. I'm going to do what you suggest with an easy gradient on side to have an example.