 So, in the last lecture we were discussing the multistage optimization and what we have shown there is that delta u for the entire multistage rocket having n stages is given as this expression where u equivalent i is the equivalent velocity for i s stage and r i is the inverse of mass ratio for i s stage. And then we had since we had proved earlier that r i equal to 1 plus lambda i divided by lambda i by epsilon i where lambda i is the payload factor for the i s stage and epsilon i is the structural coefficient for the i s stage therefore, this becomes equal to u equivalent i l n 1 plus lambda i upon lambda i plus epsilon. We had also shown in the last lecture that the optimization essentially means either to attain a given delta u for a given payload with minimum initial mass and the equivalent statement is to attain a given payload mass fraction with maximum velocity. And we have said that maximization of velocity is the easiest way to do it. So, therefore, that is what we will be focusing on. So, we will be we are actually maximizing this delta u. After that what we did was we also showed that l is equal to l i that is the payload fraction for i s stage is given like this in terms of payload factor payload mass factor like this. And then we took a case case 1 which we have been discussing in the last lecture there what we say is that the i s p for all the stages are same which essentially implies that the equivalent velocity for all the stages are same. And we also assume that the structural coefficient for all the stages are same making this assumption then simplifies this expression to delta u is by u equivalent equal to sigma i equal to 1 to n l n 1 plus lambda i upon lambda i plus epsilon. What we see here is the right hand side is a function of only lambda i which is added the equation the and is a summation of all the l n 1 plus lambda i upon lambda i plus epsilon for all the stages. So, we can define this as a function f of lambda i then can write this as like this. So, now our objective in optimization is to maximize delta u which essentially means maximizing f lambda i, but we have said that we have also have a constraint. And that constraint is that the overall payload fraction is the product of independent individual payload fractions. This is a constraint that we have and this is a given quantity l is a given quantity. Now since we have shown that l i can be given like this we can write this as i equal to 1 to n lambda i 1 plus lambda i. Then what we do is since this is a product and here we want to have a summation what we did was we took natural logarithm of l then that becomes equal to this. What we see here now is that this term here is also a function of only lambda i and the left hand side of this is constant. So, this is a constant which is then can be written as equal to g lambda i. Now, if we multiply this constant with another constant it still remains a constant. So, now if we take this function this is a constant and add a constant to it and then now if we say that we want to maximize this then essentially maximizing this is equivalent to maximizing this plus a constant because constant is going to be there always. So, what we say is that we define a new operator or a new function l which is the sum of this plus this, but this is multiplied by a function alpha sorry a factor alpha. So, then this is equal to where alpha is Lagrange's multiplier. Then what we did was now this becomes our new objective function where maximizing this was our objective. So, this was our objective function this was our constraint now this becomes our new objective function which we would like to maximize. So, for that what we did was we did d l d lambda i equal to 0 and then that implies that this is equal to d d lambda i of f lambda i plus alpha d d lambda i of g lambda i. Now, once we differentiate this we got this expression equal to 0 and after simplifying this we get an expression for lambda i. So, this is what we had obtained till the end of the last lecture. Now, let us proceed from here and have a relook at this. If I look at the right hand side of this equation, we said that the structural coefficient for all the stages are same and they are given as a constant. So, therefore, in this expression alpha epsilon is a constant and we have also said when we are discussing this that the Lagrange's multiplier alpha is also a constant. So, here therefore, this is also a constant. So, if I look now at the right hand side of this equation essentially this is a constant. So, the right hand side of this equation is a constant which implies the left hand side must also be a constant and our left hand side is lambda i. So, because alpha and epsilon are constants which implies lambda i is also a constant. This is a very significant observation that lambda i is constant. So, I can just put it as lambda. Then now that brings us to a very interesting thing because here I was saying lambda i, l i was equal to lambda i upon 1 plus lambda i. Now, we have shown there that lambda i is a constant. So, we can write l i which is the payload mass fraction for different stages is equal to lambda upon 1 plus lambda because my lambda is constant and we also know that l overall mass fraction is product of l i. Here, if lambda is a constant therefore, l i is also a constant. So, l i is constant which means that the payload mass fraction for all the stages are same and that value is a constant. We know that the overall payload fraction is the product of this l i. So, what I can do now is I can write l is equal to product of lambda upon 1 plus lambda n times. So, essentially this becomes equal to lambda 1 plus lambda to the power n which essentially means that lambda is equal to l to the power 1 upon n upon 1 minus l to the power 1 upon n. So, this from this now we can directly get an expression for lambda. Let us now see that what is the significance of getting this relationship. We are saying that we have a case where the n stage rocket all the stages have same specific impulse and they have some structural coefficient. And let us say we are asked to maximize it and the overall payload ratio is given to us. Fraction is given to us lambda is payload ratio. So, overall payload ratio fraction is given to us that is l is given we know the number of stages. So, first and foremost thing what we do is we use this equation where my l is known my n is known I can get a value for lambda this is my payload ratio. Once I have this value of lambda I come to this equation. So, in this equation now lambda i is equal to lambda. So, I put this value of lambda which I have obtained there into this equation. Now, in this equation once I put lambda epsilon is known because my payload fraction is given to me sorry the structural coefficient is given to me. So, now in this equation the only unknown becomes alpha. So, I can just solve for alpha from here. So, that gives me the value of alpha which will be optimizing it. But in this scenario actually we do not need to solve for alpha because finally, what are we interested in we are actually interested in the maximum l i only. So, we do not need to solve for this in this case we just need to do this and then once we have this we can directly go back to this equation and get the velocity. We do not even need to solve for alpha for this problem for the other cases which we will discuss we will see that we need to solve for alpha, but not for this problem because it is very simple because lambda is constant. But when lambda is not constant then we need to solve for alpha also separately. So, for this case we have already discussed let us now look at some other cases. So, the first case what we had was this was the given condition where we had same equivalent velocity for all the stages and same structural coefficient. With that we got this relationship that we do not need to solve even for alpha we can directly get the value of lambda by solving that equation and we can solve for the problem. Let us look at the next case here in this case what we will say is that case 2 we will still maintain that u equivalent is constant which implies is p is same for all the stages you can still maintain that. But now what we say is that our epsilon i is not constant that means that different stages have different structural coefficient. When that happens immediately the change is that r i is equal to now by epsilon i. Now if you look back at my optimization equation here again the function here still remains of lambda i. Whereas now for every stage we also have epsilon i added here, but this still remains as lambda i. So, epsilon i only comes in f and we still differentiate with respect to lambda i. So, therefore as far as this optimization equation is concerned epsilon is a constant which appears is appearing as epsilon i that is it. So, therefore nothing here changes in the optimization process except this expression here epsilon is represented replaced by epsilon i. So, here I will replace this by epsilon i. So, what I will get then is that 1 plus lambda i minus 1 upon epsilon i plus lambda i plus alpha upon lambda i minus alpha upon 1 plus lambda i is equal to 0. So, once again I would like to reiterate the point that as far as this optimization process is concerned nowhere we have epsilon i as the variable. So, our variable primary variable is lambda i. Therefore, in this optimization equation we still can have variation in epsilon i then only thing that will change is that that epsilon will be replaced by epsilon i everything else remains same. So, in that case then our expression for lambda i will now have epsilon i instead of epsilon. So, if I do that I will get lambda i is equal to alpha epsilon i 1 minus alpha minus epsilon i let me call this equation 8. So, now alpha here is a function sorry lambda i here is a function of alpha as well as epsilon i. So far so good, but the problem now is here in the previous case since alpha and epsilon both were constant therefore, lambda i was a constant equal to lambda and because of that we can do it like this and get a direct expression for lambda. But when we come back to this case now epsilon i is not constant it is varying from stage to stage therefore, lambda i is also not constant is varying from stage to stage even though alpha is a constant. So, therefore, our l is essentially equal to pi i equal to 1 to n l i and my l i is equal to l i is equal to lambda up to n l i. So, this l i then will be replaced by this equation and in this equation I will replace lambda i by this after that if I simplify it let me call this equation 9. So, this is equal to pi i equal to 1 to n minus alpha epsilon i divided by epsilon i plus alpha minus 1 minus 1 minus alpha epsilon i. Now, we got this expression now we see that for this case the solution is not trivial what is happening is that even if we know epsilon i now we have this condition here which is the constraint. So, there is no direct method of solving alpha apart from solving from this equation. So, what we see here is we have this equation which is relating the variation of alpha and epsilon i to the overall payload fraction l. So, if this is given then this becomes a polynomial in alpha depending on the degree of polynomial depends on the number of stages that we have. For example, if we have a two stage rocket then what we will have is that the if n is equal to 2 if you have a two stage rocket then l is equal to minus alpha epsilon 1 upon alpha epsilon 1 plus alpha minus alpha minus alpha epsilon 1 times minus alpha epsilon 2 upon epsilon 1 minus epsilon 1 minus epsilon 2 plus alpha minus 1 minus alpha epsilon 2. So, now this is a polynomial in alpha as we can clearly see and this is going to be a second order polynomial. So, left hand side is known the only unknown here is alpha. So, for this case we get a second order polynomial in alpha that is say some function h alpha equal to 0. So, now what we need to do the process for solution is first we form this polynomial we solve for alpha from this polynomial. Once we have the value of alpha by solving this polynomial then we come back here we estimate lambda i because my epsilon i is given. So, what we have here now is we have two stages. So, my lambda 1 is going to be equal to alpha epsilon 1 upon 1 minus alpha minus epsilon 1 and my lambda 2 is going to be equal to alpha epsilon 2 1 minus alpha minus epsilon 2. After we get this the next step because finally, our optimization is getting l i. So, next will be l 1 which is equal to lambda 1 upon 1 plus lambda 1 and then l 2 which is equal to lambda 2 upon 1 plus lambda 2. So, this is going to be the procedure if you go to a three stage rocket we will have a third order polynomial because there is now another polynomial will come in here another term will come in here. If you have a fourth stage rocket it will be a fourth order polynomial. So, as the number of stages increases the order of polynomial will increase and we have to solve them to get the final solution. But this is the procedure once we have this now l 1 and l 2 are estimated or lambda 1 lambda 2 are estimated. We can go back to our expression for delta u which is equal to sigma i equal to 1 to n u equivalent l n 1 plus lambda i upon lambda i plus epsilon i. So, in this equation now epsilon i's are known lambda i's we are calculating from here. So, we can put them back into this equation equivalent velocities are known we can estimate what is going to be our overall velocity increment. So, the final velocity we will be getting from this that is how this problem needs to be solved. So, this was case two where the equivalent velocity was same for both the cases where we allowed for the structural coefficient to change. Let us look at a little more complex case now we say that neither the structural coefficient is constant nor the equivalent velocity is constant. Every stage is on its own it is varying all over the place and we have to find out what is the optimum value for the payload fraction that we need to have. So, for that again we do the similar optimization process as we have been doing so far. So, let us look at the third case case three here what we are saying that both epsilon i's and both are varying, but both are varying. Now, we know the value of epsilon i and equivalent i both of them are known under such conditions then we want to find out what is going to be our final value. Now, in order to do that I will go back to an older equation which we had derived few lectures earlier. I will write this equation here that epsilon is equal to 1 upon r minus l divided by 1 minus l and I had given this as a homework couple of lectures back and from here only we derived that r is equal to 1 upon l 1 minus epsilon plus epsilon. So, few lectures back we had derived this expressions now let us look at this equation here what we can say is that from here I can get an expression for 1 upon l and 1 upon l from here can be written as pi i equal to 1 to n 1 plus sorry first let me write l i 1 upon l i is equal to 1 plus r i minus 1 upon 1 upon l i is equal to 1 plus r i minus 1 upon 1 minus epsilon i r i we can do that here very simply and take it to this side and expand it. So, from this equations we can get this expression that 1 upon l i equal to 1 plus r i minus 1 upon 1 minus epsilon i r i. If that is the case then the product of all this is equal to 1 upon l this is the overall payload fraction is nothing, but product of 1 upon l i and this is equal to then equal to i equal to 1 to n 1 plus r i minus 1 upon 1 minus epsilon i r i. Now, this is our new constrain essentially the constrain is same, but now we are writing it in a little different form because our epsilon i is varying our i s p is varying everything is varying. So, we are trying to write it in a little different form. So, now let us go back to our overall velocity expression. So, this is what we are trying to write this expression is equal to now we will operate it little differently. We had talked about two cases one case was either we maximize payload fraction for a given delta u, other case was we minimize the payload fraction for max rather we maximize the velocity for the given payload fraction which we have been doing so far. The same equivalent case is we maximize the payload fraction for a given delta u. So, that is let us look at this one. Here ideally what we want to do is we want to minimize the payload ratio right, payload ratio we want to minimize. So, let me restate it l is equal to m l upon m naught what is our ultimate goal to put this into orbit with as little m naught as possible right. Now 1 by l is equal to m naught upon l right. So, here we want to minimize this which means that we want to maximize l and if you want to maximize l we want to minimize 1 by l sorry we want we want to minimize 1 by l. So, this is something that we want to minimize and now by 1 by l is given in this equation like this. So, we want to minimize this and what was our constant that we want to have the same velocity right. So, now what we are doing we have shown the equivalence of two statements the first two cases we operated with the condition that our l is given we maximize delta u. Now we are taking the other equivalent what we are saying is that our delta u is given we want to minimize the payload ratio or payload fraction by doing what doing that we are going to minimize 1 by l. So, then now this becomes our objective minimizing this becomes our objective and this becomes our constraint. So, then we can let us go back to this equation and we can write l n of 1 by l which is this equation when we take the natural logarithm of this then this becomes summative the product becomes summative. So, this is equal to then sigma i equal to 1 to n l n 1 plus r i minus 1 upon 1 minus epsilon i r i and as we can see here this is a essentially something like a function of r i and epsilon i right. So, this is a function of r i and epsilon i this is the function we want to minimize. So, in order to do that now we now, but this minimization has to be done with a constraint. So, what is our constraint this delta u. So, this delta u value is given as sigma i equal to 1 to n u equivalent i l n r i. So, we can write this then as sigma i equal to 1 to n a function of u equivalent i r i it does not depend on structural coefficient it depends on u equivalent. So, now this is my constraint this is my objective function we see that the objective function is a function of r i and structural coefficient the constraint is a function of r i and the specific impulse. So, therefore, if I now form combining these two our modified objective function the communality will be in r i. So, now in the present case what we are trying to do is we are trying to minimize this function which is essentially the inverse of payload ratio of payload mass fraction which is given by this expression with the constraint that our velocity is fixed. So, now this becomes the velocity becomes the constraint and we have different values of ISP for different stages. So, with this then then this term is our this will be l. So, what we do what we have done is we have taken log of this term then this becomes l n 1 plus r i minus i minus 1 divided by epsilon i by r i. So, this becomes now our f r i this is also a function of epsilon i, but what we have said is that the epsilon i is not a variable we know the structural coefficient for every stage. So, for a given state this is constant and then now this is our constraint the constraint which we are working on. So, this is nothing but we can write it as once again here also g is a function of equivalent velocity of the stage and r i, but once again we are saying that equivalent velocity is known for every stage ISP is known for every stage. So, therefore it is function only of r i then now we define our new objective function as l r i which is f r i plus alpha g r i. So, now this is our new objective modified objective function. So, we would like to minimize this remember in the previous cases we maximized, but now we want to minimize it because it is 1 by l. So, then for the minima first let me write this as equal to. So, what we are doing is the variable that we are looking at is r i. So, this is l r i my f is equal to what is f? f is this term. So, this is equal to l n 1 plus r i minus 1 divided by 1 minus epsilon i r i. So, this is equal to l n 1 plus r i. So, this is my d r i d f plus alpha which is the Lagrange multiplier and d r i g r i. g is nothing but this term u equivalent l n r i. So, this is equal to u equivalent i l n r i and then we put for the minima this is equal to 0. So, we put this equal to 0. After differentiating this and rearranging. So, again I will give this as a homework differentiate and rearrange do the maths yourself. What you will get is r i is equal to alpha u equivalent i plus 1 divided by alpha epsilon i u equivalent i. So, after rearranging this we will get r i as this. Now, we replace u equivalent i by i s p i g e because we know that equivalent velocity is function of the specific impulse for each individual stages. So, this can be then written as alpha i s p i g e plus 1 divided by alpha epsilon i i s p i g e plus 1 divided by alpha epsilon i i s p i g e. So, this is the expression for alpha r i. Now, we need to solve for alpha for that we need to get r i and how do you get an expression for r i? We have remember this constraint always. So, we like to now relate this to this the l i we will like to relate r i to l i. So, we know that r i is equal to 1 upon l i 1 minus epsilon i plus epsilon i this we had proved. Therefore, if I replace in this expression r i by this replace in this expression l i r i by this and then simplify it we can get an expression for l i in terms of the other parameters. So, let me write the expression for l i. So, l i equal to. So, what I am doing here is in this equation we can take l i here and r i back here. And then for r i we can put this expression and then do the rearrangement finally, we get l i equal to epsilon i divided by epsilon i minus 1 alpha i s p i times g e plus 1. And now we have our l l is equal to pi i equal to 1 to n l i. Therefore, l is equal to pi i equal to 1 to n that is the product epsilon i upon epsilon i minus 1 1 upon alpha i minus i s p i g e plus 1. We will do a little more simplification here we are operating with alpha let us define a new variable beta which is equal to minus alpha. Therefore, we can write l is equal to pi i equal to 1 to n epsilon i divided by epsilon i minus 1. So, we can write it like this and then what we will do is because epsilon we know is less than 1. So, we can make it different we can change this to epsilon i divided by 1 minus epsilon i beta i s p i g e minus 1. Now notice one thing here that we have got now an expression for l which includes this factor beta. Now for the solution what we do is this is the optimum distribution. So, in order to get the optimum thing first we have to get this parameter alpha. We have to solve actually for l i for that what we do is since we know l we use this equation this is the optimum equation optimized equation which includes the objective function as well as the constraint. Solving this equation for the given l once we expand it since epsilon values are known i s p values are known we get a polynomial in beta. We solve for this beta we get the value of beta which is equal to minus alpha. Once we have this alpha now we can put it back into this equation and we get different values of l i. Once we have the l i we can calculate then r i using this equation. Once we have r i we can go back to the expression for the velocity increment and estimate the velocity increment. So, this is the procedure that we need to follow. So, we will stop this lecture here and in the next lecture we will essentially continue with this discussion little more and after that we take another cases and look at the optimization little more. Thank you.