Welcome back to the present lecture. So, we are going to do the second order linear differential equations both homogeneous and homogeneous cases in this next two or three lectures. The last two lectures in this module we have finished first order linear equations and also we give some details about the differential equations which are exact namely the exact differential equations. So, we will start with the second order linear differential equations. A general second order differential equation will have the following form f of t y y prime and y double prime equal to 0. So, this is the most general form which is a relation connecting the unknown function y equal to y of t y prime of t and y double prime of t and that is a general form. But what we are going to see is that as in the first order case if you treat this as a function of say y y prime y double prime then we demand l is linear with respect to all these variables with respect to y y prime y double prime. Just like in first order case where there was no y double prime we had only up to this part up to y prime in the first order case even divide in that. We do not demand as like in first order we do not demand any linearity with respect to t. So, we have linearity with respect to y and y prime and y prime. Then from the linear algebra it is not a difficult thing is a general form of linear equation a general form of second order linear differential equation will have the form p naught of t because you do not have y double prime plus p of t y prime plus q of t y equal to r of t. So, this will be the most general form of the second order linear equation and again as I told you in the first order equation whenever there is a coefficient in the y double prime which vanishes which will be singular type differential equations. So, the moment is the highest order has coefficient which vanishes which will not come in the regular category. So, in this thing we are not going to deal with it later you may see some singular equations in some other module. So, the general form we consider are more regular general form we consider the form y double prime plus p of t y prime q of t y equal to r t. So, we will have this is the equation which we are going to consider which we keep on one. So, this is our main equation with coefficients p, q and r. In fact, we have seen an interesting example in our module 1 when given the introduction about the spring mass as per system and also RLC circuits where p not p 1 p q p q r and t are constants and see the impact of the second order and solution all that results and how to find with constant coefficients we will see it in this in this. So, the one of the as I said again in the first order equation the important thing is the superposition principle which we are going to see superposition principle. What is the superposition principle? If you have two solutions of the homogeneous equation if y 1 y 2 are solutions to homogeneous equation that is l of y 1 y 1 prime y 1 double prime. That is y 1 prime in this case we have y 1 double prime plus p t into y 1 prime plus q t y 1 prime equal to 0 that is a homogeneous equation. So, when the equation in this case is here if r t equal to 0 one is called homogeneous one is called homogeneous otherwise non homogeneous otherwise non homogeneous. So, that r t equal to 0 homogeneous situation. So, that is what we are taking we are taking r t equal to 0. So, similarly l of y 2 y 2 prime y 2 double prime equal to 0. So, if y 1 and y 2 are solutions to your homogeneous system equation then alpha y 1 plus beta y 2 also satisfies also satisfies y equal to alpha y 1 plus also satisfies l of y y prime y double prime. This is the superposition this is the typical nature of the linear system. So, that is what it will be satisfied we exploit this to understand the solution structure of the homogeneous equation and non homogeneous equation. One of the difficulties in unlike in first order equation where we could completely determine the solutions to your differential equation there is no general recipe to find the solution to your second order equation. So, we want to understand the structure of the solution space, but there is no way to determine the solutions and that is what we are going to study in this situation. Regarding existence existence this will follow from the general theory which you will be studying general theory or one can also refer any book for example, you can refer the book by Simmons to see a proof of existence. So, we are not going to prove the existence theory, but let me just state the existence theory assume p q are continuous in the interval t naught to t then there exists a unique solution to the initial value problem. I will explain what is the initial value problem here initial value problem l of y y prime y double prime is equal to r with y at t naught is equal to some y naught l y at t 1 is equal to y 1 this y 1 is a solution y 1 is a constant. So, this is the so why this initial value problem is that naturally coming let us look at the given system. So, we will not prove the existence, but existence can be proved from the general theory or from any other situation one can prove that general theory. So, let me see why this initial value problem is very natural how do you get that one we can write a second order equation can be written as a system as this is also true for nth order equation. So, that is why you want to stress that we will recall all these things later when we study general system. So, put y is equal to y prime is v is equal to y prime if you put v is equal to y prime or in other words y prime equal to v both are same then from the equation you will get if you are substituting y double prime is equal to minus p t y plus q t we are considering the homogeneous system you can also write this also minus q t minus q t plus this is y prime. So, this is y you can put this is equal to r t you want it non homogeneous system if you want. So, if you put this in terms of v this is equal to minus p t v minus q t y plus r t. So, if I write that this as a system y prime y double prime is nothing but your v prime. So, you can write that if you combine it as a system. So, you have y v. So, you have a system v prime here I can write it in the matrix form.  So, what do you want to get it first you get it v here. So, you want y prime should be v.  So, you have minus q t here minus p t here plus you have your r t that will be of the form 0 r. So, this can be written in a nice form later you will see if you put your x is the vector y v this is nothing but. So, we will get a system of the form d x t by d t is equal to a t x t plus some g t where g t is equal to 0 r t. So, you can write it as a system of equations this can be done here. So, if you recall the first order equations. So, you have two. So, we have two first order equations first order equations equations for y and v. Thus we need two initial conditions thus we need two initial conditions conditions y at t naught say equal to y naught and v at t naught is the same as y prime at t naught say y is equal to y 1. So, that is why the initial condition and we have seen in the first order equation when you study because of the integration there is a constant when you integrate out you have a constant and if you want to fix that constant you need one condition. But, we have two equations two first order equations have in principle you have to integrate two unknowns y and v both requires one condition each. So, the initial value problem with the two conditions for second order equations is quite natural. But again there is a speciality in the second order equations second order equations can also be considered such equations l equal to say r t can also be considered in an interval say a b in an interval a b and the conditions at the end point conditions y a y at p can be prescribed. There are very many interesting physical problems where we comes as a second order equations in an interval with boundary conditions. These are called the boundary value problem and we may not go and elaborate study of boundary value problems in this course, but we may give two or three lectures about the boundary value problems in some other thing. But, in this particular module which I am going to do it about the second order linear equations we will not deal with boundary value problems and this is for the remark to be this is the remark which I want to make it. So, now let us go to the so we will classify into thing. So, first we will start with the homogeneous second order linear differential equations.  So, let me call once again your differential equations for that l of y y prime y double prime is equal to y double prime plus p t y prime plus q t is equal to 0. So, that is why what we are going to study. So, as I said the other remark finding explicit solutions is difficulty in general finding explicit solutions to this let me call this two explicit solutions two is not possible always. This was not the situation in first order equation not possible always. What I am trying to say that there is no general recipe to solve this equations in general with general p and q, but when p and q are constants the such equations are known as second order equations with constant coefficients which you already seen in module one of that spring mass dash pore system R L C circuits. For that we will have an explicit method of solving it, but when the coefficients are functions of t since there are no general methods to do it there are there are general recipe to write down the solutions we need some methods. So, in this module in the next lecture or something we will also introduce one or two methods to find it, but they may not cover everything, but it tell you in certain situations you may we may be able to find the solutions. So, the first main thing in this particular lecture today's lecture is to understand the solution structure can you tell me can you tell us or can you find some property of the solution space and that is what we are going to do it and we have the following proposition that is what first we are mainly going to prove this proposition in this lecture. So, let y 1 keep y 2 these are the solutions these not the initial conditions. So, please give y 1 and y 2 are functions of t y 1 equal to y 2. So, it is a it is not the initial condition y 1 equal to y 1 of t y t equal to y 2 of t be any two solutions any two solutions of 2. Then this is nothing, but a superposition principle which I already explained. Then alpha y 1 y equal to alpha y 1 plus beta y 2 is also a solution to two for any scalars for any alpha beta belongs to r. This is a superposition principle which we already proved, but the converse is also converse in some sense if suppose y 1 y 2 are independent solutions. So, you understood the concept of independent solutions independent solutions of 2. So, earlier case we are not demanding y 1 and y 2 are independent any two solutions you take it then it is linear combination is also a solution. What the converse is that y 1 and y 2 are independent solutions y 1 that mean as a function 2 function set it is an independent set or independent solutions of 2 then any solution that means a general solution that is a general solution. We are not talking about the initial value problem we are talking we are discussing about the solutions of there are no initial conditions prescribed. So, far any solution y of 2 can be written in the form can be written in the form y equal to alpha y 1 plus beta y 1. So, y 1 by 2 for some y 1 by 2 for some alpha beta belongs to r. So, this shows that every solution y of this homogeneous equation you can write it as the linear combination of 2 independent solution. This actually let me make a remark before going to the proof this is actually a very fascinating and remarkable result in the sense that even though a solution set is a set of the solutions any solution is something like twice differentiable functions hence it will be a subspace of subset of some c 2 space twice differentiable space. And first result what it says that if y 1 and y 2 if you take any functions as a solution set the first part of the result that alpha y 1 plus beta y 2 is also a solution shows that that is the first part of the proposition tells you that that set is actually a linear subspace. The second thing say that if you can find 2 independent solutions independent solutions from that set then every solution in that set can be a linear thing. This is the shows that even though the solutions set stays in an infinite dimensional space it is a actual dimension is less than or equal to 2. So, this is the remark if s is equal to the set of all solutions set of all solutions to 2 then s is a linear space s is a that is a very important fact that is a superposition principle that is how it is defined. And the remarkable other thing is that s is a linear space and dimension of s is less than or equal to 2. What we are eventually after the proof of the theorem we will see is that in fact the dimension of s is equal to 2, but the proposition right now do not say that this dimension is s is less than or equal to 2 because if you assume there are 2 independent solutions then that 2 independent solutions are good enough to determine any other solution. But we will actually produce using the unique existence you can actually produce in theoretically 2 solutions, but the unfortunate or difficult part is that we do not know in general or there is no general recipe how to get to that 2 independent solutions. That is why in the second order things you require methods and tricks to find the solutions. So, with this remark let me go to the proof of the theorem proof is not really difficult only we have to prove one part. So, assume y 1 y 2 are independent solutions that is I am repeating again as in the l of y 1 y 1 prime y 1 double prime is equal to 0 l of y 2 y 2 prime y 2 double prime is equal to 0. So, we have given that. So, what we have to prove you have to prove that to prove that if y is any solution y is any solution to the homogeneous equation 2 then you have to produce their axis alpha beta belongs to r such that y is equal to y means y of t is equal to alpha is a constant alpha into y 1 of t plus beta into y 2 of t for all t. So, what are the things given to you you are given y 1 is given to you y 2 is given to you y is given to you and you have to determine alpha and beta. And then that should satisfy for every t. So, if a equation to be satisfied by every t it should also satisfy for any t. So, in particular it should satisfy at t naught in particular y at t naught this is given to you y is given and y at t naught is given y at t naught should satisfy alpha at y 1 at t naught plus beta at y 2 of t naught. So, you see. So, you have a equation, but you have to determine 2 unknowns and alpha and beta. So, you need 2 equations right. Now, you got one equation, but now differentiate the equation differentiating equation y t differentiating this equation we get y prime of t equal to alpha y 1 of t prime of t plus beta y 2 prime of t that implies y prime at t naught which is also given to you because y t is given to you for all t is equal to alpha y 1 prime at t naught plus beta y 2 prime at t naught. So, we have 2 equations you see. So, you have 1 equation here and you have another equation here. So, you have 2 equations for 2 unknowns. So, the question is that whether we can solve for alpha and beta and that is what we are going to see. So, what are the equations? So, let me write down the equations in the matrix form. So, if you write down your equation in the matrix form, your job is to find alpha and beta. You have alpha here, beta here and right side you have y 1 at y at t naught. So, you have y prime at t naught and left side you have y 1 at t naught, y 2 at t naught, second entry here y 1 prime at t naught and this is y 2 prime at t naught. So, if you want to solve, if you want to solve for alpha beta uniquely, if we have to solve alpha beta uniquely, uniquely we need the matrix to be invertible, the matrix to be invertible. This motivates us to introduce the Ronskian. We call this Ronskian, but introducing that matrix is the motivation. Introduce the Ronskian w as a function of t, but depends on y 1 and y 2. So, we are not treating w as a function of y 1 and y 2. We are writing w of y 1 and y 2 to represent that it depends on y 1 and 2, but as a function of t. So, this is also denoted by w t. Unless there is no confusion, we just introduce it at w t. So, what is your w t? w t is equal to determinant of y 1 at t, y 2 at t, y 1 prime at t, y 2 prime at t. That is nothing but y 1, y 2 prime at t, everything at t minus y 1 prime y 2 prime, not y 1 prime. This is y 2 prime and this is y 1 prime y 2. This is the Ronskian, determinant of that variable. So, we need to prove. So, therefore, we need to prove w at t naught is not equal to 0. What is given to you? If y 1 and y 2 are independent. So, under that assumption, if y 1, y 2 is an independent set, it is independent. So, as long as we have given this assumption, we have not used this assumption, we are going to. But the interest in fact, in fact, we prove claim, which we are going to do soon. Claim, we not only prove y 1 and y 2 is independent, we not only prove that w t naught is not equal to 0 at t naught, w t itself not equal to 0 for every t. In other words, w t will be either identically 0 or w t is never 0. So, claim w is t not equal to 0 for all t together, not just at t naught. So, every t we prove that whenever, if that is not very surprising, because independence at our point y is independent. So, this is in two steps. First, we will show that w t is either identically 0. For that, you do not need independent. Either it will be identically 0 or it can be never 0 will be seen immediately. And then, we will show that in the case of independence, it is not 0. So, that is what you have to show that. So, first we show w is either w identically 0 or w is never 0. So, here is a bit of thing. So, let us call w once again. What is your w t? w t is equal to y 1 t y 2 prime of t minus y 1 prime of t y 2. You differentiate with respect to t. You get w prime of t is equal to y 1 y 2 double prime minus y 1 prime y 2 prime. Here, y 1 prime y 2 prime minus this is plus y 1 double prime y 2. So, this gets cancelled. That is nothing but y 1 y 2 prime minus y 1 double prime y 2. Now, use y 1 and y 2 are solutions. So, if you use that fact, for example, you will get y 1 double prime is nothing but if you go minus p t y 1 minus q t. If you take it to the right side and y 2 double prime is equal to minus p t y 2 minus q t. So, if you substitute this here, you get y 1 into minus p y 1 by skipping t minus q minus y 2 into y 1 double prime. This is y 2 and y 1 double prime is minus p y 1 minus q.  This is something from I am sorry. So, there is a y 1 prime there. There is a prime there. So, this is p y 2 prime. This is p y 1 prime. Now, it is correct. So, there is y 1 prime is missing. That is why. So, you have your there is a q y 1 here. So, I am missing that certain terms here y 2 here. So, I have y 1 here y 2 here. So, let me write properly. So, you have q y 2 here and here I have q y 1. So, this is second term is minus q y 1 y 2. Here, the second term is plus q y 1 y 2. That gets cancelled. So, here you have minus p outside here and you have y 1 by 2 prime y 1 y 2 prime. This is plus y 2 y 1 prime and that will be minus. You will have y 1 y 2 prime minus y 1.  So, you have a nice equation for w. Therefore, w satisfies the Romsky and w satisfies the first order equation w prime plus p w is equal to 0. So, that shows immediately w is a first order equation homogenous linear equation and that implies immediately your w t is in terms of the integral. Immediately you will see that w t is equal to c integral of p t d t. You see your correct equation to be done. So, you see w satisfies this equation and in this case this part is a can never be 0. So, the w can be 0 only when your constant is 0. So, when the constant is 0, w t will be identically 0. When the constant is non-zero, then the w t can never be 0. So, the first part what we will show that the result that w is identically 0 or w is never 0. So, you see. So, to prove the proposition you want to show that we need to prove w t not is not equal to 0. So, this claim is fine. So, w is not equal to 0. Now, you have to use this fact. What we are going to see is that either what we have just proved is that either w is identically 0 or w is never 0. Now, what we have to show is that w is identically 0 only if y 1, y 2 is dependent and w is never 0 if y 1, y 2 is independent. So, that is the next claim to be proved. That proves your theorem as well as the proposition. Everything is complete the moment we prove this proposition. So, the first proposition is proved if we prove this proposition. We will give an argument. We use the uniqueness argument. W is identically 0 if and or not only if y 1, y 2 is dependent. We give a proof because this requires one part is trivial, this part is trivial. Why that part is trivial? If y 1, y 2 is dependent, then either y 1 is a multiple of y 2 or y 2 is a multiple of y 1 either or both. Either y 1 is a multiple of y 2, k is a constant or y 2 is a multiple of y 1. In both cases, in both cases, we have you can immediately both cases w t is what is w t. It will be k into same. So, it will be k into y 1, y 1 prime minus y 1, y 1 prime because y 2 is a multiple of y 1 into y 2 prime is nothing but k into y 1 prime is equal to 0. We say w for all t. So, the converse part is the non-trivial part that this part you have to prove it. So, assume w t is equal to 0 for all t. Whatever it is in the interval, for all t in an interval that is enough. You want to show that say the interval t not to t. That is all we have proved it. So, we are in to prove that this is what you have to prove that y 1, y 2 is dependent. So, how do you proceed? So, let us proceed slowly. Not very difficult. The proof of that. Suppose one of them is identically 0, then there is nothing more to prove. Suppose y 1 identically is 0. So, if a set contains a 0 function, that set is necessarily dependent. y 1 identically is 0 or y 2 identically is 0, then it will be dependent, then nothing to prove. Clear that point? Because if one of them is a 0 function, we do not have to prove anything. So, we can assume that. So, we can assume with the law of generality. We can assume without law of generality, y 1 not identically. Not identically is 0. I have not claimed that y 1 is never 0. y 1 can be 0 at some point. The identical 0 is not allowed. y 2 not identically is 0. So, since y 1 not identically is 0, there exists some point. There exists a point say some t tilde in the interval t naught to t such that y 1 at t tilde not equal to 0. But now, use the argument of continuity. If a function is not at not equal to 0 at 1 point, then that function is not equal to 0 in a small interval. So, we will do that. That implies by continuity, there exists an interval c d. Of course, contained in t naught t wherever it is and of course, t tilde. These are all not important right now in c d because such that y 1 at t not equal to 0 for all t in c d. So, what we are using just continuity of the function y 1. If a function is not equal to 0 at 1 point, it is not equal to 0 in a neighborhood of that point and that neighborhood I taken to be c d that is all nothing more than that. You do not need anything to be taken. That is a simple analysis problem. Now, consider this is the only trick we have to follow carefully. Consider the. So, we are working in the interval c d now by Rails. Consider the interval c d. So, we are doing all analysis in c d right now. Consider the W is identically 0 and everywhere. Therefore, 0 is equal to W t by y 1 square. This is something a construction and this is allowed because for t in c d on c d y 1 is not equal to 0. So, this is allowed.  That is nothing, but that is where y we use that y. You can also work with y 2. It is nothing wrong d by d t of y 2 y y 1. Therefore, d by d t this is why we need an interval not at just 1 point climbing d by d t is not enough. You have to climb in an interval. So, d by d t of y 2 by y 1 is equal to 0 in an interval that implies y 2 by y 1 is equal to a constant in c d. That is important constant in c d or y 2 of t is equal to y 2 by y 1. So, y 2 is equal to y 2 by k y 1 t for all t in c d. Now, this is where you have to use a cleverly the the initial value problem has a unique solution. Now, consider y 1 is a solution to the homogeneous problem y 2 is a solution to your homogeneous problem. So, whenever you have a solution to your homogeneous problem any multiple of that is also a solution to your homogeneous problem. Therefore, k y 2 is all k y 1 is also a solution to your homogeneous problem k y 1 is also a solution to your homogeneous problem solution to your that is y 2 a solution to homogeneous solution to homogeneous problem. So, but y 2 is k y 1 in that interval. So, k y 1 is a solution to your homogeneous problem and y 2 is a solution you take these two things this is a very subtle argument k y 1 is a solution to your homogeneous problem in t naught to t, y 2 is also a solution to your homogeneous problem in t naught to t, but y 2 and k y 1 coincides in c d, since it coincides in c d its derivative will also coincides in c d. So, you have two solutions to your homogeneous problem with the same initial data. So, to me repeat that y 2 t in particular y 2 t is equal to k y 1 t in c d. So, y 2 t is equal to k y 1 to k y 1 t that implies in particular y 2 at c any point you can fix it c is equal to k y 1 c. Now, this is equal in an interval I can differentiate this one y 2 prime of t is equal to k y 1 t these are all happening in c d these are all happening in c d, but when I say that this is a solution it is happening everywhere. So, y 2 and k y 1 is a solution to your homogeneous problem in the n everywhere say t naught to t, but what is happening this is in a c d. So, that implies y 2 prime at c is equal to k y 2 at c. So, now you see you have two solutions y 2 and k y 1 thus we have two solutions we have two solutions y 2 and k y 1 with the same initial data with the same initial data data what are the initial data you need to understand two initial data y 2 at c I am thinking c as my initial data that is nothing wrong in that y 1 at c and y 2 prime at c is equal to k y 1 at c. Therefore, by uniqueness y 2 and k y 1 has to be the same everywhere that is what initial value problem tells you if you have two solutions in an interval for the homogeneous equation with the same initial data initial data means y and y prime then that solution is unique. Here we have produced two solutions y 2 and k y 1 in the full interval, but with the same initial data at c. So, the by uniqueness so that is what the uniqueness argument properly uniqueness y 2 t is equal to k y 1 in the entire wherever this x is t naught to t you see for all t and so that proves the proposition this proves the proposition. Once it proves the proposition. So, let me recall. So, let me consolidate once again what we have done so far in the proposition in this hour we have two we have if we take two independent solutions then that generates all the solutions. In fact, we what we have done is that dimension of s is less than or equal to 2 that is what we have proved that. So, but what we will be soon see is that the dimension of the next proposition which you want to do that the let me do that theorem before I complete this lecture theorem. S is the set of all solutions to the homogeneous equation please keep that in mind dimension of s is equal to 2. So, I can the proof is now not difficult the major part of the proof is already done proving dimension of s is less than or equal to 2. To prove we have to just produce two independent solution do not get confused when I am producing two independent solution it is only a theoretical production it does not give you the method to how to find it you can solve it you can solve it because we do not know how to solve the equation. So, let y 1 y 2 be solutions to solution to the initial value problem now considering an initial value the idea is that you want two independent solution the best method to get independent solution you put your initial conditions as independent vectors. The moment you put your initial conditions are independent vectors y 1 and t naught and y 2 at t naught y 1 prime at t naught and y 2 prime at t naught that will be independent and hence you have the solution itself will be independent. So, what we will have l of y 1 y 1 prime y 1 double prime equal to 0 with the initial condition the easiest way to the put the basis element y 1 at t naught is equal to 1 y 2 at t naught is equal to 0 and then you prove l of y 1 to y 2 prime y 2 double prime equal to 0 with y 2 at t naught is equal to 0 you see and y 2 prime at t naught is equal to 1. So, by uniqueness there x is y 1 and y 2 there x is unique y 1 y 2 we need only to show we need to show we need to show y 1 y 2 is independent how do you show y 1 y 2 is independent just compute the Ronskian independent. So, you just compute the Ronskian what is the Ronskian W t W t is nothing but y 1 y 1 prime y 2 prime minus y 1 prime y 2 and what is W at t naught W at t naught is equal to y 1 at t naught that is 1 y 1 prime at t naught is equal to 1 what is y 1 prime this is sorry this is y this is y 1 and y 1 at y 1 prime at y 1 prime at t naught is equal to 0 and y 2 at t naught is equal to 0 that is 1 naught equal to 0. So, that is trivial. So, you have your two independent solutions which satisfies the solutions. So, what we will be doing? So, we have shown that the dimension of S is exactly equal to 2 and the interesting fact is that this theory you can also extend to general nth order equations and you can see that nth order linear equations with constant coefficients has n independent solution and the dimension of this space will be n. We do not do it here, but the same procedure you can take the basis elements you take in n dimension you take the basis elements canonical basis elements e 1 e 2 etcetera e n for each e i you solve and then you get prove that solution set is independent which will not do it, but the same principle works there to see that solution space is independent. So, tomorrow in the next class we will be giving few more things in the next two lectures we may need it in this module to complete the second order linear equation. We will be doing equations with constant coefficients and we will also discuss something about non homogenous situation and we will try to understand the solution structure of the non homogenous equation. Thank you.


Hello again, I'm here with my friend James, and I should have mentioned this in previous videos. I apologize if any background noise. We are outside at James's house, I traveled to get here, and I'm just using the camera mic because that's all I have right now. So for people who've probably complained on the previous videos, not much I can do. Sorry. I know it looks like a garden, but it's a noisy neighborhood. So as we mentioned in the past, I mean, you've done a lot of programming, you've worked for a web design company, you've done a lot of Java and other languages, but C is probably your favorite language. And I've played around with C. I can accomplish stuff. My code is probably horrible when I write it, but it gets the job done, and I just haven't put enough time into learning C. But years ago, I bought a book on programming, which I should never do, because it's always easier to just look up what I need to do online and figure it out. But I bought this book, and I'm reading through it, and I'm going, this is good. I'm learning C each chapter had a different topic, and then I got to the topic of pointers. And I'm halfway through this chapter, and I'm like, I don't know what's going on. I'm skipping this chapter. But every chapter after that had to do, referred back to the pointer chapter. And since then, I understand what pointers are and why we need them, not in great details. They don't use them often. I also find that when I talk to people who are big C people, which I think C is a great, great language, but they all seem to really, really want you to love pointers. I was talking with some of my IRC channel the other day, and I just mentioned how- Pointers will set you free. I was talking to someone, and I just mentioned that I understand the concept of pointers, but I don't use enough to really grasp everything about them. So he goes on explaining how they work, and I wasn't really looking for explanation, and I just started laughing, ha ha ha, LOL, whatever. I'm like, you remind me I'm a best friend, James. I go, how come is it every C person just wants you to love pointers?  So yeah, yeah. As a matter of fact, I'll go a step further, and I want to answer your question. Okay, that's great. I'll say that, like, yeah, so there are certain things in programming, certain obstacles that once you overcome, like you hit that zen moment, where you just feel like, oh, I understand things on a whole other level now. Whether this is a useful thing to ever use again, or not, then once I understand it, I kind of understand programming on a whole other level. And you know, if I could just plug some books, you know, obviously the C programming language by Carnegie and Richie, that's a very important book to learn C, Sick P was a lecture series that was very important in the laboratory I worked in. We're required reading, required to watch the free videos put out by MIT.  He wanted to have an operating system, UNIX is what he envisioned, and so if I get this, if I get the story wrong, nobody will kill me. Right, and he passed away. I'm not a historian. Yeah, so he was the one that came up, he wanted the UNIX operating system, he had an idea what it would be like, and he needed a language to write it in, and he wrote it in C. But anyway, so yeah. And that's hardcore. Yeah, yeah. The only thing I want to write an operating system, I'm going to create my own language to write the operating system in that, and that's awesome. So, I think if you go through that book, and you run all those exercises, and exercises are kind of boring, it's much more fun to have a project. Right. So, if you run all those exercises, you should understand, not just pointers, but a whole array of ideas from C. And I like SICKP because you understand functional programming language, which is a very difficult concept. Is SICKP short for something? Structure and interpretation of... That's good enough. That's more than I know. ...structure of computer programming. Okay. Structure and interpretation of computer programming. Anyway, so once you understand how functional programming languages work, once you understand how pointers work, and some people might say object-oriented programming is very important to learn, but I just think that's a little bit easier of a concept for people to learn. So, you can learn that one on your own pretty easily, I think. But once you get those kind of concepts, each one of those kind of takes you to another level. So, that's why I think I would be a pointer aficionado, and I would preach it, because once you understand pointers, you understand something about how that computer works, especially a Unix operating system to a whole other level. Now, to answer your question, your question was basically how do pointers work. Yeah, what are they? Now, it's because most languages, the higher level languages that are written in C are written to handle the pointers for you. Right. So, I don't have much experience with them because those are the languages I usually use for pointers. And then there's another way to look at that. You could say, instead of thinking about pointers, another thing is just allocation of data. Like, how does a computer know how much memory to allocate for all the data you're looking at? And so, for C, generally, it's not an assembly language where you have to explicitly say where to put every single bit of data. But it's kind of left to the user to start allocating and deallocating memory. And if the user doesn't do it right, you can actually have things like memory leaks where you're not freeing up memory and all of a sudden your computer has no memory. Or conversely, you could start trying to access memory that was not actually allocated, try to put something in memory that wasn't allocated, and you get the seg fault, which in C, it's really hard to figure out where did that seg fault come from. Quick thing, which will probably be a whole other video, but real popular right now, although this video will be released later on, the whole heart bleep thing. Sure, yeah. Oh, yeah. Which does not get into that, but that is probably from the little bit I've read about it. Yeah, that's an example of... Cherry memory that shouldn't be... The block of memory is somehow you can use a C program that's been written because it's so low level, so at the level of the operating system that it basically has access to all the memory and you're supposed to be writing it so that you're limiting the access. But if you wrote it incorrectly, all of a sudden you're able to kind of glean some information off the edges of what you're supposed to be using it for. And really when I write stuff in C, which is really, really basic, basic stuff mostly, really I always have a fear of my background in the back of my head that I'm going to write something, which I've mentioned to you because pretty much I write something in C and I send it to you because not only so you can show me a better way of doing it, but also because I'm always worried that not that I've written anything that I've shared with the public, because all of that stuff I've done for my own personal use, but I'm just afraid that I'm going to leak something that I shouldn't, but with simple projects that's less of a concern. Sure, yeah. Because really in the stuff I write I really haven't really done too much deep with pointers other than storing variables. Yeah. And so I mean part of the beauty of C is you get to control that stuff and so there's advantages to that and again for the learning process it's very good.  And so based on how you write... That's about nutrition when you eat. Yeah, yeah. So the idea is that how you write the programming language it will actually automatically wrap that for you. It will abstract it away from you and handle those things for you. And where in C they don't, you're supposed to build those abstracted layers for yourself. So yeah, I mean there is a little bit of danger in it, but you know that's the fun, right? Yeah, that's why you want to play with pointers because if you couldn't break something it wouldn't be fun. Right, right. I mean that's programming. That's what computers in general. If you haven't broken your system lately you haven't learned anything. Yeah, absolutely. So yeah, so use pointers, they're fun. You know how they work is, I mean I think the best, when I had my first aha moment with pointers is I started calling them addresses. I thought it was a much better way to think about a pointer. You know, yeah, you can think of it, well it's something that points to a memory address, but I think of it as an address. So it gets really complicated in C because when you start saying, well I pass a pointer to a function, what does that mean? Well in C when you pass something to a function it makes a copy of that data in that function. So you can't actually affect it outside the scope of the function unless you pass the pointer because you're essentially passing the address. And now you can affect what's at the address. You can't change the address, but you can affect what's at the address. Now is this, is that? No, never mind, I was going to say. I was going to say something. What did that burn out? Put this here. It might be.  So I'm not going to say. Leave that bonus footage. So real quick because we only have about a minute left. Yes. You tell the pointer, I wanted to point to this block of memory. How does it know that this block of memory is free to use? Yeah, well typically you're not going to point the pointer anywhere. There's different ways to access the pointer. Either you'll have a variable and you'll want to grab the pointer to it or sometimes you'll start with the pointer but generally the first thing the pointer is going to equal to the thing it's going to point to is it's something being returned from a malloc function. A malloc function or calloc or whatever function it is that does the allocation is going to return an address. Let me use the term address. It makes it easier. So you make an address variable. You set it equal to a function that returns an address. Now you have an address of allocated memory. When you're done with that, what you need to do since you manually allocated it, when you're done you need to free it. You're going to pass that same address to the free function and the free function will free the memory at that address. Great. Well, I thank you for joining me today. I thank you guys for watching. Please visit my website filmsbychris.com. That's Chris of the K. There should be a link in the description of this video if you're watching it on YouTube. And I'm really enjoying this conversation on C so I think our next talk will basically be a continuation of this one. So have a great day. But what I think really is a testament to your experience. When you have man-mind abilities, you run out of money. You run out of software. And it has creative effects. I think it says something about this.


At Audiology Associates of Prestonsburg, you can live your life the way you want and find the freedom of better hearing. You'll experience patient care that is specific to you with exceptional follow-up care that ensures your hearing and balance needs are being met. Audiology Associates at 1428 Northlake Drive in Prestonsburg. After its establishment in the mid-90s, the Mountain Homeplace Farm continues to depict the lives of the McKinsey family and their 1850s working farm in 2022. The farm features the McKinsey cabin, the original barn, a blacksmith's shop, the fish trap church and the last one-room schoolhouse in Johnson County. So we have tours every day, Tuesday through Saturday that is here and takes a step back in time. We have tours that explore the life of the Appalachian settlers, the people that were here long ago. Everything from their daily use on the farm, the daily life with textiles, everything to farming, to gardening, to what the church service would have been like in the school. The Mountain Homeplace Farm is a living history museum and hopes to depict the lives and struggles of Appalachian families in the 1800s. Tours are $5 for adults and $4 for children.  So you get to experience that, we walk you through the church, we let you see what it was, we have the two original pews in the church and let you sit where they were, and then in the schoolhouse we let you experience what school was like back in the day. For more information on the Mountain Homeplace Farm, visit the Mountain Homeplace Farm on Facebook. For Mountain Top News, I'm Brainer Robinson.


Analysts at the Institute for the Study of War believe that Russian invaders are escalating the situation around Avdivka and in the western part of Zaparizhya Oblast to draw Ukrainian defense forces away from Robotyn. Russian troops launched localized offensive operations near Avdivka in Donetsk Oblast and southwest of Orykiv in the west of Zaparizhya Oblast, which were likely aimed at pushing Ukrainian troops away from Robotyn. The Russians intensified offensive operations northwest of Avdivka in the area of Okeratyn, Tonenk and Berdychiv and the area southwest of Avdivka on the Vodyanapadnyi Line. They also attacked southwest of Orykiv on the Piatikatky-Zarabianky Line, with Russian military. Bloggers claiming that Russian troops had advanced two kilometers in the area, the general staff of the armed forces of Ukraine has confirmed that up to three Russian battalions have launched an attack and there is video footage of fighting in the area. Analysts added that the encirclement of Avdivka, one of the most heavily fortified sections of the front in Donetsk Oblast, will likely require more forces than Russia has currently committed to the Avdivka-Donetsk operation. The increased Russian offensive operations in the Avdivka and Zarabianky areas coincide with other localized offensive efforts in Luhansk Oblast and eastern Zaparizhya Oblast, all likely aimed at fixing Ukrainian forces and preventing Ukrainian command from transferring reserves to critical areas of the front in western Zaparizhya Oblast, ISW said.


Namaskaram Sadguru, I have a question, so does the relationship that we have with our parents impact the course of our life? If yes, how best are we to nurture this? Namaskaram Lakshmi? Well, in the yogic science as we look at life, we look at a human life as a full cycle. If one lives up to eighty-four years of age, in this cycle of life, which involves a little over thousand and eight cycles of moon, the first quarter is when the influence of the parents are upon us energetically. In terms of karmic influence, only up to twenty-one years of age can parentage influence us. After that, we are not supposed to be influenced by them. But for whatever they have done, first of all they have brought us into this world and many other things out of their love and involvement they have done, we can live in gratitude. After twenty-one years of age, one should not be influenced by the patterns of parentage because the important thing is that this is a fresh life. This should not be a repetition of what has happened in the previous generation. So to a maximum of twenty-one years of age, there is a karmic influence which definitely influences everybody. But beyond twenty-one years of age, there is no such thing. It may be purely psychological dependence or maybe financial and social dependence on parents for a whole lot of people. But essentially, at the age of twenty-one, this bond breaks. But after that, it's a bond of relationship, of love, of gratitude. Those things can always stay forever. So we should not look for parental nurture after twenty-one years of age. We can only live in gratitude for whatever they have done.