1 00:00:17,779 --> 00:00:29,510 in the last lecture we were looking at how to analyse convergence of non-linear procedures 2 00:00:29,510 --> 00:00:36,360 for solving nonlinear algebraic equations iterative procedures and we said that in general 3 00:00:36,360 --> 00:00:52,379 we could write any iterative method for solving nonlinear algebraic equations as 1 equation 4 00:00:52,379 --> 00:01:09,771 i want to solve for f of x=0 x belongs to rn and f is a nx1 vector this is nx1 function 5 00:01:09,771 --> 00:01:19,140 vector any iterative method to solve this problem 6 00:01:19,140 --> 00:01:45,479 numerically can be written as xk+1=g of xk so the old guess generates a new guess and 7 00:01:45,479 --> 00:01:53,969 this process is continued till differences between 2 successive solutions become negligible 8 00:01:53,969 --> 00:02:04,591 or norm of f of x goes close to 0 if you look carefully this is a nonlinear difference equation 9 00:02:04,591 --> 00:02:25,690 the index here is iteration index k so the guess is generated from the old guess g is 10 00:02:25,690 --> 00:02:31,540 the transformation i showed you that all the methods that we are looking at iterative methods 11 00:02:31,540 --> 00:02:42,260 can be expressed in this form now just like we had conditions for analysing linear difference 12 00:02:42,260 --> 00:02:43,260 equations 13 00:02:43,260 --> 00:02:53,260 earlier we had looked at equations of this type=b xk and for this particular case we 14 00:02:53,260 --> 00:03:04,370 had derived necessary and sufficient condition for norm xk to go to 0 as k goes to infinity 15 00:03:04,370 --> 00:03:10,060 in this case we had a very very powerful result that is spectral radius of b is strictly less 16 00:03:10,060 --> 00:03:49,620 than 1 this was the situation for the linear difference equation we had got this kind of 17 00:03:49,620 --> 00:03:55,830 a generic form by analysing iterative methods for solving linear algebraic equations 18 00:03:55,830 --> 00:04:09,480 we could derive a very very powerful result here based on the eigen value of matrix b 19 00:04:09,480 --> 00:04:21,690 we wanted all eigen values of matrix b to be inside the unit circle now coming to nonlinear 20 00:04:21,690 --> 00:04:26,500 equations it is not possible to prove so strong result we can only give sufficient conditions 21 00:04:26,500 --> 00:04:32,219 it is not possible to come up with necessary and sufficient conditions for a general nonlinear 22 00:04:32,219 --> 00:04:39,430 difference equation of that form we have to come up with some kind of local condition 23 00:04:39,430 --> 00:04:58,830 these local conditions i described through contraction mapping theorem or contracting 24 00:04:58,830 --> 00:05:14,740 mapping principle which forms the foundation of analyzing iterative schemes and 1 special 25 00:05:14,740 --> 00:05:22,000 that we saw was the operator g 26 00:05:22,000 --> 00:05:48,650 g is something g maps a ball around x not of radius r to where r was a special radius 27 00:05:48,650 --> 00:05:58,120 it should be >= a certain number that we had defined yesterday so if is a mapping which 28 00:05:58,120 --> 00:06:12,759 maps a ball of radius r*itself and if g is a contraction map 1 simple way of finding 29 00:06:12,759 --> 00:06:22,180 out whether g is contraction map over u was to see whether dou g/dou x was strictly <1 30 00:06:22,180 --> 00:06:44,410 or <= theta which is <1 for all x 31 00:06:44,410 --> 00:06:54,009 if the partial derivative of g with respect to x has any induced norm strictly <1 everywhere 32 00:06:54,009 --> 00:07:00,440 then we know that map g is the contraction 33 00:07:00,440 --> 00:07:15,889 if map g is contraction then in neighborhood of x not of radius r we were assured of existence 34 00:07:15,889 --> 00:07:22,490 of a solution we are assured that any sequence starting from any point in this region would 35 00:07:22,490 --> 00:07:37,400 converse to the solution so solution of this problem is x*=g of x* x* is the solution and 36 00:07:37,400 --> 00:07:44,680 if this condition is met everywhere in this ball then it is sufficient condition to say 37 00:07:44,680 --> 00:07:49,110 that any sequence generated by this difference equation will converse to this solution 38 00:07:49,110 --> 00:07:57,009 solution is x*=g(x*) just to draw the parallel i am writing this just to draw parallel we 39 00:07:57,009 --> 00:08:15,039 had a sufficient condition here that if norm of b is strictly <1 then also this condition 40 00:08:15,039 --> 00:08:30,180 holds that xk goes to 0 as k goes to infinity so we said this is the weaker condition than 41 00:08:30,180 --> 00:08:35,360 this necessary and sufficient condition but this condition helped us to analyse to come 42 00:08:35,360 --> 00:08:43,250 up with diagonal dominance and all kinds of other theorems which were used to analyse 43 00:08:43,250 --> 00:08:44,390 iterative schemes 44 00:08:44,390 --> 00:08:51,959 likewise analogous to this when i come here this contraction mapping principle tells us 45 00:08:51,959 --> 00:08:58,299 very very important things 1 is that if g is a contraction map if its local derivative 46 00:08:58,299 --> 00:09:16,020 has if you g (x) to be dx then local derivative of g with respect to x will be matrix b and 47 00:09:16,020 --> 00:09:22,650 any induced norm of matrix b being strictly less than 1 is the condition that we are looking 48 00:09:22,650 --> 00:09:38,140 for there so they coincide this particular equation only difference there was the solution 49 00:09:38,140 --> 00:09:41,569 the point where we wanted to reach was 000 origin 50 00:09:41,569 --> 00:09:50,530 in this case we want to reach a solution x*=g(x*) it is possible to make everything in terms 51 00:09:50,530 --> 00:09:59,720 of 000 if you redefine or shift the origin to x* then you can make the 2 problems almost 52 00:09:59,720 --> 00:10:06,140 equivalent but that is not important it is just matter of shifting the origin what is 53 00:10:06,140 --> 00:10:16,760 important is that there is an analogous sufficient condition here for nonlinear difference equations 54 00:10:16,760 --> 00:10:22,660 it does not help us here to look at the spectral radius of this matrix 55 00:10:22,660 --> 00:10:26,939 it does not help here the reasons which are difficult to explain as a part of this course 56 00:10:26,939 --> 00:10:35,340 but we have to use only norm and any induced norm if any induced norm is strictly < 1 in 57 00:10:35,340 --> 00:10:39,699 some region then you are guaranteed that there exist a solution to this difference equation 58 00:10:39,699 --> 00:10:47,329 in that region the solution is unique and the third point which was very very important 59 00:10:47,329 --> 00:10:54,220 start from any initial guess you will converse to that solution 60 00:10:54,220 --> 00:10:59,959 start from any initial guess in that region you will converse to the solution x*=g(x*) 61 00:10:59,959 --> 00:11:07,900 so these are very very important findings of this particular theorem in general it is 62 00:11:07,900 --> 00:11:13,360 more difficult to apply this theorem for a complex real problem nevertheless it gives 63 00:11:13,360 --> 00:11:22,929 us some insights for example you can try and make the sufficient conditions meet by ensuring 64 00:11:22,929 --> 00:11:29,630 that dou g/dou x has induced norm <1 you can try to do this 65 00:11:29,630 --> 00:11:37,390 if there is some problem in solving some nonlinear equations we can these are sufficient conditions 66 00:11:37,390 --> 00:11:42,540 remember that if this conditions are violated even then the conversions can occur these 67 00:11:42,540 --> 00:11:48,850 are not necessary conditions but this happens convergence will occur just like in this case 68 00:11:48,850 --> 00:11:58,160 when we were talking about linear algebraic equations if norm of these <1 spectral radius 69 00:11:58,160 --> 00:12:01,209 is <1 it is a sufficient condition 70 00:12:01,209 --> 00:12:05,620 but if norm of b is >1 even then convergence can occur because convergence depends upon 71 00:12:05,620 --> 00:12:11,810 the spectral radius spectral radius can be <1 similarly contraction mapping principle 72 00:12:11,810 --> 00:12:19,010 gives us a sufficient condition for convergence it is not a necessary condition if you meet 73 00:12:19,010 --> 00:12:26,199 the sufficient condition you are guaranteed to converge so this gives at least some handle 74 00:12:26,199 --> 00:12:35,160 to understand how the convergence occurs from that view point this is important 75 00:12:35,160 --> 00:12:41,960 those of you who are solving large algebraic equations as a part of your research m tech 76 00:12:41,960 --> 00:12:49,360 or phd and hit into problems you should look at the norm of the jacobian i mean at least 77 00:12:49,360 --> 00:12:56,459 that much you should remember look at the norm of the jacobian i try to see whether 78 00:12:56,459 --> 00:13:06,990 you can make the norm of the jacobian <1 you have good chances of convergence just to illustrate 79 00:13:06,990 --> 00:13:26,339 this idea of contraction map i just give you 1 example here 80 00:13:26,339 --> 00:13:54,680 i want to solve simultaneously these are 2 nonlinear algebraic equations which i want 81 00:13:54,680 --> 00:14:05,819 to solve simultaneously if i write this – this=0 and this-this=0 then this is f(x)=0 there 82 00:14:05,819 --> 00:14:15,800 are 2 functions f1zy and f2zy i want to find out a solution for this particular problem 83 00:14:15,800 --> 00:15:02,730 i am formulating an iteration scheme here zk+1=1/16-1/4 yk square and 84 00:15:02,730 --> 00:15:06,760 i have just formed 1 iteration scheme this is not the only way to form iteration scheme 85 00:15:06,760 --> 00:15:13,829 i am showing you 1 possible way of forming the iteration scheme this is a jacoby type 86 00:15:13,829 --> 00:15:20,400 iteration scheme what would be the gauss-seidel kind of iteration scheme if i were to use 87 00:15:20,400 --> 00:15:34,339 zk+1 here it will become gauss-seidel type iteration scheme this is the jacoby type iteration 88 00:15:34,339 --> 00:15:41,809 scheme now what i am going to do here is 89 00:15:41,809 --> 00:16:05,559 i have this scheme which is yz=g(yz) where g i this right hand side function 90 00:16:05,559 --> 00:16:39,010 i am considering this unit ball let us say x not my initial guess is 0 1 no no my initial 91 00:16:39,010 --> 00:16:50,079 guess is x0=0 0 and i am considering this unit ball 92 00:16:50,079 --> 00:17:02,439 of radius 1 in the neighborhood of 0 0 so i am looking at 93 00:17:02,439 --> 00:17:35,680 now what is 94 00:17:35,680 --> 00:17:52,050 this infinite norm i am taking some point xi and some point xj x here is x consist of 95 00:17:52,050 --> 00:19:02,570 y and z x is the vector consisting of 2 elements y and z now i am looking at this 96 00:19:02,570 --> 00:19:12,380 what is the infinite norm infinite norm is maximum of the absolute value of the elements 97 00:19:12,380 --> 00:19:24,670 what i am doing is i am taking xi-gxz it has 2 elements i am just taking the maximum of 98 00:19:24,670 --> 00:19:29,950 these 2 absolute values will be the norm i am just using definition of infinite norm 99 00:19:29,950 --> 00:19:30,950 nothing else 100 00:19:30,950 --> 00:19:46,340 just this is definition of infinite norm 101 00:19:46,340 --> 00:20:00,600 so you can show that this is <= max of i am skipping in between steps you 102 00:20:00,600 --> 00:20:50,000 should fill them up just go back and look at why this step comes from this 103 00:20:50,000 --> 00:21:00,070 you can prove this in equalities that is this particular difference infinite norm of this 104 00:21:00,070 --> 00:21:14,240 difference is 00:21:22,110 to show that in this particular case you can show that 106 00:21:22,110 --> 00:21:31,080 i am using here the fact that the elements are drawn from the unit ball so that is why 107 00:21:31,080 --> 00:21:38,970 these types have been written and essentially using this inequalities what you can show 108 00:21:38,970 --> 00:22:02,620 is that gi-gj uing these inequalities you can also do analysis using the derivative 109 00:22:02,620 --> 00:22:08,000 of this and taking this infinite norm you can also do analysis using derivative of this 110 00:22:08,000 --> 00:22:12,690 right hand side jacobian matrix and infinite norm of the jacobian matrix that analysis 111 00:22:12,690 --> 00:22:14,920 is also possible 112 00:22:14,920 --> 00:22:25,100 in this particular case we have found that if we apply g on any xi and xj then this inequality 113 00:22:25,100 --> 00:22:35,230 holds if this inequality holds what it means is that this constant on the right hand side 114 00:22:35,230 --> 00:22:46,120 is <1 so this is strictly <1 so this g map is a contraction if g map is a contraction 115 00:22:46,120 --> 00:22:55,170 i am guaranteed that there exist a solution in this unit ball the solution is unique and 116 00:22:55,170 --> 00:23:00,520 starting anywhere in this unit ball this is in reference to the infinite norm 117 00:23:00,520 --> 00:23:06,880 it will be a square it will look like a square we have seen this how does the unit ball look 118 00:23:06,880 --> 00:23:14,300 like in different norms starting from any initial guess within this the iterations will 119 00:23:14,300 --> 00:23:22,441 converge to the solution so this we are guaranteed because we are able to prove this in equality 120 00:23:22,441 --> 00:23:36,990 here for this particular x=g(x) what is important here is that just looking at or just developing 121 00:23:36,990 --> 00:23:47,410 this inequality this is infinite i am guaranteed that a solution exist in the ball 122 00:23:47,410 --> 00:23:56,750 i am guaranteed that i start from anywhere and i will reach the solution and this iteration 123 00:23:56,750 --> 00:24:03,180 scheme is going to work that is what i know from this analysis just do not bother about 124 00:24:03,180 --> 00:24:09,040 these in between steps assume that this sequence is true because our aim is not to do this 125 00:24:09,040 --> 00:24:15,430 algebra you can work on this algebra later more important is that by doing this algebra 126 00:24:15,430 --> 00:24:30,120 i can show that infinite norm of gi-gj/xi-xj for any i j i can prove this 127 00:24:30,120 --> 00:24:37,150 i take any 2 points in this ball apply g on both the points the new points will have a 128 00:24:37,150 --> 00:24:44,580 distance which is closer than the original 2 points that is the main thing if that happens 129 00:24:44,580 --> 00:24:50,559 we are assured that the solution exist we are assured that starting from x not we will 130 00:24:50,559 --> 00:24:55,950 reach the solution moreover from any initial guess in this region if we start we will still 131 00:24:55,950 --> 00:25:09,990 reach the solution that is the important point it is difficult to do this analysis for a 132 00:25:09,990 --> 00:25:12,020 very large scale nonlinear system 133 00:25:12,020 --> 00:25:19,340 nevertheless it is important to get this insight that how does 1 look at analysis of convergence 134 00:25:19,340 --> 00:25:25,930 of iterative schemes for solving nonlinear algebraic equations because most of the times 135 00:25:25,930 --> 00:25:33,860 you will be actually dealing with nonlinear algebraic equations large scale in your computation 136 00:25:33,860 --> 00:25:41,140 work because most of the chemical engineering problems 999% of them are nonlinear problems 137 00:25:41,140 --> 00:25:46,660 reactions of heavy transfer occurs and turbulence and always things will make the life very 138 00:25:46,660 --> 00:25:47,880 very complex 139 00:25:47,880 --> 00:25:53,220 we have to work with a set of nonlinear algebraic equations what is it that governs the convergence 140 00:25:53,220 --> 00:26:03,370 we can get some clues if you can show that the iteration scheme that you have formed 141 00:26:03,370 --> 00:26:08,870 actually is a contraction map difficult to show in general for large scale system but 142 00:26:08,870 --> 00:26:13,330 this does give you insight which is very very important that is what you should carry i 143 00:26:13,330 --> 00:26:16,940 want to stop here i do not want to get into too much details 144 00:26:16,940 --> 00:26:26,309 in the notes i have given some more detailed discussion on newton’s method so there are 145 00:26:26,309 --> 00:26:35,611 special theorems for convergence of newton’s method and more than the proof and the theorem 146 00:26:35,611 --> 00:26:40,430 statement i have tried to give some qualitative insights as to how to interpret those theorems 147 00:26:40,430 --> 00:26:47,880 i have not included the proof the proof can be found in any of the text books on nonlinear 148 00:26:47,880 --> 00:26:52,140 systems like one of the very well known textbooks 149 00:26:52,140 --> 00:27:00,200 so you can find proofs there but the interpretation is quite important as to how do you make convergence 150 00:27:00,200 --> 00:27:15,680 occur so typically if you have formed iteration scheme in this case i worked with i did not 151 00:27:15,680 --> 00:27:21,640 take a derivative but you could also try to see for this particular system you can work 152 00:27:21,640 --> 00:27:26,850 this out 153 00:27:26,850 --> 00:27:37,550 you can try to see whether dou g/dou x infinite norm if this is strictly <1 in the region 154 00:27:37,550 --> 00:27:47,120 where you are trying to operate or trying to solve the problem or dou g/dou x 1 norm 155 00:27:47,120 --> 00:27:58,310 is strictly <1 if these conditions are met then we are guaranteed that the solution exist 156 00:27:58,310 --> 00:28:11,050 and we will reach the solution these are some why infinite norm and why 1 norm because they 157 00:28:11,050 --> 00:28:16,540 are easy to compute infinite norm and 1 norm are easy to compute 158 00:28:16,540 --> 00:28:22,120 other norms like 2 norms will require eigen value computation other than that 1 norm and 159 00:28:22,120 --> 00:28:27,790 infinite norm are easy to compute so you can quickly make a judgment what is going wrong 160 00:28:27,790 --> 00:28:35,990 when you are solving the problem this brings us to an end of methods for solving nonlinear 161 00:28:35,990 --> 00:28:40,960 algebraic equations we have looked at different concepts we have looked at how to solve them 162 00:28:40,960 --> 00:28:48,540 using different algorithms we just briefly touched upon idea of condition number 163 00:28:48,540 --> 00:28:53,020 also we very very briefly touched upon the idea of convergence of iterative schemes we 164 00:28:53,020 --> 00:28:58,970 have not gone deep into it but at least you know about what is the tool or what is the 165 00:28:58,970 --> 00:29:07,570 machinery that is used for actually looking at this problem let us move on to solving 166 00:29:07,570 --> 00:29:13,500 ordinary differential equations initial value problems now what i want to do next is before 167 00:29:13,500 --> 00:29:28,059 i proceed again we go back to our global diagram 168 00:29:28,059 --> 00:30:11,050 so our global diagram was so we have this original problem then we use approximation 169 00:30:11,050 --> 00:30:33,620 theory to come up with transformed problem 170 00:30:33,620 --> 00:30:42,730 so we have been calling it transformed computable forms and then we said there are 4 tools 1 171 00:30:42,730 --> 00:30:59,190 is ax=0 this tool set which we will be using and the other tool set was f(x)=0 so solving 172 00:30:59,190 --> 00:31:03,830 nonlinear algebraic equations solving linear algebraic equations this is the second tool 173 00:31:03,830 --> 00:31:05,280 set that we have 174 00:31:05,280 --> 00:31:18,850 the third tool set that i am going to look at is od-ivp because in many cases the transformed 175 00:31:18,850 --> 00:31:28,830 problem is an od initial value problem i talk about a method later on how do you transform 176 00:31:28,830 --> 00:31:34,760 a boundary value problem into initial value problem actually not just one initial value 177 00:31:34,760 --> 00:31:47,809 problem a series of initial value problems which are then solved iteratively the fourth 178 00:31:47,809 --> 00:32:03,490 tool is stochastic methods but we are not going to get into this 179 00:32:03,490 --> 00:32:11,070 so right now we have done this how to solve ax=b we looked at many many methods we looked 180 00:32:11,070 --> 00:32:17,500 at many issues that are associated with this we have looked at f(x)=0 and now we are moving 181 00:32:17,500 --> 00:32:32,920 to od-ivp all these after all is going to give us approximate solution 182 00:32:32,920 --> 00:32:38,350 this is going to give an approximate solution to the original problem so moving on to solving 183 00:32:38,350 --> 00:32:56,730 ordinary differential equations initial value problem 184 00:32:56,730 --> 00:33:07,130 general form that the types of equation that i am going to look at is of this type dx/dt=f(x 185 00:33:07,130 --> 00:33:26,280 t) where f is the function vector 186 00:33:26,280 --> 00:33:35,540 and x belongs to rn what i am given apart from this differential equation model i am 187 00:33:35,540 --> 00:33:47,679 also given 188 00:33:47,679 --> 00:33:57,130 initial condition at time=0 now before i move on let me explain one notational difference 189 00:33:57,130 --> 00:34:10,540 that we will have in this case if you are dealing with vectors we will have to deal 190 00:34:10,540 --> 00:34:15,639 with 3 different attached indices with the vector 191 00:34:15,639 --> 00:34:30,330 suppose x is my vector here i-th element of the vector will be given by xi this notation 192 00:34:30,330 --> 00:34:41,850 we have been using even earlier bracket k will indicate k-th iteration now additional 193 00:34:41,850 --> 00:34:50,770 complexity comes in we have time so time will come here so there are 3 things attached to 194 00:34:50,770 --> 00:34:57,710 the vector in some cases you will have i-th component of the vector you will have time 195 00:34:57,710 --> 00:35:03,050 t appearing here and you may have k-th iteration 196 00:35:03,050 --> 00:35:15,810 in some cases we do not need i and k we just might work with x t x t means 197 00:35:15,810 --> 00:35:22,800 vector x at time t so now a third dimension comes into picture here when you write in 198 00:35:22,800 --> 00:35:31,050 the notation sometimes there are schemes which are iterative and you will need index sometimes 199 00:35:31,050 --> 00:35:44,359 you need to prefer to i-th component so you need xi and t is time now what kind of equations 200 00:35:44,359 --> 00:35:47,210 i am worried about what kind of equations i am going to look at 201 00:35:47,210 --> 00:35:55,110 you might say that well what is written here is only a first order vector matrix equation 202 00:35:55,110 --> 00:36:02,970 dx/dt=f(x) i am writing only a first order equation only first order derivatives and 203 00:36:02,970 --> 00:36:08,030 in your engineering problems you often come across models which are second order third 204 00:36:08,030 --> 00:36:17,290 order fourth order and when you did your first course in the differential equations you had 205 00:36:17,290 --> 00:36:22,590 n-th order differential equations and then you had methods of solving n-th order differential 206 00:36:22,590 --> 00:36:23,590 equation 207 00:36:23,590 --> 00:36:27,580 so why am i doing things only for the first order differential equation though the difference 208 00:36:27,580 --> 00:36:31,760 here is the vector differential equation earlier we were looking at scalar differential equation 209 00:36:31,760 --> 00:36:38,730 what i am going to show that any n-th order differential equation can be converted into 210 00:36:38,730 --> 00:36:44,790 n first order differential equations so this form which i have written here is very very 211 00:36:44,790 --> 00:36:56,020 generic so let us begin by looking at this conversion let us say you have this 212 00:36:56,020 --> 00:37:44,050 let us say i have this differential equation in the scalar variable y so y is a scalar 213 00:37:44,050 --> 00:37:53,350 y is some mass fraction or some temperature or whatever is the case you have some differential 214 00:37:53,350 --> 00:37:58,740 equation let us say this is n-th order differential equation in general nonlinear differential 215 00:37:58,740 --> 00:38:03,320 equation we do not know i am just writing a generic form could be anything this is in 216 00:38:03,320 --> 00:38:10,359 one variable an independent variable is time 217 00:38:10,359 --> 00:38:18,570 what i am going to do now i am going to define new state variables so my state variable and 218 00:38:18,570 --> 00:38:22,410 what i am given together here to solve this problem say initial value problem so what 219 00:38:22,410 --> 00:38:28,070 do i need to solve this problem i need a differential equation and i need the initial conditions 220 00:38:28,070 --> 00:38:56,990 initial conditions are given for y(0) dy/dt at 0 so we are given initial condition we 221 00:38:56,990 --> 00:39:03,440 are given initial y0 initial derivatives up to order n-1 these are required to solve this 222 00:39:03,440 --> 00:39:06,080 differential equation 223 00:39:06,080 --> 00:39:11,960 with this differential equation together with this initial condition will be initial value 224 00:39:11,960 --> 00:39:20,160 problem solving ordinary differential equation initial value problem this is what i get now 225 00:39:20,160 --> 00:39:35,810 what i am going to do now is to start defining a new set of variables 226 00:39:35,810 --> 00:40:13,869 my new variable x1t-yt x2t=dy/dt x3t=d2y/dt square up to xnt=dn-1/dt n-1-th derivative 227 00:40:13,869 --> 00:40:28,280 i am defining new variable x1 to xn now you can see that these variables are related to 228 00:40:28,280 --> 00:40:56,680 first order differential equations i can very easily say that dx1/dt=x2 dx2/dt=x3 so i have 229 00:40:56,680 --> 00:41:15,690 such n-1 equations 230 00:41:15,690 --> 00:41:23,849 this is my equation number 1 equation number 2 and this is my equation number n-1 i have 231 00:41:23,849 --> 00:41:28,760 n-1 such relationships between the variables 232 00:41:28,760 --> 00:41:36,880 all of them are first order differential equations the last 1 is now just the equation that we 233 00:41:36,880 --> 00:42:07,520 have so the last equation n-th equation this is dxn/dt this is nothing but d/dt of 234 00:42:07,520 --> 00:42:39,440 d n-1y this is my definition this is = fx1 x2… xnt i have an n-th order differential 235 00:42:39,440 --> 00:42:45,060 equation which got converted into n first order differential equations this is my first 236 00:42:45,060 --> 00:42:54,109 equation second equation n-1-th equation and the last equation came from the original n-th 237 00:42:54,109 --> 00:42:55,349 order differential equation 238 00:42:55,349 --> 00:43:03,880 x1 x2 x3 …xn are the new state variables that we have defined so what i have actually 239 00:43:03,880 --> 00:43:13,050 done is a scalar n-th order differential equation i have converted into n first order differential 240 00:43:13,050 --> 00:43:24,580 equations in new variables so if i have n-th order equation i can convert it into n first 241 00:43:24,580 --> 00:43:34,150 order equations if i have 2 simultaneous equations 1 n-th order in 1 variable other m-th order 242 00:43:34,150 --> 00:43:42,040 in other variable first 1 will give me n first order equations 243 00:43:42,040 --> 00:43:46,410 second 1 will give me m first order equations you can stake them together into a bigger 244 00:43:46,410 --> 00:43:51,960 vector you will still get this form so this is the very very generic form i am not doing 245 00:43:51,960 --> 00:44:00,430 any compromise any n-th order equation or any set of n-th order equations n-th m-th 246 00:44:00,430 --> 00:44:05,330 order equations can be combined into finally this form this is the very very generic form 247 00:44:05,330 --> 00:44:09,430 so do not worry about why are we looking at only first order vector differential equation 248 00:44:09,430 --> 00:44:17,630 so all the advanced books on nonlinear differential equations will worry about this generic form 249 00:44:17,630 --> 00:44:23,330 because anything can be converted to the generic form that is the first thing to understand 250 00:44:23,330 --> 00:44:30,050 so all the methods that we will develop are for this if you have n-th order equations 251 00:44:30,050 --> 00:44:36,800 you know how to convert them into n-th first order equations and write it like this so 252 00:44:36,800 --> 00:44:41,350 what will be f(x) in this particular case what will be the f vector 253 00:44:41,350 --> 00:44:56,520 let us go back and write that in this particular case my f vector after 254 00:44:56,520 --> 00:45:02,980 a transformation actually 255 00:45:02,980 --> 00:45:39,960 my equations are d/dt of x1 x2 x3 …xn=x2 x3 …xn and f(x1 x2 …xnt) this is my f(x) 256 00:45:39,960 --> 00:45:47,510 this is the transform problem this is my f(x) and i am given the initial condition so i 257 00:45:47,510 --> 00:45:58,130 am given initial condition x not which is whatever this is y0 dy0/dt all these are given 258 00:45:58,130 --> 00:46:19,490 to me this is my x not this is given to me this is my f(x) the original equation will 259 00:46:19,490 --> 00:46:28,119 appear as 1 scalar nonlinear function in a function vector this my function vector 260 00:46:28,119 --> 00:46:32,780 this is a transform problem i do not have to worry about n-th order equations i am not 261 00:46:32,780 --> 00:46:37,570 going to do separate methods in the first course of differential equation you have second 262 00:46:37,570 --> 00:46:41,411 order differential equations 1 chapter on second order differential equations then you 263 00:46:41,411 --> 00:46:45,240 will look at n-th order equations we are not going to separate we are just going to look 264 00:46:45,240 --> 00:46:48,570 at n differential equations which are coupled 265 00:46:48,570 --> 00:46:57,970 if you are trained to solve dynamic simulation of a chemical plant there will be 1000s of 266 00:46:57,970 --> 00:47:02,980 differential equations which are solved simultaneously together in fact they might be differential 267 00:47:02,980 --> 00:47:07,270 and algebraic equations not differential equations so we are worried about right now to begin 268 00:47:07,270 --> 00:47:13,230 with solving large number of differential equations simultaneously together in 1 shot 269 00:47:13,230 --> 00:47:22,570 that is my aim this form is very generic applicable to any set 270 00:47:22,570 --> 00:47:26,750 other way of getting these kind of equations we have already seen where do you get these 271 00:47:26,750 --> 00:47:32,710 kind of equations in problem discretization where did you find them finite difference 272 00:47:32,710 --> 00:47:37,940 method orthogonal collocations of partial differential equations that involve time and 273 00:47:37,940 --> 00:47:44,339 space we discretize in space we got differential equation in time we got n differential equations 274 00:47:44,339 --> 00:47:50,920 they were first order if those are all second order you can convert them into 2 first order 275 00:47:50,920 --> 00:47:51,920 equations 276 00:47:51,920 --> 00:47:56,130 all that is possible that is not difficult so converting n-th order equation into first 277 00:47:56,130 --> 00:47:59,710 order equations is not a problem we are going to look at the generic form this could be 278 00:47:59,710 --> 00:48:05,700 arising from any of the sources this could be arising from the 1 which we have done right 279 00:48:05,700 --> 00:48:15,330 now it could be arising from discretization of a pde it might be arising from some other 280 00:48:15,330 --> 00:48:23,540 context we already have studied about in what context this kind of problems will come 281 00:48:23,540 --> 00:48:32,849 we will look at only how to solve this abstract form of vector differential equation the other 282 00:48:32,849 --> 00:48:38,390 thing which you might worry about is that where does this time t come into picture most 283 00:48:38,390 --> 00:48:47,490 of the times the differential equations that you get an exercise that i have given you 284 00:48:47,490 --> 00:48:54,410 to solve differential equations for 1 particular system and i had given you a program which 285 00:48:54,410 --> 00:49:02,490 solves differential equations for a cstr i suppose you remember to submit assignment 286 00:49:02,490 --> 00:49:05,830 soon 287 00:49:05,830 --> 00:49:15,109 that equation is of this form dx/dt=f(x u) there are some free variables x are dependent 288 00:49:15,109 --> 00:49:22,210 variables and there are some free variables like feed flow coolant flow coolant temperature 289 00:49:22,210 --> 00:49:30,180 inlet concentration all these are this u variables so in that particular problem cstr problem 290 00:49:30,180 --> 00:49:40,790 x corresponds to concentration of a and temperature and u corresponds to inlet flow rate cooling 291 00:49:40,790 --> 00:49:51,740 water flow rate inlet concentration cooling water temperature at inlet and so on 292 00:49:51,740 --> 00:49:58,140 so these are the free variables but if you go back and look at the problem statement 293 00:49:58,140 --> 00:50:06,339 these manipulated variables or input variables have been defined as a function of time this 294 00:50:06,339 --> 00:50:14,330 is sinusoidal this is whatever we have defined these as some functions of time once these 295 00:50:14,330 --> 00:50:22,640 are given as functions of time we can substitute them here as some function of time and then 296 00:50:22,640 --> 00:50:35,010 once 297 00:50:35,010 --> 00:50:40,501 these are specified functions of time then only we can solve the initial value problem 298 00:50:40,501 --> 00:50:49,950 for those specified functions of time this problem has been transformed to dx/dt=f(x 299 00:50:49,950 --> 00:50:59,550 t) because u will be function of only time some specified function of time a ramp function 300 00:50:59,550 --> 00:51:05,860 step function sinusoidal function or whatever whatever you want to study the dynamics of 301 00:51:05,860 --> 00:51:11,839 the particular system you are specified this free inputs and then this becomes a problem 302 00:51:11,839 --> 00:51:16,410 which again is the generic form 303 00:51:16,410 --> 00:51:23,500 so this parameter or these input variables we assume that we already know them and then 304 00:51:23,500 --> 00:51:29,110 we want to solve the problem for the known inputs how does the dynamics evolves in time 305 00:51:29,110 --> 00:51:36,540 that is what we want to solve that is why we are looking at in general dx/dt=f(x t) 306 00:51:36,540 --> 00:51:50,540 how this is specified as a function of time let us not worry about that right now it could 307 00:51:50,540 --> 00:51:54,870 be an operator who is giving these values it could be a controller which is finding 308 00:51:54,870 --> 00:51:55,870 out these values 309 00:51:55,870 --> 00:51:59,700 it could be some environmental conditions which define the cooling water inlet temperature 310 00:51:59,700 --> 00:52:07,099 we do not bother about that right now we want to solve the problem when this is specified 311 00:52:07,099 --> 00:52:16,030 how do you actually find out x as a function of time i want to find out given these input 312 00:52:16,030 --> 00:52:23,990 trajectories in time i want to find out x trajectory that is concentration trajectory 313 00:52:23,990 --> 00:52:31,640 starting from time 0 to whatever final time you want and temperature trajectory as solution 314 00:52:31,640 --> 00:52:37,450 of this problem is going to be not 1 vector 315 00:52:37,450 --> 00:52:43,940 when you are solving nonlinear algebraic equations you got 1 vector as a solution the fixed point 316 00:52:43,940 --> 00:52:57,090 now the solution is going to be a trajectory in time trajectory in time over the finite 317 00:52:57,090 --> 00:53:05,119 if we are solving over a finite time or whatever t goes to infinity if you want to look at 318 00:53:05,119 --> 00:53:13,440 now linear differential equations of this type you probably have already looked at in 319 00:53:13,440 --> 00:53:16,490 some other course wherever we need them we will visit them 320 00:53:16,490 --> 00:53:23,510 those of you who have not done the other course on analytical methods in chemical engineering 321 00:53:23,510 --> 00:53:32,980 i will briefly mention those results which we need here we are going to look at the problem 322 00:53:32,980 --> 00:53:41,260 when this f(x) on the right hand side is nonlinear not when it is linear that is very very crucial 323 00:53:41,260 --> 00:53:48,070 we will use the results for linear later on to get some insights into the convergence 324 00:53:48,070 --> 00:53:52,690 properties under what conditions the methods that you have proposed will converge 325 00:53:52,690 --> 00:53:58,460 that is why we will use some linear system results but in general what we are going to 326 00:53:58,460 --> 00:54:04,750 look at is methods for solving nonlinear ordinary differential equations given initial conditions 327 00:54:04,750 --> 00:54:12,220 how do you get trajectories in time or it could be trajectories in space we have seen 328 00:54:12,220 --> 00:54:20,810 that for example method of lines for converting laplace equation you discretize only in 1 329 00:54:20,810 --> 00:54:27,070 spatial direction the other 1 is stated as a differential equation so you get instead 330 00:54:27,070 --> 00:54:29,369 of differential equations in time or space 331 00:54:29,369 --> 00:54:35,690 you want to integrate the differential equations so t here in general need not be time alone 332 00:54:35,690 --> 00:54:42,750 t here is treated as independent variable in some context it could be space so maybe 333 00:54:42,750 --> 00:54:51,080 i should write a generic form that neta so neta is some independent variable it could 334 00:54:51,080 --> 00:54:59,280 be time on space depending upon the context and initial condition at neta=0 is given and 335 00:54:59,280 --> 00:55:00,869 you want to integrate this set of differential equations 336 00:55:00,869 --> 00:55:09,160 the way that we are going to proceed will briefly peak into the issue of existence of 337 00:55:09,160 --> 00:55:15,359 solution very very briefly and then move on to the different methods of doing numerical 338 00:55:15,359 --> 00:55:25,359 integration again what is going to help us taylor series approximation and polynomial 339 00:55:25,359 --> 00:55:30,690 approximations we are going to meet our old friends taylor and weierstrass again and use 340 00:55:30,690 --> 00:55:34,670 them repeatedly to solve these problems 341 00:55:34,670 --> 00:55:39,750 what i want to stress here is that the same ideas are used again and again to form the 342 00:55:39,750 --> 00:55:46,650 solution methods there are few fundamental ideas which if you understand those ideas 343 00:55:46,650 --> 00:55:52,951 and if you know how to apply them you can almost do everything from scratch same idea 344 00:55:52,951 --> 00:56:02,240 is repeatedly used if you get this viewpoint then i think you have learnt a lot next class 345 00:56:02,240 --> 00:56:09,070 onwards we will begin with how to solve ordinary differential equations and algorithms 346 00:56:09,070 --> 00:56:13,780 and then finally we will move on to the convergence properties under what conditions these converge 347 00:56:13,780 --> 00:56:17,510 try to get some insights into relative behavior of different methods and so on