 last class we have considered the one problem that we have a one point is fixed and other point is free. Again the point A is fixed and point B is free. So, what we have considered let us or problem is that this is the functional which is t 0 to t f this functional we have to optimize either minimize or maximize. What should be the choice of the trajectory x t so that this functional is a maximized or minimized. So, let us consider the x star is the optimal trajectory and its point A is fixed B is free it may be free in time and may be fixed in the end points of x. Now, nevering of this trajectory we have considered another trajectory that x star delta of x t that is x a and this trajectory is we have assume A that is d c this trajectory. Again whatever the notation we have used it the same notation what we have used it earlier consider here. What is we have to do first we have to find out the what is called our first variation of the functional value del j change in or incremental change in functional value this and this t 0 to t f plus delta t f because t f is free and x t f also free x value final value of state also free. So, this we can split up into two parts t 0 to t f plus t f to delta t f. So, what we did it here we did exactly same t 0 to t f and delta t f to delta t f plus delta t f now this part and this part we have already simplified in earlier. So, there is no problem with this two parts and this two parts will give you the condition for Euler's Lagrange equation. Now, what about this one so this we will see it is nothing but A let us call this is the functional B and it is the integration from t 0 to t f. Let us call t f is here t f delta t f so area under this curve. So, how we are approximated this integration term ultimately we have explained earlier ultimately we have approximated that integration part by this one. That means it indicates whatever the slope at this point t is equal to t f v of x t curve that v of x t curve that this is the v of x t curve take the slope of this one agree then multiplied by delta t f at t is equal to t f find out the functional value and multiplied by t f. So, this is the approximate value of what is called this integration part when t f is very small delta t f is very small. So, using this expression this expression in equation this expression this approximation we did it by this one using this expression here. Then we will get it finally this expression I told you if you consider I told you earlier this and this we can simplify as we did earlier by this term agree this and this term. So, last term we have simplified this way that is middle term of this increment of functional value is approximated this one. Now, see this one this term t is equal to t 0 delta x t 0 is 0 because this is the fixed point, but t f at delta t f delta t f delta x t f is not 0. So, further we can what we can simplify this one that we will discuss now. So, if you see this one that same expression I can write delta j nearly equal to t 0 to t f and delta del v del x of t this one minus d of d t del v dot del v dot del x dot of this whole. Then whole bracket transpose at along the optimal trajectory this one and delta x t d t plus del v dot del x dot whole transpose star means along the trajectory star means del x t. So, t is equal to t f because delta x t is equal to t 0 is 0. So, that term we are not considering on the previous step and this two terms includes the first term of incremental transformation and third term of incremental transformations that is this indicates the after simplification all this thing this indicate that I told you incremental transformation this term this term as we did earlier is the simplification after simplification we got it that one plus middle term of this one. We have approximated the integration t f to t f plus delta t f v d t is approximated by take the slope of the functional at t is equal to t f then multiplied by delta t f. So, this is t x t x star or you whole thing you write it then complete this bracket and then put star whatever you like it. Then you evaluate this as t is equal to t f again find the value of the function at t is equal to t f then multiplied just like approximation by rectangular area we got it again this and it is just if you recollect this one what we did it here find out the value of the function at v function at t is equal to t f. So, this is the ordinate and that ordinate multiplied by delta t f will give you the value of the function value of this curve when integration t g t f to t f plus delta t f it is the approximation is valid when delta t f is small. So, that what we did it here then next is let us call this is equation number 4 we have considered up to equation number 3 last equation if you see we have done up to equation 3 this one. So, this is equation number 4 now look at this expression of this one that we have a use this lemma use this lemma as we discussed the important lemma is t 0 to t f g t delta x t d t is equal to 0 if and only if g t is continuous and it is 0 at every point over the interval t 0 to t f that if and only g t is 0 at every point over the interval t 0 to t f. So, we will use this lemma in this equation 4. So, this part will be 0 provided this is 0 because I have to necessary condition for the function to be optimized is delta j must be equal to 0 first variation of the function must be 0 this is the necessary condition. So, using the lemma in 4 we get del v del x t minus d of d t del v dot del x dot of t whole is equal to you can find out you can put all these things is star or because I have to find out the optimal trajectory of this one or you solve this one whatever the solution of x you will get it that will give you the x star either you can put whole thing star or vomit this one and this dimension is n cross 1. If x is the vector whose dimension is n cross 1 that n variables are there x 1 x 2 x then the dimension is this one. So, and in addition to this must be 0 in order to make this is that. So, our in order to make this is del j is 0. So, if this is 0 in the expression 4 boils down to that one that nearly equal to del v del x dot of t whole transpose delta x delta x because del j is scalar quantity this is the column vector now you have to take transpose of this one when you write it this one. And this you have to calculate t is equal to t f plus v dot v t x star of t x dot star of t whole t is equal to t is equal to t f into delta t f and that what we can simplify that one we can see here. So, now look at this expression for that one what you can write it for this one refer to our original figure a this is a this is b this is t f this is t 0 and this is our d and this is our c. So, as this and this value is if you see this value is our delta x t f and from here to here from here to here if you recollect that this is our nothing but a delta x this is at c t f plus delta t f agree. And that we denoted by delta x f agree. So, this is x of t 0 now see how we can write it a delta x of f means value of the function along the x a of t this is x star of t trajectory and this is the x of t is equal to x star of t plus delta x of t. So, this one is nothing but a this one this length of this one this length plus this length. So, I am writing it this delta this that delta x t f plus find out the slope at this point multiplied by delta t f what is the incremental. So, x a dot of t find out this derivative at this point agree that at t is equal to t f into delta t f. So, this expression I can write it now which in turn I can write it delta x t f delta x t f this one is equal to delta x f minus x a dot t t is equal to t f delta t f agree. So, this expression we will use in equation number five let us call this is the equation number five for our case this is the equation number five this is the equation number five. So, and this is the equation number six using six in five using six in five what we get it. So, let us write it five delta j nearly equal to this term as it is we will write it that v t x star of t x dot star of t that bracket from t is equal to t f second term of expression second term of equation five is this one plus but delta t f is there delta t f plus first time I am writing now del v dot del x dot of t that transpose this as t is equal to t f t is equal to t f and we have a this delta x t f that this thing I first put the value of this one then this you can do it put this value this is the at t is equal to t f you put this value in the gradient transpose gradient of v with a space dot it is transpose you put this value and then multiplied by x t is equal to t f that is what we did it. Then this one this expression in place of t f x t f this I will put this value here. So, if you use this value here then we will get it delta j we will get it delta j nearly equal to v t x dot x star of t then x dot star of t bracket close t is equal to t f into delta t f that is first term as it is second term of first part we will write as it is second term of first part we will write as it is second part we replace delta x t f is equal to delta x f minus x a dot of t t is equal to t f that means find out the slope of the neighborhood trajectory of the optimal trajectory at find out the slope at t is equal to t f then multiplied by delta t f. So, this is the second part I replace x delta x bracket t f replaced by that one. So, now see this one what is note just note what is x t f delta dot x t f is equal to x dot t f star plus delta x dot t f this one. So, I will put this value in this equation and if you put this value in this equation you see delta x dot t f this and delta x t f multiplied by t f. So, this is the small quantity again it is a small quantity the second part is omitted neglected. So, what is left over term is here after putting this expression t x star of t into x dot star of t t is equal to t f delta t f plus v x dot of t whole transpose this and this is as it is that one delta x f and this term x dot x a dot t x a dot t is the trajectory neighborhood of the optimal trajectory that one at this point you are finding out the slope multiplied by del. So, if you put this one this will be replaced by this one multiplied by delta e f. So, this term delta x dot t f multiplied by delta t f is neglected. So, it will be left with x dot star t f now we can what we can write it just see this one delta t f and this is multiplied by this one multiplied by delta t f that is I missed it here delta t f then bracket close because this one multiplied by delta t f. So, delta t f delta t f I take common then you will get v t x star of t x dot star of t agree bracket close minus del v del x dot of t whole agree this star multiplied by x dot star t f this because delta t f is common in both the expression this expression and this and this expression delta t f plus left over term is del v x dot t gradient of v with respect to x dot whole transpose star agree into star into delta x f this one agree. So, this is the equation now delta j will be 0 delta j if you impose the first necessary condition is the assigned to 0 will give you the optimum value the point what is called solution of this trajectory will give you the optimum value of the functional. So, in order to make 0 when delta t f is not 0 this must be 0 if t f delta t f is 0 means final time is fixed on the other way delta x f is arbitrary that means x f the final point of x is arbitrary then delta x f is not equal to 0. So, in order to make that is delta g 0 this term must be 0, but if it is fixed that is end point of trajectory is fixed x f is fixed, but t f is free then this one will be 0. So, now let us see what is the condition can impose you know to make delta j first variation of the functional assigned to be 0 if the variation delta t f and delta x delta x f are arbitrary or be we obtain delta j is equal to 0. If we assign that v t x of t x dot of t minus del v del x dot of t this one whole transpose x dot of t and this value you see when delta t f is not arbitrary then this cannot be 0 this must be 0 in order to make. So, this equal to this equal to 0 at t is equal to t f. So, here I forgot to write you see this is t f at t is equal to t f this is also you see x t is equal to t f this whole term you see this is t f at t is equal to t f and this is also t is equal to t f. So, we can write it here at t is equal to t f this one this I missed here and next is this will be a t is equal to t f. So, if you put it this one here you see t is equal to t f from there here I missed it this one. So, this into t f so whole thing I can write it that whole this and t is equal to t f. So, this equal to 0 when delta t f is not equal to 0 in other words t f is free another another condition if x f is free arbitrary then this is not equal to this assign you can assign it is equal to 0 and another condition that delta v dot delta x dot of t star t is equal to t f is equal to 0. So, we have used the equation up to 6 let us call this is 7 this equation 7 and this equation is 8 and when this is to that delta x t f x f delta x f is not equal to 0 it means that x t f is free. So, 7 equation 7 and 8 combine only known as that equation 7 and 8 combine only known as or called as trans transversality condition this is the important two condition. So, what is our conclusion if you if you have a problem is like this way if you have a see this one if you have a j is a functional you have to optimize this functional. Then what should be the choice of our optimal trajectory x t so that this functional will be optimized then we have consider one point is fixed other point is free when a time is free x t f is free both are free then what we obtain first in order to the necessary condition for this one is delta first variation of the functional must be 0 in order to assign that functional first variation of functional 0. First condition is our Lagrangian what is called Euler Lagrangian equation must be assigned to 0 that is Euler Lagrangian equation that is just that is your is del v del x minus d of d t del v del x minus d of d t is d of d t bracket del v del x dot is equal to 0 this is Euler Lagrangian equation must satisfy in addition to this there are two conditions are there when both the points that means time and x t f are free then these two conditions must be satisfied that condition are called transversality conditions. Now, this is the condition that equation 5 agree that this equation this equation must satisfy so one end is fixed other end is free you have to optimize the functional value agree j is the functional we have to optimize we have to satisfy first Euler Lagrangian equation this equation and in addition to that there we have a terminal condition this 7 and 8 this terminal condition are called end conditions are called that transversality condition simultaneously we have to solve equation number this equation and the end condition using end condition we have to solve that means we will get a trajectory optimal trajectory for this one. So, next is that what is called if you summarize this one the results for this one that what we have mentioned this one we have a functional this is t 0 to t f v x of t x dot of t d t one end is necessary condition we have assumed one end is fixed refer to your earlier figure one end is fixed and other end is free. So, first condition of this one in order to make first variation of the functional that first condition is del v del x of t minus d of d t take the gradient of this with respect to x 1 dot this equal to 0 whose dimension is n cross 1. So, whole bracket star you can give because ultimately this equation you have to solve it not necessary to put it star indicates the star indicates that if you solve this equation whatever the trajectory will get it that is the optimal trajectory that functional value may be maximum or minimum at this stage necessary condition will give you the what trajectory will make the functional value is maximum or minimum. That means sufficient condition one has to check it the next this is the one condition next two conditions the end condition you have to use for this problem is the called transversality condition that v dot of x del v dot del x dot of t whole transpose x of x dot of t this agree put t is equal to t f is equal to 0 and this condition if you see this one this condition are achieved from this condition. That means when t f is free when t f is free this condition must be satisfied. So, whether you give it star or not it does not may you have to solve this differential equation with this final condition this. So, this is the one condition and the next condition is that del v dot del x dot this t is equal to t f is equal to 0. So, let us call equation number one equation number two and equation number three this is valid when t f is free t f is free. That means delta t f is not equal to 0 this is true when delta delta x f or you can say x t f is free implies the delta x f x t x delta x f is not equal to 0. So, equation one two three equation one you have to solve in order to solve the equation you need the end condition of equation two and three two and three you have to use it that two things combined I told you earlier transversality conditions transversality condition agree this is called transverse two and three. So, now we will some we case we take different cases you know this one if you consider the case a let us call consider case a what is the case a case is when both t f and x t f are free we need to solve one to three this three equation you have to need to solve one we need to solve one to obtain optimal to obtain optimal trajectory x star of t x is n dimensional case then this case t then you know both the n sets free that means corresponding figure if you see this is that one a b and this is d this is c this is t 0 t f this is t f plus delta t f agree and this point is you know this is x star this trajectory and this is x a of t which is equal to x star of t plus delta x of t. So, when both are free then you have to use equation number one and two then some special cases can be derived from general case p and general case a when t f is free, but x t f is fixed this is fixed that means this corresponds to curve is like this way. Suppose this is you consider x star of t never never never in order of this one or near very close to this way optimal trajectory there is a another trajectory x of t is equal to x star of t delta x of t. So, you see x t f this is the x t f so x this is fixed that means x t is equal to this is fixed that is fixed, but t f t f and that is a t f plus delta t f you just consider this situation like this way that our time t is equal to t f this trajectory must reach x t f value this at time t is equal to t f plus delta t f that never would of this trajectory also should reach at this fixed value t f what is the t f value is very it should reach to same value that means x t f this is x t f plus delta t f this must be equal to both the value is same this one. So, in this case you see this condition that means x t f is fixed x t f is delta t x t f was a delta x t f is what here you see there delta x t f is 0. So, this condition will not come in the picture only this condition so our we have to solve equation 1 and 2 to obtain optimal trajectory to obtain optimal trajectory we need to solve 1 and 2. Now, case 3 or case c you can say case c when t f is fixed, but x t f is free the corresponding figure you can visualize like this way t this is x of t and this is t f is fixed t f and this is let us call there this is you can say a b d here also if you want to give name of this one this is a b this is d this is x star of t this is a of t. So, in this situation you see t f is fixed means delta t f is 0. So, if you see this one our that equation delta x expression then delta t f is fixed means t f is fixed delta t f is 0. So, this term will not come in the picture in the end condition. So, this is not equal to 0 because x t f is free delta t f is not equal to 0. So, this condition is 0. So, we need to solve to obtain x star of t optimal trajectory x star of t means optimal trajectory in order to make the functional value is optimized. We need to solve equation 1 and 3. So, more general expression is one can write if you restrict the free end that means point b restrict on a curve then what will be the transversality condition corresponding to that point. So, case 5 a case d or 4 case d when the end point b restricted to a curve g of t then what will be. So, corresponding diagram if you draw it here this is x this is t this is x of t this is point this and our curve is g of t curve the end this is a point this is the your b point b point is restricted on a curve this one. So, our neighborhood of this optimal trajectory is there is another trajectory we assume that one. So, that is our d point this corresponding t is d point and this is corresponding to c point. So, this is x a t is equal to x star of t plus delta x of t. So, this is your what is called g of t the end point of the trajectory restricted on the curve which is the function of time then what will be the condition, but our last condition will remain same. So, now what we can write it for this one see this is our if you look at this one this is our t 0 this is t f and this is our t f plus delta t f and this corresponding point is x t 0 is equal to x 0 and this current this point corresponding to this one x t f is equal to x f. So, we can write it delta x t f plus delta t f that means this here to here is this one I have denoted by delta x f which is nothing, but a delta x t f plus delta t f this I can write it is equal to delta x f which is same as you can say g to the g of t take it transient make it transient at the point of b. So, I can write it this nearly equal to nearly equal to g of t dot find at t is equal to t f multiplied by delta t f that is nearly equal to I can write it. So, x delta x f I just replace by that one now if you see this expression when we derived that one that is from the you can write it from the first variation of the functional we derived this expression once again that means from the first variation of functional if you see that one this expression I am writing once again for your convenience agree. So, delta g or I have given you with the equation number no I am not given. So, it is a del j is nearly equal to del v dot that star t is equal to t f delta t f agree that is t is equal to t f delta t f plus del v dot del x dot t whole transpose then star t is equal to t f into del x f minus x a dot of t t is equal to t f del t f. Now, look this one this value I will replace by what we made an approximation here that is that we will replace it that one if you replace that one then nearly equal to v dot this star t is equal to t f delta t f plus v dot this transpose x dot of t whole transpose star t is equal to t f and delta t f what we will replace delta x x f we replace by g dot t f see g dot at t is equal to t f g dot t f into delta t f into delta t f and this expression if you know this expression is nothing but a x t a x a t is nothing but a x t star plus delta x t f agree. So, this is nothing but a write it that is x star t f plus delta x t f at t is equal to t f that one into delta t f. Now, this equal to delta x f this term is omitted this both are small quantity of that one. So, this I can write it now if you see that v dot of star t is equal to t f delta t f plus this term is omitted. So, it will be a del v dot function of or gradient of v with respect to x dot whole star then find t is equal to t f agree then you can write it g dot t f minus x dot this is dot this is the dot because x a dot. So, dot star t f agree this one into delta t f agree. So, this can further I can simply by v dot is equal to del v dot del x dot of t whole transpose agree whole transpose. If you want to write it star you can write it here star you can write it here multiplied by x dot star of t minus g dot t whole bracket because at t is equal to t f t is equal to t f this value you call at t is equal to this value you calculate at t is equal to this value you calculate at t f just I change this I bring it first and this I bring minus sign has come here. So, into d f is equal to 0 this one. So, in order to make this is 0 in order to make this is 0 then delta t f you see in this case that is what is delta t f is free agree. So, this is not equal to 0. So, this must be 0. So, our condition for arbitrary delta t f is not equal to 0 our condition the transversality condition case boils down to this way v dot of this del v the del x dot of t whole transpose x dot of t minus g dot of t that this whole t is equal to t f you can put a star because it is a boundary condition. You have to solve Euler's equation equation number one as we mention it here that equation and this equation when your free and restrict on a curve that equation equation number one and four you have to solve this is the equation number four. So, this is also called transversality condition transversality condition for the case when the point when the end point be is restricted on a curve x t is equal to g t on a curve g t. So, in short when the free and b is restricted on a curve g t and another end is fixed then we have to solve Euler's equation which is equation number one and equation number four that we have to solve it. And now question is after solving this one you will get the trajectory x of t x star of t or x of t which is the optimal trajectory. Now, what is the what will ensure that this trajectory will give you the optimal value of the functional optimal means whether it will give the maximum value of the functional or minimum value j will be minimum or maximum that way for that one one has to check what is called then sufficient condition for this one. So, next class we will discuss the sufficient condition to establish the what is the functional value is minimum or maximum. So, we will stop it here in this moment.