 Now, let us get some intuition on the behavior of the stocks. As I told, now we have kind of learning how to define stocks and flows. Now, let us try to see what will be the behavior over time, the entire thing is called system dynamics. Dynamics mean evaluation over time. So, let us see when this values are the input stock if it or the flows when it changes then what kind of behavior we can expect in the stocks. And we can do that graphically we do not really need any match to it so that we can build a intuition. So, this given the what we want to say compute the behavior of the stock given the flow rates we know how the flows are happening what is happening in the stock that is called as you know we are just integrating it. So, we can do it graphically. So, before that we will try to understand what is it that we want to do. Let us consider simple example like this I have a stock and I have a net flow into the stock ok. So, what we see is x axis always time unless otherwise stated. Suppose the flow rate is changing like this over time we want to see how the stock changes. Flow rate suppose changed from say time t 1 to t 2 the same time t 1 to t 2 we want to figure out how the stock changes. Flow rate is positive let us assume it is positive let us take this as 0. So, we expect the stock is going to increase correct. How much will be the quantum of increase let us not worry about the shape let us just take it like suppose it change like this. So, what should be the quantum of increase the change should be the area under this curve that we have taken let me draw a more simpler example. Let us take flow time t 0 10 20 time minus 30 y axis says 0 10 and 20 let us assume the flow is 0 then there is a rectangular pulse from time 10 to time 20 and then again it falls back to 0. So, there is a rectangular pulse is given as a net flow into the stock. So, let us assume this is the behavior of the flow over time. Now, you want to plot the behavior of my stock over time let us assume my initial value of stock is 100. Let us assume the initial value of stock is 100. So, until time 10 what will be the value of stock it is going to remain the same 100 there is no change in flows. So, for this refer this diagram the net flow is 0. So, that means, the value of stock remains at 100. So, here we are going to assume initial stock is 100 units ok. Until time 10 it is 100 then what happens from time 10 to 20? It will increase how will it increase? So, you give a rectangular pulse what happens? It is going to increase it is a ramp function it is going to increase linearly right until value of what? What will be the maximum value of the stock? So, it is going to go up to 300 and after that what happens at time 20 onwards 20 to 30 again this falls to 0, but the stock remains unchanged. Stock does not fall to 0 stock continues at 300. You can assume time step of say 1 1 minute say assume time is in minutes. So, it is quite easy. So, every minute I am adding 20 units into the system right from here time 10, 11, 12, 13, 14. Time 11 I have added 20 units at time 12 I have added another 20 units. So, from here from time 10 to time 11 it goes from 100 to 120 then go to 140, 160, 180 to 200, 220 to 40, 260, 280, 300 right. So, every time step I am getting a the equal amount which is being put here is added here. So, this now coming back to the figure here. So, what happens is as the flow changes over time from say time t 1 to t 2 this area will be equal to this change. The change in the stock value will be equal to the area under the curve for the flow rates ok. This is kind of the change in stock is equal to area of the under the flow rate between the same time interval say t 1 to t 2. So, this is why we actually say that this stock has memory. The stock stay remains at the value of 300. So, that means it has a memory of all the past events that has occurred. It has accumulated it and now stores it at the value of 300. So, that is what we refer to as memory. And there is inertia unless the flow changes nothing influences stock, stock continues to remain the same. It does not leave it any time or it does not increase automatically it continues to remain there. So, that is what we indicate by the word inertia. Yesterday's lecture I talked about stocks are influenced by inertia and memory. So, this is what I meant. So, let us look at a more interesting example. Let us just quickly escalate it for the graphical integration. Let us look at a more example. So, same example earlier. Assume this is your net flow now. You have all rectangular pulse the net flow is now a ramp function it increases and it decreases linearly to time 30 at to 0 and then it goes to minus 2 then again comes back to 0 and then it remains 0 from time 50 to time 60. So, y axis goes from 0 1 and 2 0 minus 1 minus 2 that is the y axis and this is the input function given. So, how will the output stock look like? I am just going to mark the time units 10, 20, 30, 40, 50, 60. Assume the initial value of stock is 0. If it is not specified assume it is 0 ok. We will assume the initial value of stock is 0. Then what will happen to stock from time 0 to 10? So, the area under this is 20. So, it has to go to 20. So, since I already had 20 let me since I am not sure how the dynamics are going to go later let me just make intervals of 10, 20, 30, 40, 50. Let us see what happens. So, we expected to linearly increase to 20 that is the value of stock very same as the previous example right ok. Now, what happens? From time 10 to 20 what will happen to the value of stock? What will be the value of stock at time 20? 30. 30. What you do is you calculate the area under this curve half into base into height that is 10 units. So, you are already at time at not time. At time 10 you are already at value 20. So, 20 plus 10 you are at 30. So, you are going to reach 30, but how are you going to reach it? Which side is it going to be like this or is it going to be like this first one? So, simple reason the rate is increasing from time 10 to 11 from time 10 to 11 only small unit is added to your stock, but from time say 19 to 20 large quantity is added to the stock right. So, the amount added here the growth should be higher than the amount here. So, that can intuitively ask us to draw a curve like this. Anyway this is 30. So, it is not that accurate with this figure, but it is 30. So, what happens from 20 to 30? Increase or decrease? Stock will increase. The flow shows a decreasing rate, but still every time unit some positive quantity is added to the flow. So, as long as there is a positive quantity look at it it says net flow. Net flow means inflowment is outflow. So, if it is positive means it is being added to the stock. So, large quantity is added first and then at every time unit smaller and smaller units are added until it hits a total of 40 because area under the curve continues to remain the same at 10. So, now the curve goes like this. So, this is 30, this is 40, the y axis value is 30 and 40 sorry. Then what happens from 30 to 40? Now, net flow is negative that means, I am removing from the stock. Again what is happening here? I am removing less quantities and then I am removing large quantities. So, the shape will be I have two only options either this or this one. Yep comes like this and then again though the flow net flow is actually increasing, but it is still all negative values. Again I remove large quantities initially and then bring it back to these quantities. So, this values will be again back to 20 and then since there is no change in flows it continues to remain straight at 20. Calculate net flow. Given a net flow we can integrate it nicely, but when we have both inflows and outflows given separately like this figure, here the inflow starts at 10, it is constant to 10 until time 15 and then time 15 to 25 linearly decreases and 25 hits 0 and remains constant at 0 till time 30. Outflow starts at 20 then drops to 10 at time 10. Then from time 15 onwards it decreases at a constant rate until it hits minus 20 at time 30. Once you have the net flow we can always calculate the this one stock. So, we will learn how to calculate the net rate. Again x axis is time let us do 5, 10, 15, 20, 30, 35. What we want is net flow. So, from until time 10 anyway both inflow and outflow are constant. So, what should be value of net flow? What is the value of net flow? At every time instant you are taking the difference right. So, it will work out the same thing. So, inflow is 10, but outflow is 20. So, net flow becomes minus 10. Net flow is minus 10. So, this is your net flow to minus 10. It is just inflow minus outflow 10 minus 20 is 10. I am just taking subtraction. At this point both inflow and outflow are the same. So, that means net flow is 0. I am not neither adding nor subtracting. So, this has to jump back to 0, up to time 15 is 0. Now, it becomes tricky. I am having a linear decrease in both outflows as well as inflows. So, what should be the value? How does it increase? Now, you start worrying about areas. I have here because the same thing. So, you just go say one time step norm or rather up to time 20. At time 20 outflow is reduced by so much and inflow what is the area under inflow and the area under outflow we do the subtraction. Area under outflow from here to here is 25, half into 5 into 10 is 25. Area under inflow, inflow graph if you see you have a rectangle here and then a triangle here. So, from time 15 to 20 area under outflow is half into 5 into 10, 25 units area under inflow is half into 5 into 5 plus 5 into 5. So, you get 12.5 plus 25. So, inflow minus outflow adds about 12.5 units into a system because inflow is higher than outflow. You are following how we got it? So, this is the area under the curve of inflow and this area under the curve for outflow. So, time at this time point in time I am having it. So, another 12.5 units are added. So, the net flow then becomes 12.5 here and we are doing the math correct and the same slope comes here. So, I am going to get a line something like this here. And here there is no inflow, but outflow is negative. So, negative outflow means you are adding to the system. You know there is a negative outflow means you are just adding to the system further then you are removing from system. Here you are adding and here outflow is also positive. So, you are adding here and removing here. But when outflow become negative that means you are adding at two places you are adding here plus adding here. So, actually this slope becomes higher and here I am not adding anymore I am adding only here. So, I will get a flow like that. So, it kind of has a crazy pattern right there. But if you got the concept. So, what you are trying to do here is calculate the net flow first and then using the net flow computed because if net flow is constant then I know it is a linear increase in stock. If net flow is increasing then I know it is some sort of parabolic function whether it is and I get different shapes in the stock. So, once I get this I can get the other one. So, that is one more math involved that is area covered under this curve. So, that equals this. So, then what you essentially have is it increases up to 0.5. So, pretty much your net flow will go up to 0.5. So, this has to be at 0.5. You hear it? It is inflow and outflow net area is 12.5 correct. So, 12.5 means the time unit is fixed half into base and time unit is fixed. So, I have to multiply it by the height which will be then equal to 5 right, height equal to 5. So, that means, the time 5 is when it goes in area. So, then you calculate the other one. So, here the only thing is the slope will increase because this is also getting added and this also gets added because then and here then slope will be lesser than the previous level. It will linear function. So, this point is at 5. So, this also has to come at 5. 5 it is fine it is a linear function it will work out the same thing. So, it will change at 25. Let me get rid of this part. So, let us do our line here. So, let us keep it 5. So, it goes up to 5 here and then so, the slope should not change then it should go to 10 and then it will change to 20. Is it what we are getting? See this it was a linear example. So, it was easy. Suppose this net flow itself had an hyperbolic things then we need to kind of double check it, but for this case it will just work if we just take the differences and start plotting it. It should work yeah it should work. Now, let us do one more example. So, this example is kind of trivial given given your stock compute flow. So, this is called as graphical differentiation. Given a stock we cannot compute inflows and outflows separately. We can only compute net flows only net flow computable. We already know it for this trivial case. What will be the values here? How will it change? Time units goes from 0, 4, 8, 12, 16, 20 etcetera. So, 0 to 4 eventually increase has been 40 linearly. If it is a linear increase in stock then it must be a rectangular constant value for this. It has been increasing. So, it must be 4. So, it must be 10, up to time 4, 8, 12, 16, 20. So, up to 4 then it must be constant at 10. From time 4 to time 8 it reduces until it hits 0. That means this flow has to be negative. Let us take minus 10 then flow has to be constant at minus 10 then again there is an increase. So, it must be constant here up to 12 then again there is a decrease it is this 12 then again there is an increase and so on. All what we have is a kind of just a linear input to changes constant, but you can see the dynamics that is happening just by the input. Input is constant like the net flow is constant is always at 10 and then again it comes to false to minus 10 and again increases to less 10. And even with that simple inputs we can find that our stock keeps fluctuating in this fashion or the other way the stock fluctuates in linear fashion that all it tells us is the net flow is actually constant. So, this is an important the idea here is not this graphical integration difference common you guys can easily do it it is you are not here without trying to figure out what how to do differentiation integration and visualize it. The idea here is when we start looking at actual pictures and graphs many times you will be finding many such you know graph such keeps increasing and decreasing over time. The main thing to understand is it need not be because even the entire thing is changing even if things are constant and even if fluctuating at only two different end points still it can give a kind of a sawtooth kind of a behavior or a kind of hill kind of a casino sort of behavior can be seen just by keeping the values constant. So, those kind of intuition is what we need to tell you.