 Hi, I'm Zor. Welcome to Unizor education. I would like to spend some more time and talk about the higher-order ordinary differential equations. Well, higher order actually means the second order. Don't want to go any further than that. That would be kind of pure theory, which actually I'm not interested in right now because I would like to demonstrate the higher order differential equations as they are applied to physics. Now, the previous lecture was about acceleration and I had a primitive second-order differential equation which looked like this. Some kind of function. Now, I will just do a little bit more difficult in this particular case. So, that equation was just a very simple one. You integrate twice and you will get function x of t. Now, I would like to apply a little bit different logic and the application is a very physical problem, which is related to the law which is called Hooke's law. That's about a spring. So, I will have a little bit bigger picture here. So, let's assume that you have a spring which is fixed on the left end and here you have some kind of a point mass m. Now, let's assume that this particular string is horizontally stretched and this mass is lying on the table, frictionless table. So, the mass can move left and right along this line, which we will assume this is an x line. Now, this is a neutral position. So, this will be x is equal to zero and what our experiment is, we stretch this particular mass to another position, let's say d. So, this is length d. We stretched it by d from its neutral position. So, question is what happens next if we will just let it go from this point. Well, first of all, we know the equation force is equal to mass times acceleration. Well, acceleration, we know what this is. This is second derivative of the time of the x-coordinate by time. Now, mass is fixed. That's fine too. But the force f is not a fixed force and it's not dependent basically directly on time because we don't really know how it depends on the time. We do know the experimental Hooke's law, Hooke-Hook's law, which says that the force actually by its value proportional to a distance we have stretched our spring. Well, obviously, this is an experimental law and its approximation, obviously. Obviously, it depends on the material the spring is made and it depends on how much we stretch it because sometimes we can really overstretch spring in such a way that it will not return back at all. It will deform completely. But within certain reasonable limits, our spring obeys the Hooke's law and we can say that our force is actually proportional to a displacement of its end from the neutral position. Now the real law states that this proportionality has some coefficient k, which is dependent on the material the spring is made of and it should be assigned minus here. Now, why minus? Well, because if d is positive, force goes back, right? Force is trying to push the mass back to original position. So whenever my displacement is positive, force is negative. Whenever my displacement is negative, which means we are compressing the string, force should be is directed towards positive direction, right? So it's always opposite to a displacement. So that's why there is a minus sign and k is a positive coefficient, which depends on the spring basically. How big it is, how strong it is, what kind of a material, steel, non-steel, whatever it is. And again, that's just purely experimental kind of a coefficient. But what's important is that for a given spring and whenever I'm saying this is a given spring, it means I have certain value of k given to me. Force depends on the distance you stretch in this particular way. Now, if my distance is actually a function of time, then that would be my force as a function of time. So it's a function of time because it actually depends on the distance I'm stretching. Now, doesn't really matter whether I stretch it to this particular and in this particular case, my force is equal to minus k times d. Or I let it go and at any moment my mass is going back to the original, to a neutral position. Force is still acting on this particular point mass, right? So and the force is equal to exactly this minus k times whatever my position, whatever my displacement from the neutral position is. So at half the distance, my force will be half the force minus k times d divided by 2. And at any given time, wherever my mass is, my force would be exactly equal to this, where x is a coordinate of my mass because my zero coordinate is a neutral position. So this actually represents a function force as a function of time and I can substitute it here. And what will I have? My Newton's second law would say minus k times x of t equals to mass times acceleration, which is x second derivative as a function of t. So from the Hooke's law and the second Newton's law, I've got this differential equation of the second order because it's the second derivative. Now what's good about this equation? I mean, what's easy about this equation? Well, it's linear. You see, all x's, all the derivative, second derivative and the function itself are linearly related to each other. And that actually makes this particular type of differential equation both soluble. We can really approach this in a relatively standardized fashion. So let me just rewrite it in the form x second derivative of t plus k divided by m x of t is equal to zero. So this is my equation. And I'm going to show you how we can very easily solve it. All right. So let's forget about our pictures. We know everything about this and let's consider just an equation itself. So the whole preamble that I was just talking about before was to put some kind of a physical sense in this particular linear equation. Because I can start, okay, let's consider we have a linear equation of a second order. That's how we can solve it. That's not very interesting. This actually represents some practical situation. And to be exact, the whole physics is about different differential equations to be exact. Sometimes we are kind of masking this. If we are not teaching physics the way how it's supposed to be taught. I mean using this mathematical background which we have. But physics is about mathematics and differential equations to the very, very deep part of it. Okay. So let's consider we have this particular equation. And I will generalize it a little bit and I will tell about, I'll talk about how to solve it. So what's my generalized differential equation of this type? A linear differential equation. Well, I can always put it this way. Where p and q are some kind of constants. In this particular case, my p is equal to zero because I don't have the first derivative. And my q is equal k over m. All right, fine. So whatever it is, I have this particular type of equation. Now, let me start with this one. Let's just for a very short moment assume that we have this. So k over m is equal to one. Just for one brief moment. Do you kind of have a hunch, a guess what the solution might actually be? Well, recall that the derivative of sine is cosine. Derivative of a cosine is minus sine, right? So the function sine and its second derivative, which is minus sine, are together equal to zero, right? Sine of t goes to cosine of t goes to what's the derivative of this? Minus sine of t. So I'm differentiating. I'm differentiating d by dt. d by dt. So differentiating one, I get cosine differentiating. The second time got minus sine. So this is x of t. This is a second derivative of x of t. And obviously the sum is equal to zero. I guess the solution to this not very difficult equation. Now, what if I have some kind of a coefficient here? Well, here is how we can do it. What if I will put sine of alpha times t, where alpha is some kind of a number? Then the derivative is cosine of alpha t times the derivative of inner function, which is alpha. Now, if I will differentiate this, I will have minus sine of alpha t. And I will have here alpha square, right? Minus alpha square. So if this is true, then alpha square sine of alpha t plus a second derivative, second derivative of alpha t would be this alpha minus alpha square sine. So if I will add it with this, I will have basically here. So if my alpha square is equal to k over m, then this is an equation which has a solution sine of alpha t, right? So the solution to this one is sine of square root of k over m t. My first derivative will give me cosine times this square root. The second derivative would be minus sine times again square root. So I will have two square roots, which is k over m. And that's exactly what I have here. So I have guessed a solution. Now, are there any other solutions? Well, you know, I might actually think about something on the top as the solution which I can really think about guessing. Now, think about different signs between p and q. Do you remember, you see, what's the very interesting kind of a part about trigonometric functions? Because after derivation, they sometimes convert into themselves. Maybe a sign will be different. Like we have to twice differentiate to convert sine into minus sine. And then we have to change the sign. So with proper coefficients, we really can manipulate these trigonometric functions. What other functions actually allow similar things? Well, exponential function, remember? If you have a derivative of e to the power of x, we get e to the power of x. So even the first derivative actually converts into something. And then we can manipulate with different coefficients. So we have exponential functions and we have trigonometric functions. Now recall the Euler's formula. e to the power i t equals cosine t plus i sine t. Remember, when we were talking about complex numbers, we were talking about how to use complex number in an exponent. And that's where we were discussing this famous Euler's formula, which basically combines trigonometry and exponential function. So it looks like trigonometry and exponential functions are somehow related in the complex world, in the world of complex numbers. And all of them have this specificity that the function is transformed into itself after differentiation, maybe once, maybe twice, but in any case. So my very intelligent guess looking at that thing is, what if I will try to basically look for a solution to this particular equation in the form e to the power of lambda t, where lambda is any complex number. So lambda can be anything, a plus bi for instance. Now, differentiation of this function, which is not really a function of real argument, which takes real values. We were only talking about differentiation and integration, etc., of the functions which are real functions, real argument and real values. Now, this argument is real, but the value is complex, right? However, we can very easily expand all our theory. Everything whatever we did talk about in the realm of differentiation is actually absolutely true if lambda is a complex number. And that includes how to take the derivative. I'm not going to prove this because the proof is really very easy. Let's just consider that it's true and whatever I was discussing as a proof that the derivative of this is equal to whatever it was in the real world, in the world of the real functions. Exactly the same line of arguments can be applied to this because manipulation of the complex numbers is absolutely similar to manipulation of the real numbers. They have the same operations of addition, multiplication, division, etc., etc. So, what if I will differentiate this function couple of times and substitute into this equation? What will I have? Well, my first derivative is lambda times e to the power of lambda t, right? My second derivative, I will have one more lambda square. And by the way, again, notice since lambda is a complex number, it basically, this number e to the power of lambda t, it generalizes the properties of both trigonometric functions and exponential functions. Now, if I will substitute these into this equation, what will I have? Well, I will have lambda square e to the power of lambda t plus p and lambda, the first derivative, and e to the power of lambda t plus q. Oh, I forgot. Sorry. It's not just q. I'm sorry. It's supposed to be x of t plus q to the power of e to the power of lambda t. I know that e to the power of lambda t should cancel out, should factor out and cancel disappear, right? So that's how I noticed that I forgot to put the x of t. So this is the type of linear equation of the second order with constant coefficients. And we are looking for a solution in this form where lambda is some complex number. Question is, will I be successful to find the solution? Well, quite frankly, yes. I have already been successful because right now I will just cancel out this and now I have just a quadratic equation for lambda. And any quadratic equation, as we know, has two roots in the area of complex numbers. Well, sometimes the roots can coincide, double root. But in any case, it's still considered to be two. So we have two different lambdas which will make this a solution. Okay, fine. So we found, let's say we found lambda one and lambda two. Two solutions to this quadratic equation, which by the way is called a characteristic equation. So for this differential equation where p and q are constants and x is a function of real argument, this is characteristic equation, which again within the realm of complex numbers always have solutions. So solutions are lambda one and lambda two, which means e to the power of lambda one t and e to the power of lambda two t my two different solutions particular solutions. So I'm not saying this is the general solution. This is particular solutions, two of them. Now, since these are two different solutions, it means this solution makes this identity equal to zero, identically equal to zero. And this one makes this thing identically equal to zero, right? Well, it means that obviously any linear combination of them also will make this. So this represents a general solution. So can I assure you that there are no other solutions but this type where c1 and c2 are any complex, by the way, numbers? No, I cannot. However, I'm just asking you to take it for granted that this is the case. So this describes basically all solutions to this particular equation. Okay, that's very good, actually, because we have found a very important expression for a general solution. Now, this is a general solution, where do I get particular solution, which corresponds to my physical experiment? Well, obviously, c1 and c2 must be somehow defined. Right now they're undefined, and how can I make them defined? Well, I have to basically use the initial conditions. You know, what's the value of the function? Let's say it's t equal to zero, and what's the value of the first derivative? You remember, for acceleration for the second Newton's law, we were using the initial position and the speed, because our differential equation was about acceleration, which is the second derivative. If I'm talking about the second derivative as part of the equation, I have to have initial conditions on the first derivative and the function itself. So it's always like one order below that should be defined somehow. And that's what actually makes the complete solution. Now, we know how to solve equations of this type. All right, so let's return back to what we have. Oh, yes, one more thing. Well, this is a solution in the realm of complex numbers. Now, if we are talking about physics, we don't have complex numbers. Like distance, for instance, cannot be complex, right? So out of this, I should really extract only the part, which is the real part. And basically, get rid of the imaginary part of the complex numbers. Because otherwise, because any function of this type can be represented as the real part and the imaginary part. And obviously, imaginary part should not get involved. So this is a very interesting moment, actually. Because you see, we have started with physics, which is completely real world, right? Then we have added trigonometry, exponents, complex numbers with all these Euler's formula, which relate them together, added differential equation. And now we have to get back to the real world to extract from whatever solutions we have, only the ones which we are interested in, which are real solutions. So let's go back to our spring. Now, our equation was x of t plus k over m x of t equals to 0, where k is a spring constant and m is a mass. Well, traditionally, we are using omega as square root of k over m. That's easier, right? So now, what we do, we do exactly what I could just prescribe using a generalized second order equation with constant coefficients. So our equation is x of t plus omega square x of t equals to 0, right? Where omega is square root of k over m. So let me wipe out this and let's solve exactly the way how I was just prescribing. So first, we are looking at the solution in the form. Now, if we will substitute, we will have lambda square e to the power of lambda t plus omega square e to the power of lambda t equals to 0. We cancel e to the power of lambda t and we get lambda square is equal to minus omega square, which means lambda is equal to plus minus omega i, right? Which makes these are two solutions, 1 comma 2, which makes my general solution to this equation equal to c1 e to the power of omega t i plus c2 e to the power minus omega t i. Well, obviously we don't like this. To express our solution in the real world, this i is definitely not needed here. So we have to go back using the Euler's formula and represent it with cosine and sine. So it's c1 cosine omega t plus i sine omega t, right? Plus c2 cosine minus omega t plus i sine minus omega t, okay? Now what we can do? Well, first of all, we can get rid of these minus sign is here, right? Cosine of minus something is the same as cosine of the something. Cosine is an even function. Now sine is odd function, so this cosine of minus is minus sine. And now we can get together all these parts. Now, by the way, where c1 and c2 are any complex numbers, right? You understand that? So there are any complex numbers. So what it actually gives us? Well, if I will represent c1 as a complex number again, and c2 as well, so this will be a1 plus b1i. And this would be a2 plus b2i, okay? So what will be if I will do the multiplication? Well, I will have certain real parts and certain imaginary parts where I participate. So the real part will contain cosine of omega t with some coefficient here. And it will contain a sine as well, because you see this is minus i and bii. So if I will multiply them, i times i would be minus one. So it will be again the real value. So I will have certain real values with the cosine and the sine. So basically, I can say that I have this equal to some kind of constant with a cosine omega t plus another constant sine omega t plus everything else would be imaginary. I just don't want to to do whatever it is. So I can say that at the cosine, what I will have with the cosine? Well, a1 would be a cosine, a2 would be cosine, all right? Now, what will be with the sine? b1 with a minus sine and b2 with a plus sine. So it's b2 minus b1. That will be equal to d2. So I can always find exactly what are these coefficients. But it doesn't really make much sense to find out exactly what these are, because c1 and c2 or a1 and b1 and a2 and b2 can be any constant, right? We're talking in the very beginning that I can use any undefined, unknown constants, and the solution will still be the same. So here is exactly the same. Since a and b's are any constants, I can basically say that d1 and d2 are any real constants right now. And whatever is imaginary part we are not interested in. So I can concentrate basically on this. The real part of my solution is represented as two unknown constants with cosine and sine and omega is given, because spring is given, that's the k, the spring constant and mass is given at the end of the spring as a point mass. So we have a solution, a general solution, real solution of our equation. So this is it. Now let's just think about how can we find a solution which corresponds to our problem exactly. So let me just get rid of the imaginary part. This is my solution. By the way, it would be nice if we can check it out, right? So what would be in this particular case? The first derivative of this would be minus g1 omega sine omega t, right? That's the derivative of this, g1 is remaining, cosine will go to minus sine and omega will go the same, plus d2 omega cosine of omega t. So that would be my first derivative. This is x, this is x of t. Okay, now the second derivative is derivative of this guy, so it doesn't really work well. I use this one. So the second derivative of this would be minus d1 omega square cosine omega t. Now this would be minus d2 omega square sine of omega t. Now, if I will multiply my x of t, which is this one, by omega square and add to this one, I will get exactly zero, right? Because this is exactly omega square greater than this, and this is also omega square. So my solution is correct. I just don't know what d1 and d2 are, right? Now, I can determine these d1 and d2 based on certain initial conditions. So what did I have as an initial condition? Remember, this is my spring, mass m. This is my table, frictionless. So this is my x is equal to zero and I have stretched by d. And then let it go. What does it mean? It means that x of zero is equal to d, because that's the position and I have stretched. That's my initial position of my mass according to this system of coordinate. And then I let it go, which means I did not really have any initial speed. So x of zero first derivative is equal to zero. That's my two initial conditions. And they must be sufficient to determine my coefficients, d1 and d2. Okay. So if I will substitute zero into this, this would be sine of zero is zero cosine of zero would be one. So I will have d1, which means my d1 is equal to d. Okay, I've got that. Now how about d2? Now we have a second condition. So first let's just have a derivative, which is minus d sine of omega t plus d2 omega, n times omega, sorry, d2 times omega times cosine of omega t. So with t is equal to zero, my first derivative must be zero. Well sine is equal to zero anyway, cosine is equal to one. So if this is equal to zero, my d2 must be equal to zero, right? So that's my function, d2 is equal to zero. So this is a solution which not only is a solution to my differential equation, but also satisfies my both initial conditions. So if we will stretch our spring by the distance g and our spring has characteristics k and the mass attached is m, then this is the equation of the motion. Now what does it mean actually? Let's just think about it. When t is equal to zero, my function is equal to d, right? So that's my initial position. From neutral position we stretched it. Now as time goes by, what happens with cosine? Well, this particular function, you know, the cosine, it goes like this, right? This is zero. Now this is, if omega would be equal to one, then that would be my pi over two, right? But if omega is not one, then that should be what? t should be equal to, omega should be here, right? Then if t is equal to pi over two omega times omega would be pi over two, cosine would be equal to zero. Okay. Now what does it mean zero? So it means that at t equals to pi over two omega, my position, my x of t would be equal to cosine of pi over two, which is zero. So it means at this particular point it will return back to a neutral position. What happens next? Well, then t is increasing and this is pi over two omega. What happens in this particular case? You see, my cosine is negative, which means that after going through this point, my spring will start compressing because my x of t would be negative, from the neutral position to the left. So it will compress. And at some point, it will reach the minimum, which is cosine would be minus one, so it would be minus d somewhere here. So it will compress to minus g. So from pros d, it will go through the zero point to the minus g. And then again back to the neutral point, and it will oscillate back and forth, back and forth infinitely because there is no friction. And the spring is assumed to be ideal spring, so it doesn't have internal frictions. The table is not, it's frictionless, etc. So basically it will oscillate infinitely using this particular law of motion. Well, okay, that's basically all I wanted to talk about today. Again, don't forget what I said in the very beginning that the whole physics is actually filled with differential equations. My previous lecture where I was talking about acceleration and this one about Hooke's law, these are just two examples. In reality, I mean, if you will take a look at the electricity, magnetism, gravitation, I mean, differential equations are everywhere. And after I finish this course of mathematics for teens, I'm planning to start physics for teens, and I will use all these mathematical apparatus to present the physical concepts. All right, that's it. Thank you very much and good luck.