 In the last lecture, we had introduced the concept of a potential and talked about potential in a few cases. Today, what we want to do is to discuss the relationship of the potential with the potential energy. In general, we want to talk about how to calculate the electrostatic potential energy of a system of charges. . So, let us review a few things which we started last time and one of the things that we talked about last time, but could not complete was determining electrostatic boundary conditions. What happens is that at the interface between two media, for instance supposing one medium is air or vacuum and the other medium is a charged body, you find there are certain conditions to be satisfied at the interface between two media and these are known as boundary conditions. Till now, we have been doing electrostatics, so what I will be concentrating today with respect to the boundary conditions which will be elaborated more as we go along will be the electrostatic boundary conditions. . So, let me begin with assuming that I have a charged sheet and infinite sheet for convenience I take and there is a charge density sigma on this surface. So, it is an ideal surface in the sense that there is no thickness and the I know that if the charge density is positive, then the electric field above electric field sort of moves goes away from the direction of the charge. So, as a result in this example, it is upward above the sheet and it is downward below the sheet. Now, to look at what boundary conditions we must satisfy, what we do is the following, we take a Gaussian .pill box as it is called or just a rectangular parallel pipe of an infinitesimally small width epsilon and make it intersect. So, that half of this lies above the sheet and the other half lies below the sheet. Now, what we want to do is we want we know already according to Gauss's law that the flux out of any surface real or imaginary is equal to the amount of charge that is enclosed divided by epsilon 0. Now, in this case let us assume that the area of the top surface is A and as a result I if I want to calculate the total flux through this the surfaces of the rectangular parallel pipe. You notice that the I will take the epsilon going to 0 and as a result what I get is how much is the q enclosed, the q enclosed because I have said that the area of the top surface or bottom surface is A and this sheet is without any thickness and the charge density is sigma. So, this tells me that the amount of charge that is enclosed by such an intersecting parallel pipe is just sigma times A. So, integral E dot d s is sigma times A and let us look at how to calculate this flux. So, notice that as epsilon becomes smaller and smaller the since the area of all surfaces other than the top and the bottom becomes infinitesimally small the there is hardly any contribution to the flux from these surfaces and by definition our direction of the normal is perpendicular to the outward perpendicular to the surface. So, that they are oppositely directed on the top and the bottom surface. So, as a result the contribution to the flux from the top surface is the normal component of the electric field multiplied with this area A normal component because I have to find E dot n d s. So, as a result what happens is that from the two surfaces because the direction of the top surface is opposite to the direction of the bottom surface the normals are oppositely directed. So, I get E perpendicular above times the area A minus E perpendicular below times the area A is equal to sigma A by epsilon 0 which means that E perpendicular above minus E perpendicular below is equal to sigma by epsilon 0. What it implies is this that if there is a charged surface if there is a charged surface then there is a discontinuity of the electric field the normal component of the electric field as you cross a charged surface. The difference between the normal component of the electric field above a surface and that below a surface is given by the charge density of on that surface divided by epsilon 0. So, the normal component of the electric field is discontinuous. Now, notice this is all about the normal component. Now, what happens to the tangential component that is the component which is parallel to the surface. So, once again I start with the same surface infinite sheet with a charge density sigma and I am interested in looking at what happens to the normal to the surface. Now, this time what I do is this I in I have a rectangle the previous case was a rectangular parallelepied, but this is just a rectangle and this rectangle is of width epsilon and which is again taken to be small and length l and I make it half above the charge surface and half below. Now, I know that the because the electric field is conservative the line integral of the electric field which is E dot d l over any closed path is equal to 0. Now, so if I look at this rectangle and I take a line integral of the closed path because by definition the direction along which you traverse is tangential to any curve. So, as a result E dot d l contribution from these two surfaces will be along the tangential direction and there will be no contribution from the two short sides because epsilon is going to 0 and here you notice that I am traversing in one direction here and the other direction there. So, as a result E dot d l is E parallel above minus E parallel below times the length l which must be equal to 0. As a result the E parallel above is equal to the E parallel below. So, this what I notice is that though the normal component of the electric field has a discontinuity across a charge surface that tangential component does not have a discontinuity. In other words the tangential component is continuous. So, these are two boundary conditions that have to be satisfied at the interface between two media where there is a charge sheet between on the interface. So, these were about the boundary conditions. So, let me now go back to a calculation of the potential energy. You might recall we had said that there is a connection between the potential and the potential energy. We had seen that if there is a charge which is located in an electric field then the electric field of course, is created by another collection of charges. Then this system has a potential energy and the there is a term which is or in that potential energy there is a contribution because of this charge which is located at let us say the point r. So, this potential energy associated with our test charge if our test charge is taken to be a unit charge is what is the potential at that point. So, this is the relationship between the potential and the potential energy. Let us look at it a little more quantitatively. To do that I would take a collection of charges to begin with I will take the collection of discrete charges and suppose I bring in charges such that my final configuration is that the charge q 1 is at the position r 1, a charge q 2 is at the position r 2 etcetera. How do I calculate? How do I calculate the potential energy of such a configuration? Now, so I will give you a prescription of what to do? We assume that initially all the charges are at infinity. Now, we have seen that it is good to take the reference point of potential energy to be 0 at infinite distances because forces the Coulomb forces vanishes at infinite distances only being a long range force. So, initially all my charges will be assumed to be at infinity and infinitely separated. Let me now do the following. Supposing now because all charges are at infinity there is no electric field in the finite region of space. So, what I do now is bring in a charge q 1 from infinity to and put it in its own location which is r 1. Now, when I do that when I do that no work is done because this charge is not subject to any electric field because it is the first charge being brought in from infinity and there is no field existing there at all. The situation changes when I bring in a second charge. So, suppose I brought in a first charge which is at the position r 1 and now I want to bring in a second charge. Now, this second charge this second charge will be placed here that is with respect to an arbitrary origin the first charge is at r 1 this will be placed there. So, let us look at put that in. Now, notice that this second charge that we have brought in experiences a field because already the first charge is in its place. So, what I need is I have to do some work because there is an electric field due to the first charge and this will exert a force on the charge the second charge that I am bringing in as it comes from infinity to its location. And in order to take care of or work the in order to make sure that the charge comes and is located at the point r 2 we meaning the external agency have to do work to compensate overcome this force. And I already know the charge I already know the electric field because the electric field is due to the charge q 1. So, therefore the electric field at this position which is r 2 is 1 over 4 pi epsilon 0 q 1 divided by the r 2 minus r 1 and directed of course, along the line joining then. So, the work that needs to be done is to 1 over 4 pi epsilon 0 q 1 by r 2 minus r 1 times the charge q 2. Now, this work that you have done obviously will now become the potential energy of the system of two charges. Now, let us bring in a third charge let us bring in a third charge. Now, so this third charge is brought into a position r 3 this is being brought into a position r 3, but now this charge experience as an electric field due to the presence of both the first charge and the second charge and the since it is at r 3. So, when q 3 moves to r 3 the work done is q 3 times electric field due to q 1 as well as q 2 this what is written here. Now, I can go on like this a fourth charge a fifth charge and things like that. So, so what have we actually seen what we have seen is that the amount of work that is done is equal to the amount of work that is done. Suppose we are looking at we are looking at the work done in assembling n number of charges. So, this work done is 1 over 4 pi epsilon 0. Now, let us look at how much work is done in bringing let us say j th charge when all other charges are already there. So, let me talk about the presence of charge as sum over i. So, I have q i by r i minus r j vector times q j. Now, this is the amount of work that I will be doing if I bring in the j th charge and locate it at the position r j when a system of charges are in their respective place. Now, so it follows that that in order to get the total work done I must sum over j. So, that each charge j is in the field of each every other charge, but notice in this sum there are some restrictions. The restriction is because r i cannot be equal to r j because a particle does not exert a force on itself. So, let me let me write that i is not equal to j. There is another factor that I have to worry about in this way of writing the sum I have done a double counting because I am counting i and j because there is a double sum. So, each term is counted twice. It is not true that there is a separate term for interaction between i and j and that between j and i. So, to avoid this double counting I need to put in a factor of half in this sum as well. So, this is the factor to avoid double counting, but now you notice that this quantity is equal to half sum over i q i. Now, let me write this 1 over 4 pi epsilon 0 there sum over j not equal to i q j divided by r i minus r j, but this term here is nothing but the potential seen by the charge q q i at the position i due to all other charges which are located at the position j. So, therefore, this can be written as sum over i q i times phi the potential at the position r i. So, this is an expression for the potential energy of a discrete charge distribution. Now, what happens if I have a continuous charge distribution. So, for the discrete case let me write it down again for the discrete case the work done is half sum over i q i potential at the position r i. Now, if I it is easy to transform this it is easy to transform this to the case of continuous charge distribution. For a continuous charge distribution this sum over i will go over I will take a volume and locate a small volume element at the position r and the charge in that will be rho times the volume element charge density times the volume element. So, as a result the natural extension of this expression is integral d cube r over the volume rho r. So, this is the volume the charge that is contained in that volume element and of course, the potential at the position r. So, this expression is one of the standard expressions for calculation of the electrostatic energy of a continuous system. Now, let me let me do some algebra. So, firstly I you recall that according to Gauss's law divergence of the electric field E is rho by epsilon 0. This tells me that this rho there I can write as epsilon 0 times divergence of E. So, therefore let us put that epsilon 0 by 2 integral d cube r del dot E times phi of r, but recall that E itself is minus gradient of phi. So, as a result I get minus epsilon 0 by 2 d cube r. So, del dot of E gives me del square of phi times phi well there are all these dependences there. Now, I do a little bit of arithmetic with this and what I will do is this that I will look at this expression and notice the following that del dot phi times del phi. So, divergence of a scalar times a vector is phi times del square phi. So, the scalar times divergence of whatever vector is there del dot del is del square plus gradient phi dot the second term which happens to be also gradient phi. So, it is gradient phi dotted with gradient phi. So, I use this expression I use this expression to simplify this term there. So, let us rewrite it. So, W is equal to minus epsilon 0 by 2 integral d cube r del square phi phi of r and this is then by using this identity what you have written down is given by there are two terms now. So, come back here. So, del square phi times del square phi which is what I have here is del dot phi del phi minus del phi dot del phi. So, therefore, this term becomes equal to there is a I will take the minus sign first. So, that this is integral d cube r grad phi dot grad phi minus del dot of phi grad phi. Now, notice this term. So, now this is this is over this is the work done in assembling a continuous charge distribution. So, therefore, the this volume over which this integral is taken is the volume of whatever system that you have. For example, this could be your volume v, but notice something interesting I need not confine myself to this volume v. I could as well take any imaginary volume for instance this one. The reason why I could do that is because if you look at this expression here number 1 you notice that it is a product of rho with the potential. And if I take the region to be expanded like this in the intervening region there is no charge density charge density is 0. So, the contribution to the volume integral will become 0. Now, if I take the volume over which I do this integration to be infinite volume even then there would be actually contribution coming to that equation 1 which I showed you just now from the physical volume because rho is 0 in the other case anyway. Now, however, if I do that then the this term which is del dot. So, this is d cube bar del dot phi del phi which by divergence theorem gives me phi grad phi dotted with d s. In this I need to calculate I need to plug in the potential or its derivative namely the electric field only on the surface. If I take the surfaces going to infinity then of course, this term goes to 0. So, therefore, I need to concentrate only on this term. And since minus gradient of phi is the electric field this expression gives me epsilon 0 by 2 over all space modulus e square d cube r. And you notice this is an integral over positive terms only. So, therefore, this quantity is by definition positive this is the point which we will need to make comments on as we go along. Let me make a quick comment here and I will come back to this issue a little later. The energy could be both positive and negative for example, supposing I am putting one charge at one position and it is an opposite charge in another position the potential energy is negative. But this being a an integral over square of the electric field it is always positive. Now, the problem has its resolution which will be talking about little later is because when we took the point charge we assumed that no work was done in making a point charge in other words point charge was given to me. And as a result what I am actually doing is not calculating the total energy in case of the charge distribution, but only the interaction energy between the charges. So, in discrete case the work that is done to make a charge is not included. Now, we can actually calculate how much it is because we have just now seen the work done is epsilon 0 by 2 mod by absolute e square d v. And now let us let me assume that I am talking about a to create a point charge. So, this quantity then is e square. So, it is q square by r to the power 4th and r square d r. So, you notice this that this one this expression this expression blows up at the lower limit. So, in other words the there is an infinite contribution to the energy and this is normally referred to as the self energy. And when we calculated the energy of a collection of point charges we never included this self energy. The calculation that we have done now we have not yet actually done a physical calculation, but this expression and the corresponding discrete expressions differ by an infinite amount. And this is what is known as a divergence problem in physics. We will not be making much of a comments on it, but we will make a few comments as we go along with our calculations. Now, let me let me now give illustrate the calculation of the total energy of the charge distribution taking a very specific example. And I will do this calculation of the electrostatic energy by 4 different methods. The problem that I have taken simple problem is let me calculate the energy of a uniformly charged solid sphere. In the last lecture we had worked out the potential due to the charge sphere. So, let me recall it for you again. So, phi of r is 1 over 4 pi epsilon 0 q by r for r greater than the radius of the sphere. And we had obtained an expression like q by 8 pi epsilon 0 r into 3 minus r square by r square for r less than r. In my method 1, I want to start with the calculation of the energy by my first x definition, which was this is integral over the volume of rho phi d cube r. Of course, I know what is rho since it is a uniformly charged thing. It is simply q divided by 4 pi by 3 r cube. So, uniform charge. So, charge q is uniformly distributed. Now, the charge density outside even if you have taken a bigger volume is 0. So, this in this method the contribution to the integral does not come from the whole space, but comes from the physical space. And so therefore, it is only from the potential expression that I have to take should be the second expression here. So, if I plug it in. So, I am since rho is constant it will come out and I am left with 3 q over 8 pi r cube integral. Now, only my integration is from 0 to r. The expression for phi there which is q by 8 pi epsilon 0 r and 3 minus r square by r square d cube r. Of course, this integral does not have any angle dependence. So, as a result I get 4 pi from the angle. So, which I must plug in here and then my integral is simply over r square d r. Now, this integral is very straight forward to work out. So, I can plug in here is 3 q square. I had 8 pi into 8 pi that is 64 pi square there 4 pi goes. So, that is 16 pi epsilon 0 and of course, I have got a r cube and r. So, it is r to the power 4 and I am simply integrating from 0 to r 3 minus r square by r square r square d r. Very trivial integration to do and you can plug it in very easily and get a result 3 q square over 20 pi epsilon 0 r. So, this is the energy of a collection of charges which give me a uniform distribution of charge in a sphere. Now, let us proceed with this. This time I will use the expression that we derived at the end that is my method 2 which is work is epsilon 0 by 2 integral absolute E square d q r and I told you that because the surface term was thrown out I had taken the range of integration to be infinite. So, therefore, this integration is over all space not just the physical space. If you wanted to confine to physical space which we will do later we will have to keep the surface term as well. Because the surface term was thrown out by taking the integration to infinite volume and of course, we found that that is perfectly legitimate because the charge density accepting in the physical volume was 0. Now, so in other words I need the expression for the electric field. Now, this we know was trivially calculated by Gauss's law. The electric field expression for r greater than r was as if the entire charge was concentrated at the center of the sphere. So, it is vector r by or unit vector r by r square coulomb's law and that is for r greater than r for r less than r because only small r cube by capital r cube amount of charge is enclosed. So, the field is linear and this was 4 pi epsilon 0 and this was vector r by r cube and that is for r less than r. So, I need to take both these contribution. So, within the sphere I have this expression outside the sphere I have that expression and so I get epsilon 0 by 2 once again all these expressions do not have any angle dependence. So, my volume integral always gives me a factor of 4 pi integral e square. So, let me take that that is q square over 16 pi square epsilon square r dot r is r square by r to the power 6 and of course, r square d r which comes from the volume element and this integral is from 0 to r. The second integral is 4 pi r to infinity once again this q square by 16 pi square epsilon square and this time it is 1 over r to the power 4 and r square d r. Once again these integrals are fairly straight forward to do because this is just an r fourth integral which gives me r to the power 5 by 5. This is 1 over r square which gives me 1 over r on integration and infinite limit will go away because 1 over r goes to 0 and only this term will be there. You can add it up and find out that the result is same as before namely 3 q square by 20 pi epsilon 0 r. Let us look at a third alternative. The third alternative that we talk about is to include the surface term that is do not take the range of integration to infinity. Just confine yourself to the original expression if you recall this is half d q r rho r phi r and we had changed this. We had changed this to get an expression of this type that epsilon 0 by 2 phi r e dot n d s this was the surface term which we had thrown out and of course, the volume term which is this. Now, what is the difference between this expression and the expression that we worked out just now? Here the surface is the physical surface which is the bounding surface of the physical volume. So, in this case I have to take the surface and the volume to be the physical volume and once again I need both the expression both potential at r and I only need I only need for r less than r and this we had seen is given by q by 8 pi epsilon 0 r times 3 minus r square by r square. This we had used a little while back and the electric field which we also use just now is given by q by 4 pi epsilon 0 r and this was vector r by r cube. So, let us look at how does it go? My work done has two terms one is epsilon 0 by 2 integral over the surface this time my physical surface phi of r vector e dotted with n d s and plus epsilon 0 by 2 integral e square d cube r over the physical volume. Now, notice that in this expression in this expression I need the values of quantities on the surface and the electric field is directed along the normal because I was fear. So, as a result this term is epsilon 0 by 2 phi on the surface magnitude of electric field on the surface times the surface area which is 4 pi r square plus epsilon 0 by 2 and this is the integral only of this part. So, the integral over the volume of q square by 16 pi square epsilon 0 square and r dot r which is r square by r to the power 6 and of course, 4 pi times r square d r. Once again this integral is straight forward which we have done sometime back and here phi of r you notice if you put r is equal to r this is simply 2 cube by 8 pi epsilon 0 r and e of r is of course, cube by 8 pi epsilon 0 1 over r square capital R square. So, you can plug these numbers in and once again show that this is equal to 3 cube square by 20 pi epsilon 0 r. So, this is the third method of doing it the difference between the first second and the third method is that in the third method we confine our integrations both over the volume and over surface of the physical sphere. Whereas, in the previous method we had conceptually or we had imagined that let us take the integral over all space and in that case the surface term vanished, but there was a cost and the cost was that the volume integral has to be done by taking the electric field all over the space. Thus still a final way of doing this and this is a little interesting way of doing it that let us do it from the first principle. Let us do it from the first principle and what is first principle? The first principle is I have a sphere which is being built up gradually that is I bring an amount of charge a d q from infinite distance and I bring spread this charge over uniformly over a sphere that has already been created. Suppose, at a given instant of time I have already a sphere of radius let us say small r it has been created by the same process as I am going to describe now. Now, what I do is this is this is a sphere of radius small r. Now, I bring in charge small amount of charge d q from infinite distance and spread over this sphere uniformly thereby making a second sphere a sphere or thereby increasing the radius of the sphere by an amount d r and the charge on that sphere by an amount d q. So, this is what we do. So, there is this charge which is at infinite distance and it is going to come there and once it has come there I am going to spread it over this by increasing by an amount d r. So, the question is this how much work was done in bringing this charge d q from infinite distance and spreading over the already existing sphere. So, you notice that I had a sphere which already had which had a radius small r as a result it already had a charge which is q of r and I know that since the total final charge will be capital Q the amount of charge q r q as a function of r is q small r q by capital R q. What is delta q? What is d q? d q is the extra amount of charge that is contained in a shell of which the spherical shell which lies within radius r and r plus d r. So, therefore, the amount of charge d q is the surface 4 pi r square times d r that is the volume of the shell times the density rho and if you put all this thing in you find d q is 3 q over r cube r square d r. Now, how much work is done? The work that is done is d w which is equal to d q times potential at r and I know the potential at r is 1 over 4 pi epsilon 0 times q of r by r. Remember that this shell is put outside the sphere. So, as a result it is as if the field is field appears as if the entire charge q r is concentrated at the center. So, this is 1 over 4 pi epsilon 0 q r d q by r. So, what is my total amount of work done in assembling this entire charge distribution? This w is then simply I have to simply integrate over the sphere from a radius 0 to a radius capital R and this is all I need to do. This q r I plug in from here and then of course, now remember that this is simply the charge integration is over d q and there is just an integration is to be done over d r and this gives me again 3 q square by 20 pi epsilon 0 r. So, this is assembling the charge layer by layer. So, what we have seen is the following that the charge if I have a continuous charge distribution I can calculate the energy in different ways. In fact, I have shown you 4 different ways of doing it, but let me now come back to this question. Let me now come back to this question, which we talked about in the beginning and that is there is a difference between the discrete charge distribution and the continuous charge distribution. We had seen that in case of continuous charge distribution the integration is over modulus of electric field square, which is always positive. On the other hand for a discrete charge distribution the energy could be both positive and negative. Now, this is an anomaly and we have to give an answer to that question. The answer lies in the fact that as I mentioned earlier that for a discrete charge collection I never question how the discrete charges were made. So, as a result I am I go back and look at this expression that epsilon 0 by 2 my energy is epsilon 0 by 2 e square d q bar. Now, let me say that I have just two charges. Now, I know what is the field at any position r due to these two charges supposing I have a q 1. So, I have a q 1 by 4 pi epsilon 0 r minus r 1 divided by r minus r 1 cube plus that due to the second charge which is q 2 by 4 pi epsilon 0 r minus r 2 by r minus r 2 cube. Now, notice this is the electric field due to charge q 1 or q 2 at the position r. Now, if when you take the square of this when you take the square of this notice that electric fields satisfies the superposition principle, but square of that does not. So, I will have terms which are e 1 square and I will have terms which are e 2 square and if you calculate these two they will turn out to be infinite which is what I have been calling as the self energy. It is the cross term which if you calculate it properly will give you the energy that we calculated for the interaction energy of the two charges before. So, the difference between the two methods is due to the fact there is an infinite contribution to the self energy which is neglected in the our first method of calculating energy due to discrete charges. We will continue with this comment little more elaborate on it do this calculation next time.