 In the last lecture, we had introduced you with the ideas of divergence of a vector field. We had seen that the definition of divergence is given, divergence is also written as del dot v or dive v if you like. And we had seen that this is given by d v x by d x plus d v y by d y plus d v z by d z. This is the Cartesian expression for that. One of the things that we talked about is what is known as the divergence theorem which connects the surface integral of a vector field written as for instance if f is a vector field then f dot d s is the same as the volume integral of divergence of f over the volume which is described by this surface. Now, this is a theorem which has many applications in subjects such as fluid mechanics and as you will see in electricity magnetism which we are discussing as well. What I wish to do today is to take this concept of divergence a little further and make you more familiar with how to use the divergence theorem and what is the physical meaning of the word divergence. I would do that and subsequent to this I will also introduce to you what is known as curl of a vector field. As we can see that the divergence of a vector field is a scalar field because del dot is there. Del dot f is a scalar field. So, let us proceed with that. So, as the name divergence suggests the divergence of a vector field essentially is a measure of the amount of spread that a vector field has got at a particular point. Now, let us for instance if you could see these pictures you will find that in this case let us take the origin and you find that the fields are spreading out from the origin. On the other hand now this is the type of vector field that you would expect. For example, the electrostatic field due to a positive charge of course, it will not be exactly this but essentially it will be spreading out. This on the other hand you notice that the fields are converging to the center. So, these are the examples of positive and the negative divergence. Now, let us look at what it actually means. So, one of the things that I would like to point out is that the concept of divergence curl etcetera they all came because of because they were first used in the field of fluid dynamics. So, let me try to illustrate the concept of a vector field using fluid dynamics as example. So, let us look at an elemental volume. Let us look at an elemental volume at the point x, y, z having a length breadth and width dimension of d x, d y and d z. So, that is what we are doing and what we are saying is that at the point x, y, z the density of the fluid is given by rho x, y, z and the fluid velocity at that point is given by V of x, y, z. So, this is I am simply showing what happens to the y component of the velocity. For convenience I define a vector capital V at the point x, y, z as the velocity vector at that point small v x, y, z multiplied by the density rho at that point. And this sort of tells you that the this is essentially this quantity entering a elemental volume d x, d y, d z and here from the other phase it is leaving and this is just the y component of that coming in here and this is the y component at the point y plus d y. So, this is the y component is y here it is y plus d y. Now, let us let us look at this elemental volume and ask the question what is the mass of the fluid flowing in. Now, notice this this is the phase which the perpendicular to which is along the minus y direction or minus z y direction. And this is the phase for which the perpendicular is along the plus y direction, but the y coordinate of this is at y and the y coordinate of this phase is at y plus d y. So, how much fluid how much fluid is flowing in to this volume through this phase. Now, obviously, it is the we are talking about a mass. So, therefore, the rho times v y that is the distance moved per unit time along the this direction and of course, you multiply it with d x, d z which is the perpendicular phase there. And so, this is the amount of fluid that is flowing in through the phase n is equal to minus j. Namely capital v y which as I told you is a product of rho multiplied by small v y that is the velocity times d x, d z. Now, so that is the amount of fluid that is getting in and how much is the amount that is getting out. Now, the difference between this phase and this phase is that their areas are the same, but this has its y coordinate is y this has a y coordinate y plus d y. So, what we do is this that we assume that this element volume d x, d y, d z are small. So, that I need to only retain the first order change in quantities to calculate how much is the mass of the flowing that is flowing out. The amount of fluid that is flowing out is given by y component of the velocity here and what is the y component that is equal to the v y that is the velocity on this phase plus the rate of change of the velocity with distance namely d v y by d y times d y because that is the distance through which it has moved and of course, multiplied by the area. So, that is the amount of mass that is flowing out. Now, so therefore, if this is the mass that is flowing in and this is the mass that is flowing out the net amount of mass that is accumulating inside this mass namely the net increase in the mass of the fluid is this minus this which is simply minus d v y by d y into d x d y d z. You recall d x d y d z is the total volume of this element. Now, mind you this is just the increase this is just the increase only from the flow along the y direction. Now, what I am going to do now is to the bisymmetry I can write down an identical expression for the flow from the x direction and the y direction. So, since that term was minus d v y by d y. So, what I get is the result would be the net flow net increase in mass if you like there is a minus sign in front of that multiplied by d v x by d x plus d v y by d y plus d v z by d z multiplied by the volume which was d x d y d z and this is of course, your volume of the element which if you like I will not write it as d v. So, that you do not get confused with this velocity field v. So, this is let us say d tau. So, therefore, now there is another way in which I can talk about the rate of increase of mass. So, what I can do is this I know mass is nothing but the volume times the density. Now, obviously the volume here is fixed. Now, since volume is fixed the rate of change the rate of change of the mass is simply given by time rate of change of the density times d x d y d z and these two must be identical these two must be identical. This is one way of doing it and this is from the definition and that tells me that I have del dot v plus d rho by d t is equal to 0. Now, in fluid dynamics this is known as the equation of continuity. I have drawn some pictures. So, let us let us look at let us look at what are these. This will give you an appreciation for the name divergence as well, but let me return back to the equation of continuity. I have got del dot v plus d rho by d t is equal to 0 that is my equation of continuity. I am giving an illustration look at this picture. Now, this is the field this is the field which is written on the top. So, this field the left hand side field is given by x square y times i the unit vector along the x direction plus x y square times j. So, the field is let us say let us call the field as f this is equal to x square y times the unit vector i plus x y square times unit vector j. Now, this is the field that has been plotted in this graph and you remember that we had said that when this we have used mathematical to plot it that the way we plot it is that the vector the size of the arrows are proportional to the magnitudes of the vectors and the directions is represented by the direction of the arrows. Now, if I look at the first quadrant of this this is I am looking at this circular region this is a two dimensional plot. You notice that the let us suppose this represents a fluid field the velocity field of a fluid. So, this is so here you notice that if you call that these small arrows are the velocity vectors for the fluid you notice that the fluid velocities which are entering into this circle they are of smaller magnitude than those which are going out. In other words from this circular region more fluid is going out than it is coming in there is more out flow there is more out flow. Now, obviously such a thing can happen if the density is decreasing with time. So, if d rho by d t is negative then the divergence of the field del dot v will be positive and this represents a case of positive divergence. So, this is and the identical statement would be true if you look at the third quadrant as well I have not shown it here, but you can sort of check that if you draw a circle here this same identical argument would be true. Look on the other hand in the second quadrant here now in the second quadrant here or I have the picture is given on the fourth quadrant identical story would be true of the second quadrant. If you look at the fourth quadrant here you notice that the arrows which are pointing in into this circle are much bigger in magnitude than those which are going out. In other words that this is a case of net inflow more fluid is coming in than going out. Now, such a thing can happen if there is an increase in the density of the fluid with time. So, this is the field is diverging divergence is positive this field is divergence is negative. Let us look at a slightly different field for which d rho by d t is 0 it is an incompressible fluid. Now, if d rho by d t is 0 then del dot of v will also be 0. In other words the velocity field has 0 divergence look at this picture here you notice that if you take a circle circular region here as much fluid is getting in as is going out. Now, such a situation where the divergence of the field is 0 this for example, is a field which is x i minus y j which we had seen earlier. Such a field for which the divergence of the vector field is 0 is known as solenoidal vector field I have already introduced you with what we called as the divergence theorem. So, let us recall what is the divergence theorem the divergence theorem if you recall connects a surface integral with the volume of the surface volume of the body bounded by this surface. So, suppose I have a vector field which I represent by f then the surface integral of f f dot d s over whatever surface you are talking about. Now, remember we had said that so only some special types of surfaces are permitted or rather special type of surfaces like mobius strip are not permitted. And this f dot d s the direction of s is according to convention the outward normal and this is equal to the volume integral of the divergence of f. Now, what I am going to do is to illustrate the use of such a thing. So, here what I am doing is that I am trying to evaluate this is a cylinder with the base here x y and the height of the cylinder is along the z direction. And I want to integrate find the surface integral of the vector r r dot n d s n if you recall is along the outward normal to any element of surface. Now, first let me do it the easiest way the easier one is this to use the divergence theorem. So, in this case the vector field is my position vector r. Now, I am interested in finding out what is r dot d s over the surface of the cylinder that has been shown in this picture. So, let us look at this. So, in other words this surface integral is same as integral of divergence of the vector r over the volume of the cylinder. So, this is over volume of the cylinder. Incidentally, divergence of the position vector which keeps on coming in various applications is a good thing to remember and it is trivial to calculate. Because you recall that vector r is given by i x plus j y plus k z. So, therefore, del dot r which is d by d x of the x component of the vector namely x plus d by d y of the y component of the vector which is y. And similarly, d by d z of the z component of the vector which is z which is simply 1 plus 1 plus 1 which is equal to 3. So, divergence of r is 3 and so therefore, if I write it here this is over the volume of the cylinder 3 which is the number times d v and how much because there is nothing to integrate it is integral d v which is the volume and we all know what the volume of the cylinder is pi a is the radius a square times the height h. So, this is the result. So, the surface integral which we calculated in an indirect fashion namely calculating through the divergence works out to 3 pi a square h. Now, what I am going to do now is to show that this is exactly the result that you would get if you calculated the surface integral directly. So, let us do that. So, let us look at what. So, let me redraw this picture here this is x y z and I have a cylinder which whose base is at the origin think to know it is this that cylinder has 3 surfaces it is a closed cylinder because we have said it is over the surface of the cylinder closed cylinder. It has a top surface which is this this one and the outward normal to the top surface is just the unit vector k. It has a bottom surface which is because it is a outward normal. So, it is minus k we will come back to what happens to the side surfaces. But let us first compute how much is the contribution to the surface integral from the top and the bottom surface. First let us recall my field r is i x plus j y plus k z and I am interested let us say I am first calculating the top surface. So, top surface is integral of r dot k. Now, r dot k d s d s is an element of the surface. Now, so i dot k is 0 j dot k is 0 only I am left with k dot k. So, therefore, k dot k is 1 I am left with only z and of course, d s the element of the surface and it is only the top surface but notice that height of this cylinder is h and this is z equal to 0. So, the z value on the top cap of the cylinder is fixed and is equal to h. So, this is nothing but h times d s on the top surface h is constant. So, it comes out. So, I am left with simply the area of the top surface which is pi a square. Now, the calculation of the lower one is equally straight forward. So, let us look at the bottom surface. The only difference now is the unit vector outward normal is along minus k. So, this will not be z d s but will be minus z d s. So, let us write down integral bottom surface of z d s. Now, this is actually even simpler because the value of z for this surface the lower surface is 0 z is equal to 0 for bottom surface. So, therefore, this integral is 0. So, from the top and the bottom from top and the bottom the surface integral gives me pi a square h. I will now calculate this for the curved surface which is the only surface remaining now. What I have to do now is this? I have to find out what is the unit vector what is the unit vector on the curved surface. So, this will be some something like this. Now, let us see what it is. So, notice that this is parallel to the x y plane. A perpendicular to the curved surface is parallel to the x y plane and it is on the surface of the cylinder. So, therefore, the unit vector n is nothing but i x plus j y which is just the radial vector in the x y plane. But I have to find a unit vector. So, therefore, I have to divide it by square root of x square plus y square where x and y are on the self curved surface of the cylinder. But remember that if the radius of the cylinder is a, the square root of x square plus y square is nothing but the radius a itself because it has to be on that circle. So, this is i x plus j y divided by a x and y are arbitrary, but because it is on the curved surface this relationship is there. So, now let us compute f dot n f is i x plus j y plus k z dotted with i x plus j y divided by a. So, let us look at what it gives me. So, x into x i dot i is 1 x into x i get x square j dot j is 1 i get y square k dot i and j are both 0. So, therefore, this is x square plus y square by a which is nothing but a square divided by a. So, which is equal to a itself. So, what do I have? I have here I have to calculate r dot n d s and r dot n is a times integral of d s. Now, how much is the area of the curved surface? The area of the curved surface of height h is nothing but the circumference of any of these circles multiplied by the height h which is 2 pi a times the height which gives me 2 pi a square h. If you recall from the top and the bottom surface we had pi a square h from the curved surface I had 2 pi a square h. So, the net result I get 3 pi a square h which is the result I had obtained from the divergence theorem. So, divergence theorem makes it easy to compute certain surface integrals that is one of the major applications of the divergence theorem. As a further example let me let me show you a rather nasty looking field as you can see it the field f is i times 2 x plus z to the power 5 j times y square minus sin square k z k times x z plus y cube e to the power minus x square. And I want surface integral over a cubical box of you know 1 by 1 by 1 cubical box x from 0 to 1 y from 0 to 1 and z from 0 to 1. Now, you realize that if I am trying to attempt the to calculate this directly it is going to be a mass because I have to I have to worry about how to integrate many of these things. However, this situation is not as bad as it looks the reason is the following that if you look at what is the divergence of this vector remember the divergence is d f x only x derivative of the x component plus d f y by d y plus d f z by d z. Now, x component notice the z to the power 5 which was somewhat nasty it has its derivative with respect to x is 0. So, therefore, my derivative is simply 2 y component again the sin square x z d by d y is 0. So, therefore, I need only d by d y of y square which is 2 y and finally, d by d z of f z again this is a function of x and y. So, therefore, x z has to be differentiated with respect to z and I simply get x. So, it is 2 plus 2 y plus x. Now, I need to integrate this, but fortunately over the volume of the cylinder. So, I need to calculate if you like I will write it explicitly as triple integral d x d y d z of 2 plus 2 y plus x thing to notice in this integral is there is no z dependence. Now, since there is no z dependence I can integrate z out from 0 to 1 it simply gives me 1. So, therefore, I am left with a double integral d x d y of 2 plus 2 y plus x one of them is rather simple to work out first. So, this is all are from 0 to 1 first this 2. So, 2 times integral d x d y. So, it is 2 into 1 into 1 that is 2 plus 2 times. Now, integral d x over 0 to 1 since there is no x dependence gives me 1 and I have got y square by 2 which is 0 to 1 is 1 by 2 plus this has only x. So, y integral is done which is which gives me 1 into x square by 2 which when. So, x square by 2 from 0 to 1 is 1 by 2. So, what I what do I get I gets 2 plus 1 plus a half which is 7 by 2. So, this is the result of this surface integral. Now, because the function is so nasty I will not be attempting direct evaluation on the surface. . So, much about divergence for vector fields. So, divergence of a vector field is a scalar. So, it is a scalar field. Now, for a vector field it is possible to have an operation which results in another vector field and this is called the curl of a vector the curl of a vector came from the word circulation. Now, we will see as the name suggests the meaning of the curl is associated with how much a vector field is curling about that point. So, let us. So, what I have done here is to draw a picture of a this is an open surface. Now, something like an inverted pot and this open surface has a circular boundary. So, this is this is the boundary. Now, let us look at how does one calculate the surface integral of a vector field over this surface. Now, let me let me illustrate that problem a little bit. So, I have this surface this is an open I have given it a sense of direction the. Now, if I make segments of the surface. So, what I do is this just draw these segments as has been shown there make elements of segments. Now, let me try to calculate let me try to calculate the surface integral over for instance the area bounded by this. Now, let us look at first in instead of going to the area which I am coming to in a second but let me concentrate on this element of area and let me give it a direction. So, the direction that I will give is this that is an anticlockwise direction and the surface corresponding to this has an outward normal. So, I will call this element as supposing this is the ith segment. Let me call it n times d s i and this curve which is the boundary of this d s i I will call it d c i. Now, the thing that I want you to notice is this if I go in each of these segments if I take the line integral in the same sense all the time in this case I am taking it in the anticlockwise fashion. Then you notice from an adjacent from an adjacent circuit or curve the my result will be something like this this will go like this this will go like this and this will be exactly the opposite direction to the previous one. Let me illustrate this by making amplifying these elements supposing the same two adjacent elements I am amplifying these are two adjacent elements. So, this is my d s 1 let us say this is d s 2 and I am going on this the upper one in an anticlockwise fashion the line integral will be over this over this and over that. Now, when I come to number 2 and I still go in the anticlockwise fashion just to make it clear let me give this arrows in a slightly different manner supposing this is the anticlockwise arrow. You notice that this common line for the top one is traversed this way for the bottom one is traversed in the exactly opposite direction. So, if I am to now add up supposing I want to find out how much is the surface integral over this plus that what remains are only the contribution from the outside boundaries only the contribution from the outside boundaries and this will happen that supposing I am now add up add another one it will be like this you notice again this has cancelled just as this has cancelled. So, what will I be left with? So, if I split up this into such elemental curves on the surface then I will be left with only the outside boundary which is nothing but this edge of this object this is made clear in the next picture. So, you notice here that I have shown a little stretched out thing and everywhere I have gone in the same sense the anticlockwise fashion. So, if you look at this one and that one the common areas cancel out and you will be always left with the only the outside things. So, therefore, the I can write down that the net contribution from this. So, let me let me write it down clearly is supposing I am talking about the entire curve f dot d l over all these little close curves that I showed you then this can be written as sum over i which is summing over all those little curves and this integral is to be taken over the i th curve of f dot d l what I do is this now this quantity here this quantity here is different for different curves. Let me divide this by the area of the surface enclosed by the i th curve and multiply this with the same number now what is this quantity. So, this quantity which I have written as c i f dot d l over the i th closed curve divided by delta s i now. So, this is the line integral of the boundary of of the i th surface and the area of that i th enclosed by i th curve is delta s i and the direction associated with this area is the outward normal that I will call as n i this quantity is defined as the curl of the vector f at that point i curl of the vector f at the point i it is a point relationship because this relationship is true only in the limit only in the limit delta s i going to 0. So, if I take the limit of this delta s i going to 0. So, this is a point relationship at the point i now this definition just as when we define divergence we obtained a relationship between the surface integral of a vector field with the volume integral of the divergence of that vector field. This definition of the curl in a very similar way gives me or gives us a relationship between line integral of a vector field with the surface integral of the curl of the vector and this relationship is known as the Stokes theorem. Let us look at how does this curve. So, remember the line integral of this curve now this is the curve bounding the surface the in the picture of the inverted part that I showed you it was the rim the circular rim that I had shown you. So, this integral is nothing but sum over the integrals the line integrals of little constituents on the surface. So, sum over i integral over c i now what I do is divided by delta c i multiplied by delta c i and suppose I take its limit that is making this circuits smaller and smaller then since this quantity is defined to be the curl of the vector I get integral f dot d l is nothing but the surface integral of the curl of the vector and that is called Stokes theorem is an extremely important theorem that. So, what is this c you take a surface you take an open surface is very important to realize it is an open surface not a closed surface like that part that I showed you. So, line integral of the boundary of the open surface on the boundary of the open surface. So, for example, going back to that picture if I am interested in surface integral over this surface I am relating it only to the line integral on this boundary. So, f dot d l is equal to it is the surface that is bounded by this curve and the curl of that I have to take. So, curl of f dotted with d s over the surface which is described by this is called Stokes theorem what I will do next time would be to obtain an expression for the curl in the Cartesian coordinate system and this will be this is the essentially will be following the same technique as we followed for obtaining an expression for the divergence. . To summarize what we have done today is to look at two things we started with an interpretation of the divergence of a vector field I repeat the divergence of a vector field is a scalar field and divergence as the name suggests is a measure of it is a point relationship it is a measure of how much the vector field is diverging or of course, it could be converging at that point. This will be extremely important when we look at the electrostatic phenomena and look at for example, the electrostatic field due to positive charges or negative charges will be returning back to the divergence of a vector field. The divergence of a vector field gives us a handle for computing surface integral of a vector in terms of the volume integral of the divergence the next thing that we did which we will take up in greater detail in the next lecture is to define the curl of a vector field the curl of a vector field is itself another vector field as we will see next time the curl gives an in gives is a measure if you like of how much a vector is curling around as the name suggests at a given point. What we have done is similar to the divergence theorem we have obtained a theorem which relates the line integral of a vector field with the surface integral of the curl of the vector field and in the next lecture when I have a mathematical expression for the curl of the vector field we will also give a few examples of the application of Stokes theorem.