 Hi, welcome to this lecture of Biomathematics. We have been discussing various applications of vectors and as well as calculus in biology. How do we apply whatever we learn so far on vectors and some ideas and calculus that we learn? We can apply together and learn few things that is relevant to biology. So, that is our the current topic which is applications of calculus and vector algebra in biology. As we go along, we will be learning a few new things, but overall is generally application of whatever we learn so far. Now, last lecture, we discussed various things related to this. So, various things related to vectors and various things to related to calculus and this lecture, we will be discussing something about diffusion. So, diffusion is a process that is very common in biology. We know that proteins diffuse from one part of the cell to other part. Diffusion is throughout the cell or in any system that you even if in vitro things we take, we know that things will diffuse. So, diffusion is a very common phenomenon in biology as well as many other fields of science, but for biologists, it is important to understand many things about diffusion and it turns out that diffusion, the phenomenon of diffusion, if you think of mathematics as a language as we were discussing in the beginning, the phenomenon of diffusion can be expressed through an equation, a mathematical equation. So, whatever we see in diffusion, the process can be very precisely, quantitatively expressed through an equation and that equation is called diffusion equation. So, today we will learn about this diffusion equation and what is the logic behind this and where is it coming from? Why such an equation represents diffusion? This will also give you some insight about what exactly is diffusion. So, that is the aim of today's lecture to understand about diffusion and something that if we can learn from diffusion equation, something new, some new things that we can learn from diffusion equation that we probably did not know about diffusion so far. So, then you say diffusion, the first thing that comes to your mind is that if you put a drop of ink, for example, on the paper or if you put a drop of ink in water that will diffuse. We can see that because this ink has a color and then we can see it diffusing. So, diffuse and you know that the proteins diffuse and in general diffusion is basically a process where things flow from higher concentration to lower concentration. That is something that we many of you have probably if at all you know anything about diffusion, this is what probably you will know. What you all you might already know is that diffusion is a phenomenon where things flow from higher concentration to lower concentration. Whether you know this or not it does not matter for today's lecture. Even if you know nothing about diffusion, we will discuss from the beginning and go ahead and learn what diffusion equation is. So, I do not assume that you know anything about diffusion in this lecture. .. So, now let us go to the topic which is today's topic which is diffusion. So, what we learnt or what we know is that if you have something which is having. So, imagine that you have a container and if you put a drop of if you put some amount of protein molecules here, they will diffuse this way. So, they will flow at least this way because here there is higher concentration, here the concentration is 0. So, it will go from higher concentration to lower concentration. Even if there are like one or two molecules still, this will just keep flowing and they will keep flowing until the concentration is same everywhere. So, this phenomena, this phenomena, the phenomena that things will flow from higher concentration to lower concentration can be written mathematically through an equation J. So, J let us say J is the flow or the current, current I do not mean electrical, electrical current is just a flow, the current of the, as we say called flow a current. So, the flow or the current is can be is, this flow is actually proportional to. So, we can say that this flow is proportional to the change in concentration. If the concentration is, there is a change in concentration, then there is a current. So, del c by del x, if there is a change in concentration, so c is a concentration of, concentration of this protein or this ink molecule, this dot you could imagine, it could be either protein, it could be ink molecule or it could be anything that you take. And you know that this is a concentration and this concentration varies in space. That is, as we go along the x axis, if this is the x axis, this concentration is a function of x axis, x and this could be also function of time, because if you just wait, the concentration could change. So, concentration of the, concentration at this particular x will change with time. So, concentration of the function of space, position and time and the current or the flow of the molecule is proportional to the change in concentration. If there is a change in concentration, then there is a flow. So, this idea that it is proportional to change in concentration can be written, this is the mathematical way of writing that things will flow from higher concentration to lower concentration. This is the way of mathematically stating that things will go from higher concentration to lower concentration. So, you know what is this proportionality constant here? So, you have something proportional to here. So, have a look at here, something proportional here. So, I can write J is equal to something, some this, some constant into del c by del x. And we know that it will flow in the x direction. So, if you call this as x i, x direction. So, this will flow in the x direction. So, x cap, x cap means flowing in the x direction. Now, if you look at here again, the concentration is decreasing with respect to space. So, del c by del x is negative, because as the x increases, c decreases. So, del c by del x is negative. So, as of now, this part is negative. So, but that means it will flow in the negative x direction, but we do not want that we want to flow in the negative, positive x direction. So, you put a proportionality constant which is d and there is a minus sign. So, this is the mathematical form of the current as you can see here in this. So, see this slide here. The slide shows how this flows, this math, this can be represented mathematically. Del c, J d, that is the current due to diffusion is minus d times del c, where del is the gradient as we discussed before. So, the gradient del can be written as del by del x x cap. So, J d can be written as minus d del c by del x x cap. As we just said, since del c by del x is negative, because as x increases, del c decreases. The concentration decreases. As x increases, c decreases, del c is negative. So, del c by del x is negative and with this negatives and it is the whole thing is positive. So, that means the J, direction of J will be along the direction of x, that is along the direction of x cap. So, that is what this means. . Now, let us take some particular function for concentration, just for fun. Just for fun, so now let us take a simple example for c. So, let us imagine that c is a, so if you plot c is, let us imagine that c decreases in a particular manner. So, let us say c decreases in a linear manner. So, let us, this is c and this is x. So, this, the concentration decreases linearly. So, what does it mean? It means c is equal to minus x. So, that is, if you have a container having concentration, the concentration decreases as we go along the x axis and this decreases in a linear manner. If this is the case, let us have a look at here c is equal to minus x. So, del c by del x with the minus g minus is minus 1 and minus g del c by del x is, we know that d is a constant. So, the current is just a constant times the direction. So, this is a constant flow or a constant current. That means, if the concentration decreases linearly along x, so that is what if the concentration decreases linearly along x, the current, the, the, if you plot the j, j will be just a constant. That means, the, so this is j as a function of x. So, j here, here, here, everywhere. So, here, the flow here will be the same as the flow here, will be the same as the flow here, will be the same as the flow here. This is what it means. So, j will be a constant, then this constant will be d. So, if we assume that c is a linear function of x, is minus x is decreasing from linear function of x, then the j, the current, the flow is a constant. That means, the same flow everywhere, whatever the flow here, the same amount of flow here, same flow everywhere. This is what this means. So, let us see what the consequences are. If you look at the consequences, so what we have is j is equal to minus is equal to constant times x, and where d is a diffusion constant. So, some constant which is, which is important for diffusion, we will discuss what the d is in the coming lectures. So, but let us look at the consequence of this j d being a constant. So, let us discuss a bit about constant current. So, have a look at this slide, and here there, here there is larger concentration, here there is a small concentration, and I am looking at this particular area, which is in this particular position x, which is in this area. So, this area, this two lines are marking some area in this, in this container. Now, imagine that j is equal to d x. That means, the direction of the j is along the x axis, and the amount, the magnitude of the current or the flow, the magnitude of the flow is a constant, which is d. It is like a number, d could be 3, 4, 5, 8. So, what does it mean? That means, that if some amount of molecules comes into this area in one second, the same amount of molecules will go out of this area in the same second. That is what it means, whatever comes in goes out. So, if 3 molecules come in, 3 molecules will go out in one second. So, whatever comes into x will go out of the x. So, in one second, if 3 molecules comes in, in one second, 3 molecules will go out. So, that is, that is what it mean by constant flow, that constantly it is flowing. So, as far as, if you look at the concentration in this area, the area between these two lines that we are showing here, if you think about it, if something comes here and the same amount of things goes out, the concentration here will remain a constant. The concentration here will not change. If the concentration was 3 micro molar, to begin with, if something in comes in and same amount of taken out, the concentration here will remain 3 micro molar. In other words, the C at x for all time is equal to a constant. Whatever be the time, it will be a constant because same amount of particle is coming in and the same amount of molecule is going out. Same amount of molecule is coming in and same amount of molecules, molecules going out. So, this can be written mathematically as del C by del t equal to 0. That means, the derivative is 0. What does it mean? It means C is a constant. We learn that when you say derivative is 0, that function is, if your derivative of function is 0, that function is a constant. So, that this mean here, if del C by del t is 0, that only means that C is a constant. So, what we have is constant flow or a constant current. So, if the constant current or if we have a constant flow or a constant current, what we will have is the constant concentration at a particular place. If you look at any place in the container where there is a flow, the concentration there will remain a constant. So, this is a simple common sense that if same amount of things comes in and same amount of things go out, the concentration in that area will remain a constant. This is just common sense. So, now that we know, what is it imply? That implies that if you want to change the concentration in this place, if you want the concentration here to be changed, the J should change. So, that means, whatever should come in should not go out. Whatever comes in should not go out. So, the del by, so that means J should change along space. That means the J, the flow here should be different from the flow here. If the flow here is different from the flow here, let us say the flow here is more compared to the flow here. So, what does it mean? More things will come in and less thing will go out. So, then there will be a concentration here. There will be a concentration change here. If more things come in and less things go out, there will be a change in concentration here. In other words, if less thing come in and more thing go out, still the concentration here will change, the concentration will decrease. On the other hand, if more things come in and less things go out, the concentration here will increase. So, that much is clear. Now, how do we say this mathematically? How do we say that the current, the flow should change in space? So, let us have a look at the container again. So, let us say you have a pipe where things flow and if you look at this particular point and the flow here. So, there should be more flow here and less flow from here. That means J, if what we call the J should change along x. So, the derivative of J should be non-zero. Derivative of J should be non-zero. Now, we learn something called gradient. So, let us look at what we learn gradient. So, this is called, we call the del operator of the gradient. The gradient del is defined as x cap del by del x. So, this is something that in vector algebra, this is something that defines change in space, del by del x is a vector. And we have here J in this, have a look, here J is a vector. So, J is a vector del which is x cap del by del x is a vector. So, this is two vectors. So, I have a vector del and I have another vector J. And we want the derivative of J. So, the del should act on J. Now, if you have two vectors, we learn that there are only two ways of finding the product or we learned about two ways of finding the product. One is we call scalar product and the other one we call vector product. So, now, we have two vectors and let us see what is the product of this. So, do we want a scalar product or do we want a vector product? How do we know? So, let us think what we want. We what we want is that, we just said that if the current varies along space, if there is more flow in and less flow out, if the J, the flow varies along space, the concentration will change with respect to time. The concentration will keep changing. That means, we said that del C by del t is proportional to change in flow along x. So, we said that if there is change in flow along x, there is a del C by del t. So, del C by del t, C is a, C is concentration which is scalar. So, time derivative of a scalar is again a scalar. So, this is a scalar. So, whatever here the change in flow along x must also be a scalar, because you can only equate a scalar to a scalar. You cannot equate a scalar to a vector. So, since this is a scalar, this has to be a scalar. So, the scalar with del and J, the only scalar you can produce is the scalar product del dot J. So, del C by del t has to be proportional to del dot J. Now, what does this mean? Let us have a look at it. So, let us look at here. So, we can define something called del dot J, as we said and the del dot J is something called divergence. So, then in vector algebra, del dot J is called divergence. So, divergence of the function J is defined as del dot J. And this is del by del x, x cap dot J. And let us, let us imagine the J is some function, which is little j of x cap, where little j is some function. It could be x, x square, x cube, x power 4 minus x, minus x square, whatever be it. If this is j of x, del dot J can be written as del J by del x. So, this is the, how the flow varies along x axis, the change in flow, the change in current along x axis. Now, we said, we saw that, there has to be a change in flow. Now, and this is a four concentration to change. So, if we write this properly, what you essentially get is something called a continuity equation. That is del C by del t is minus del dot J. Del C by del t is minus del dot J is the continuity equation. What is essentially say, tells you is that, the concentration will change if the flow here is different from the flow here. If more things flow in and less things flow out, the concentration here will change. And the fact that, it is more things are flowing in and less things are flowing out is represented by del dot J. As we saw, del dot J is del J by del x. So, change in concentration, there has to be a del dot J. Del dot J cannot be 0. So, as we just saw, we saw that, we saw a few minutes ago, the del dot J is, can be written as del J by del x, where J is some current. So, let us imagine that, J is, let us imagine that, J is some particular. So, if we imagine such a tube again, let us imagine that, at this particular point, more things are flowing in and less things are flowing, less things are flowing out. That means, the flow here is more compared to the flow here. So, how do we plot this? So, we can plot J as again a linear function. So, if you want J of x versus x can be plotted like this. So, J, let us call J of x is equal to minus x. Let us say, J of x is minus x. So, del dot J is minus del x by del x is minus 1. This is minus 1. So, if we want, I can write this K x is some k is a slope. So, this will be minus k. So, there is a constant, there is a constant decrease del dot J. Now, if we look at this equation that we just wrote, the del c by del t is minus del dot J. And we found that, del dot J is minus j, del dot J is minus k. So, J is plus k. So, we found the del dot J, if J is minus k x, del dot J is del J by del x which is minus k and minus minus plus. So, what does it mean? Del c by del t is equal to k. So, it means c is equal to k d t integral. So, which means k t plus a constant. This means, the concentration will increase. So, what did we say? We say that, if more things flow in and less things flow out at this particular point x, we found that, the concentration at that particular point x increases. C of x is equal to k t plus c. That, this particular point x, the concentration increases with term some time. This is some constant c 0. So, this is what, essentially this, the equation that we learn means that, whatever we, if we decide the flow, we will tell you how the concentration changes in time. So, this is called the diffusion equation, sorry, this is called the continuity equation. It essentially says that, whatever things come in, few things, few molecules come in and only less molecules flow out. The remaining will stay there and that will change the concentration of the local, the local concentration, the concentration locally. That is what it all says. So, it essentially talks about the continuity of the flow. So, that is why it is called continuity equation. This is a very famous equation in fluid mechanics and any, any, any concept, anything that is related to flow, the blood flow or anything that things, anything flow related issue, we have to understand this particular equation. Now, let us go to the next step. So, now, we have this equation, continuity equation. Now, let us, we also had, we are also had the j is minus d del c by del x. This is something that we said in the beginning. That means, the flow is essentially the change in concentration. The j is, if there is no change in concentration, there is no flow. So, if there is a change in concentration, del c by del x, then there is a flow. If, if this is such a flow, the flow due to change in concentration, if j is given by minus del c by del x and if you substitute this here in this equation, we will get something called diffusion equation which is essentially this. Del c by del t is equal to d del square c by del x square. Del c by del t is d del square c by del x square. So, this is what, this equation is called diffusion equation. Let us, quickly check how we got this, how exactly we got this. So, we, what we had is that, we had a continuity equation which is essentially said that, del c by del t is minus del dot j. And we said that, del dot j is del j by del x, where j is the modulus of j. Whatever the magnitude of the j vector is, we call j, then this is del dot j. Now, this is, we also learn that, j is minus t del c by del x. That is, j is, if there is a change in concentration, then there is a flow. So, this implies that, the, what does this imply? This implies that, little j here, so there is an x cap here. So, little j here is d del c by del x with a minus sign. So, now, if you substitute this little j here, what we get is del c by del t is del dot j minus is minus plus del dot j, del dot j is del by del x of d del c by del x. So, this is d del square c by del x square, where d is a constant and this constant is called diffusion constant. We will discuss about this later, what is the significance of this, if etcetera we will discuss, but this is a constant that depends on the property of the, of the medium that things are flowing. It depends on the temperature, it depends on the viscosity and so on and so forth. So, we will see what d is later, but this immediately gives you this particular diffusion equation, which is called the diffusion equation. Del c by del t is d del square c by del x square. Now, that we know diffusion equation. So, diffusion equation is first derivative. So, this is also a differential equation. So, actually it is a partial differential equation, because this derivative is a partial derivatives. What does that mean? As we said, partial derivative means that the derivative, so concentration depends on x and time, position and time. So, the derivative here only depend on the time here and we are and here only depends on x. So, these are partial derivatives. So, del c by del t is d del square c by del x square. So, this is the diffusion equation. Now, what is this equation described? So, essentially we found that this is few, if you take the continuity equation, which is a comm, which is a common sense, which is saying that whatever things come in and minus whatever things go out will remain there, remain in this particular area, this is common sense. So, if you take this and take that the, if the, if there is a concentration change, that will lead to a current. So, these two ideas, if we combine them, immediately get this. I substitute for this j here, I immediately get this. So, this is called the diffusion equation. Now, what is this equation described? We saw that it describes the flow, the concentration dependent flow. There has to have a del c by del x for the flow to happen and flow itself should be depending on space, so that there is a diffusion, there is a, there is a concentration change in time. Now, let us, let us think afresh, let us think from the beginning a little, from the beginning, some, from a different angle, from a different perspective. Let us think about, what does this equation describe? So, this equation describes the following. So, think about a very long pipe. So, very long pipe, this goes to plus infinity and this goes to minus infinity. So, very long pipe. Now, in this pipe at time is equal to 0, I am putting a few drops of some molecules. It could be either ink molecules or it could be protein molecules, but a small amount of protein molecules I am putting here at this particular position x. So, at this only, at this particular point, you have protein molecules. So, if you plot the concentration as a function of space is only at x, there is concentration. No other, here all, the concentration of this is 0, but there is water here, there is water molecules everywhere, it is a pipe and this will go to infinity. Now, what happens after some time? So, this is t equal to 0. Now, if you look after 10 minutes or few minutes. So, let us say after 5 minutes, if you look at it, if you look after 5 minutes. So, you have this pipe here and this particular point x and what you would see is that, this would have diffused. So, you would see, still there will be lot of molecules here, but some of them would have diffused away. Most of it will be here, but some slowly would have diffused. So, the concentration would have decreased here, but concentration here increased. So, this is t equal to let us say 10 minutes. So, it diffused from up to this. So, if you look at a particular molecule, that molecule might have reached somewhere here or some other molecule might have reached somewhere here. So, the diffusion equation that we said tells you, how does the concentration changes with time? So, del c by del t, how does the concentration at any point x at any time t changes with time? So, if you look at the concentration here, it was 0 at t equal to 0, after 10 minutes it became non-zero. So, how does this concentration change? That is what this diffusion equation tells you. If you solve this diffusion equation, if you solve this diffusion equation, what you get is essentially c as a function of x and t. How does the concentration change with space and time? At any, if you ask at this particular position, what will be the concentration after 10 minutes? What will be the concentration after 20 minutes? What will be the concentration here after 30 minutes? What will be the concentration here after 40 minutes? We can ask this questions and this by solving this diffusion equation, we can get answer to this questions. This question, solve the solution of this equation tells you, what is the, what is the concentration at any point at any time? Now, we can ask knowing c of x of x of c comma x c of x comma t, we can ask another question, which is something may be interest to us. Let us say, if we put a drop of molecule protein, let us say you put a drop of ink or some protein, let us say actin or any other protein that you like. If you put certain amount of protein at this particular place, you can ask the question after 10 minutes, how far this would have diffused? That is also, that is also basically given by this solution of this equation. One should be able to calculate, how much this would have diffused on an average. So, if you do many, many experiments, things would have diffused and how much on an average, how long, how far this protein molecules would have diffused in let us say 10 minutes. If you wait 10 minutes on an average, how far they would have diffused. So, this is a question that can be asked from this particular equation. So, how do we, how do we know c of t? So, let us say we have this equation, which is diffusion equation and if we solve, we can get this c of x comma t. How do we know, what is the distance this m o things traveled? So, how far this should have traveled? So, we can calculate few quantities. So, we can calculate the average distance this would travel. We can calculate x square average and x average. The, this angular brackets means average. So, this is the average amount of distance the protein would have diffused. So, the, so if you, if you want to the r m s root mean square distance, we have to calculate x square average and find square root of this. So, what we want to understand is that how much, how far this would have. So, what is this? What is this x square average and what is x average? So, if you know that, if you want to calculate average of any quantity, you do not know how much average amount of protein in a, in a solution. You do not know at every point how much is the protein that is c of x. And if you multiply with x and integrate, we get average. So, x average has to be x c of x d x minus infinity to infinity. So, if we do this. So, at every point there is c of x is the concentration. And if we say that x is the special variable, x average is given by this particular integral. You can, you can see this is just like finding the average mark or average any quantity. We will describe, we will, we will discuss this more carefully, little more carefully, when we discuss statistics, average etcetera. But from the common sense, you know that average is nothing but this. And we can also calculate x square average in this particular way. So, if we find these two integrals and if we know c of x, we can calculate these integrals and get these two average values. So, for the moment, even if you do not understand, why this integral has this particular form? Why, sorry why this average has this particular form? Just keep in mind, just, just realize that this is true. Just understand that this is true. And when we discuss statistics, we will, we will show you clearly that x average is nothing but this and x square average is nothing but this. But for the moment, just believe me and then just know that x average is integral x c of x d x and x square average is integral x square c of x d x. So, we have to calculate this, that is all, we can, knowing c, we can calculate this. So, that is our aim. We can, we can know how far things would diffuse in a, in 10 minutes. That is something useful quantity. If you put a protein and wait for 10 minutes, we can know how, how far it would have diffused. This is when we did a useful, useful information, something that our mathematics, using mathematical techniques, we get calculate. So, we understood diffusion equation, we understood continuity equation and we use some ideas from vector and all that and calculus to learn about this. And we know that it can describe the phenomenon of diffusion. This mathematical equation can describe the phenomenon of diffusion. So, with this, we will stop today's lecture. So, let us summarize what we learnt. So, what we have learnt is that, we learnt something about divergence, which is del dot j, we said this divergence. We learnt about continuity equation. We learnt about diffusion equation. We learnt about this equation that del c by del t is d del square c by del x square is the diffusion equation and that describes the phenomenon of say, molecules diffusing along a pipe or any, any, any container. Any where, where you have a concentration difference, the things will diffuse and that is described as diffusion equation. And we also, average position, mean square position of any particle after a particular time can be calculated by some equation, which is x square average and x average square. Sorry, x square average and x average will tell you how much things would have moved. So, given, so this is, this is what we learnt in this, in this class and we will, we will learn more things about diffusion in the coming classes. We will also learn, when we learnt statistics and probability, etcetera, we will learn little more interesting things about diffusion equation in different contexts. But, for today's class, I want all of you to just understand what is diffusion equation and where is it coming from. It is coming from some common sense of continuity and that can give you information about how does the concentration vary in space and in time. So, with this, we will stop today's lecture here. Thank you.