Hello everybody. Welcome back to our electrodynamics and its applications. My name is Professor Seungbum Hong and to my right side I have my teaching assistant Melodie Glasser. So, in this lecture, we're going to first with the forces on a current loop and think about the energy of a dipole, especially magnetic dipole. We started the magnetic field produced by a small rectangular recurred loop which is a dipole field with the dipole moment given by u is equal to I times A, where I is the current and A is the area of the loop. The direction of the moment is normal to the plane of the loop. So, in a vector form, u will be a vector pointing along the normal vector of the surface surrounded by the loop where the current is flowing. Therefore, is equal to I times A times n vector, where n vector is the unit normal to the area A. A current loop or shall I say a magnetic dipole, not only produces magnetic fields but will also experience forces when placed in the magnetic field of other currents which we just learned in the very, very first part of this lecture series where you remember Benjamin Franklin experimented with the wire between two pillars and have a magnet underneath. So, the current carrying wire was interacting with a magnetic moment that it was created by the magnets underneath. So, for the dipole moment, especially the magnetic dipole, we will think about the torque acting on that loop. We will first look at the forces on a rectangular loop in a uniform magnetic field which is depicted schematically to next side of Melodie. As you can see here is X, Y, Z Cartesian coordinates and you have a rectangular current loop placed at an arbitrary angle and you see the surface normal vector is along with the u. You see the u vector is making an angle with the z axis about Theta as you can see. So, let the z-axis be along the direction of the field which is the magnetic field. So, you can imagine the field is coming from down to up and the plain on the loop be placed with y-axis. So, y-axis will be the axis of rotation and making the angle Theta with the XY-plane. Now, the magnetic moment of the loop which is normal to this plane will make the angle Theta with the magnetic field we've just mentioned. Since the currents are opposite on opposite sides of a loop, the forces are also opposite. As you can see the force acting on one and two they are opposite and they have the same magnitude. F3 and F4 they're opposite and have the same magnitude. So, there's no net force on the loop when the field is uniform. However, there is a torque which tends to rotate the loop about the y-axis. So, you can imagine if you thread this with a wire and thread this with a wire there and if you stretch you can imagine it will rotate and be flat. Right? That torque can be expressed by the force acting on each part of this wire times the projection of your lever to the z-axis which is a Sin Theta. Right? A Sin Theta. So, force is again force times current is current times the B field times the length of the wire. So, it's I times B times, B so IbB is inserted then it becomes IabB sine theta and you can recognize the I times ab which is the area of the loop, will be u. So, is u B Sin Theta and in vector form it will be the torque is equal to u cross B and that nicely compares with the torque on the dipole moment in electric field which is p cross E, okay? So, with that in mind, let's think about the mechanical energy of a current loop. Since there is a torque, the energy depends on the orientation and the principle of virtual work says that the torque is the rate of change of energy with angle so dU will be equal to Tau d Theta. So, if you imagine your changing the angle by a small amount, d Theta, you will have change in energy dU. We already know tau is u B sin Theta, so you can just put in there. Now, with this in mind we're going to integrate it. Now I'm going to ask Melodie, if I integrate sin Theta with respect to d theta, what happens? Then, the solution to that would be negative cosine Theta. Exactly. We will have negative cosine Theta as you see here and we will have a constant because if you differentiate this this constant will not contribute. Yeah, and I think if we make it relative then the constant can be neglected as well. Exactly. Exactly. If we have the reference point as in the case of electric potential, then we can put the C as zero. So, the energy is lowest when u and B are parallel because this will be the minimum when Theta equals zero and it will be maximum when Theta equals 180 degrees. For reasons which we will discuss later, this energy is not the total energy of a current loop. We have one thing not taken into account, the energy required to maintain the current loop. In order to maintain a current loop when you have resistance, costs energy, because we have joule heating, right? So that one is not taken into account in this energy term. So, we can set the constant of integration equal to zero as Melodie just mentioned. In that case, your mechanical energy will be simply put by minus u b cosine theta which in a vector form will be minus u.B and this nicely compares with the potential energy of a electric dipole and electric field which is U is equal to minus p.E. Now, Melodie, is this the true hole energy of electric dipole? I think so, right? Exactly. In the case of electric dipole, this is the true energy. However, use of mechanical energy is not the real energy in magnetic statics. It can however be using in computing forces by the principle of virtual work supposing that the current in the loop or at least u is kept constant and we will think about why that's possible. Now, let's take a look at this picture on the right side where we simplified a lot of things. We have this rectangular loop and the area that is bounded by the loop is in XY plane and we have B field along the Z direction. So, imagine that we want to move the loop in the X direction toward a region of a stronger field and that the loop is oriented as shown in the figure. Now, we start somewhere where the field is zero. It could be infinity and infinity is zero, and integrate the force times the distance because force times the distance is work done on the system, as we bring the loop into the field. Let's compute the work done against the force on each side separately and then take the sum. You see these two parts where you have wires along the X direction will not contribute to the work. Only the part that is perpendicular to the motion will contribute to the work, so we'll only have to consider the one and two, no part of the wires. So, the work done on wire two will be from infinity to X2 because it's located at X2, finally. For one, it will be from infinity to X1 and the rest of the equation will be the same. You will see the form is the same and you just put F2 for the wire two and F1 for wire one. But, as I told you, the form will be the same because it will be a function of magnetic field as a function of X. Now, with these two equations in mind, now we're going to sum them up and notice that side one falls along right behind side two, so that's an integral includes most of the work done on side two, so it's redundant. You can see that the sign of the work is opposite. Therefore, if I add them, it's like subtraction. Because of that, the infinity part will disappear and you will only have from X1 to X2. So, that's very simple. Then, if we imagine that if we are in a region where B is nearly the same, meaning uniform B field, then this integration becomes even simpler. So, how should I solve this Melodie? So, if you assume that B is a constant, you can actually take it out of the integral and then you're just integrating on dx and the integral and that will become X. So, then, you just do the first pound minus the last one, and you get X2 minus X1. Exactly. X2 minus X1, in the picture was the lengths of the other side of the wire, which is a. So, this will be aB, where B is the field at the center of the loop. Now, the total mechanical energy we have put in, is use up mechanical energy is equals the work done against the force, which is equal to minus Iab B, where Iab is simply Mu. So we have U mech is equal to minus MuB. Now, so that was an approach where we could calculate the mechanical energy. Now, let's take a different approach to get the same result and answer. If we let B_1 be the field at side one and B_2 be the field at side two, then the total force in the X direction is F_x is IbB2 minus IbB1. Even in this case, now, we don't have a uniform field. In the former case, we assumed it was uniform. If the loop is small, the change in the magnetic field as I moved from wire one to wire two can be approximated to this form, which is the first order approximation. Because Delta x is a, then it becomes B1 plus round A round x times a. So, if I put this into the equation, the force F_x is equal to IaB round B over round x. The total work done on the loop by external forces is minus integral from minus infinity to x, Fxdx which is equal to minus IaB times integral from minus infinity to x round B over round x times dx. How do we evaluate this Melodie? I think because, well, the two dx's cancel each other out and then, what happens to the infinity? So, we have dB, so this will be B. So, this will go to B, so B at infinity is zero. So then, we have minus IabB which is B in the current place which is minus MuB. So, only now we see why it is that the force in a small current loop is proportional to the derivative of the magnetic field. Again, we got the same result, even though we use a different approach. Our result is that even though U_mech is equal to minus Mu.B may not include all the energy of a system, it is a fake kind of energy in other words. It can still be used with the principle of virtual work to find the forces, unsteady current loops. Your homework will be, why? Why is that the case? What happens to the other energy terms? How could this part of the full energy can be responsible for the force generated on the system? Okay. I want you to think about that. Now, we want to show why the energy U_mech is not the correct energy associated with steady currents, that is to say that is, it doesn't keep track of the total energy in the world. We have emphasized that it can be used like the energy, but for computing the forces from the principle of virtual work, provided that the current in the loop and all the other currents do not change. So, here we're going to think about additional energy, which we will call electrical energy, and see what kind of form it will take. So, let's take a look at this picture and let's think about the definition of electrical work. Now, imagine that the loop is moving in the plus X direction, as in the case before. Take the Z-axis in the direction of B, the conduction electrons in side two will experience a force along the wire, especially in the Y-direction. So, let me ask Melodie. Why do the electrons in side two, which is situated here, experience a force along Y-axis, which is the blue arrow direction? The Lorentz force makes the direction perpendicular, right? Exactly. Lorentz force is acting on the moving charged particles and especially, it is perpendicular to both magnetic field and the motion of the electrons. In this case, the motion of electrons in X to B field is in Z. So, your force will be acted along Y. Now, electric work is defined by work done on the electrons flowing inside a loop and it equals to zero if the loop is moving in a uniform field. Let's see why that's the case. So, you see the electrons in wire one and wire two, they will have the same force along the same direction, but they will meet together with the same magnitude if the magnetic field is the same, will annihilate. The wires on the three and four, they will have forces acting perpendicular to the wires, so they will not be able to move. So, there will be no work done there. So, therefore, you can see it equals to zero if the loop is moving in a uniform field. So, electric energy in this loop is zero. However, if the loop is moving in a non-uniform field, there will be a net amount of electric work. In order to keep the current constant, this energy should be either absorbed or delivered to the circuitry which is not included in U_mech. So, imagine as in the case we have solved for the first order approximation, where your field on B and the wire one and wire two are different. Then, you see from this logic, you have electrical work done. But then, what you find you cannot keep the current constant. The current will increase or will decrease depending on the situation. So, in order to keep the current constant, you have to inject energy from the outside circuit or take away energy from the circuit. So, that part is not included in U_mech. So, that's why U_mech is not the total energy of the system. So, let's take a look at this picture again, let's consider a segment of wire of unit length carrying the current I, and moving in a direction perpendicular to itself and to magnetic field B with speed V sub wire, which is schematically depicted right next to Melodie, and you can see this is the section of the wire, we have current flow here, the drift current and then you have wire moving on the direction perpendicular to the wire with a velocity of V sub wire and the field is pointing along Z direction. Since the current is held constant, the forces under conduction electrons do not cause them to accelerate, so this is very important. The electrical energy is not going into the electrons, but into the source that is keeping the current constant, so the source is taking away extra energy, so make sure the current is kept constant. In other words, the charge carriers are moving at a constant speed. Note that the force on the wire is IB, so IB times v sub wire is also the rate of mechanical work done on the wire, you see that. So, d_U sub mech over d_t is IBv sub wire. Now the mechanical work done on the wire is just equal to the work done on the current source, and therefore the energy of the loop is a constant. So, you can see they should be constant because rate of total electric work and rate of mechanical work, they are the same. So, we discussed about mechanical energy and electric energy, electrical energy on the loop and we wonder if we're missing any other energy terms, so Melodie are we missing any other terms? I'm not exactly sure where the B field is coming from, so maybe there's a term associated with that. Exactly, in order to create B field at a constant magnitude, we need to have a coil and that is another energy source that we need to consider when you think about the whole system. Now, the total force on each charge in the wire is F equals Q times parenthesis, E plus V cross B parenthesis, we learned that from our earlier lecture. What did we call this force? The Lorentz force. Exactly Lorentz force. This is from experiments. Now, I want to use this to understand the rate at which work is done and the work is defined by the force times the distance, and the rate at which work is done is just force times the distance over time, and if I divide time for- if I do divide the distance by time, that becomes velocity. Therefore, velocity that force is equal to the rate at which work is done and if I put that here, that results in q[ v. E + v. (v cross B)] Now in our magnetic static- magnetostatic world we don't have electric field because there's no net charge, so this will be zero. Now we also know from our vector calculus that anything, the dot product and cross product, if you have the same vector outside and inside the parenthesis, this will result in zero, why? Because these vectors and this vector will be perpendicular and if you do dot product for two perpendicular vectors, that's zero. So, that means if there are no electric fields, we have only the second term which is always zero, which means the rate at which work is done is zero. Again, the rate at which work is done is zero, so we shall see that changing magnetic fields produce E fields, so our reasoning applies only to moving wires and steady magnetic fields. Then, how is it then the principle of virtual work gives the right answer. We still have not taken into account the total energy of the world, we haven't included the energy of the currents that are producing the magnetic field we start out with. So, until here, you're puzzled because it's zero, right? However, now we will see another term coming. So, we will compare the total energy and mechanical energy and to our surprise, we will see something very cool. Now, using principle of relativity and some mathematical tricks, we can find the relationship between the total energy and the mechanical energy, and let's take a look at these two pictures next to Melodie. You see the current loop that we discussed all along this lecture, the rectangular loop and then this rectangular loop is approaching the coil, the coil, which is creating magnetic field necessary to maintain our uniform magnetic field through this loop. This situation is the same as the situation down here, where the loop is staying, remaining in this place and the coil is approaching with the same velocity v, right. So, using the principle of relativity, we know these two are exactly the same situations, right. Now, when we are moving the loop toward a stationary coil, we know that this its electrical energy is just equal and opposite to the mechanical work done, we just proved that a slide before. So, U sub mech plus U sub elect on the loop is equal to zero. Let's put it equation one. Put it as equation one, when the coil is moving into the field produced by the loop, the same arguments would give that the mechanical energy of the system plus electrical energy of the coil is equal to zero, let's put it as equation two. Now, since u sub mech is the same for both cases because it comes from the force between the two circuits, right. So, let's do some wonderful things, so as I told you, if we sum equations one and two, we will have two times U sub mech plus U sub electrical energy of loop plus U sub electrical energy of coil which is equal to zero. So, Melodie, if we move one of this U sub mech to the right side of the equation, what happens? Okay, so if you move one of the U sub mechs to the right side, it will become negative here, and then let's consider what the total energy would be, so we see this equation here, where the total energy is equal to the electric energy of the loop, the electric energy of the coil and then the mechanical energy. Perfect. Then we noticed that equation is equal to what would happen if we moved the one of the mechanical energies to the other side, so we can see that total energy is equal to the native mechanical energy. Exactly, so the total energy is really the negative of U sub mech, this is wonderful. So, therefore, without certain knowledge, you can say the total energy is just mu.B instead of minus mu.B, so it is only if we make the condition that all currents are constant that we can use only a part of the energy which is U sub mech to find the mechanical forces. So, this is why we were able to do that even though mechanical energy is just part of the total energy. Okay. Now, let's take a look at the virtual work in electrostatics. We're thinking of constant charge, or constant voltage, because depending on the boundary conditions we will have different types of virtual work. Now for a constant charge, the energy of a capacitor is equal to Q square over two C. So let me revisit why this is the case. So, imagine you have a capacitor, and you somehow injected charge at let's say four pluses here, and four minus here. Then you have plus Q here and minus Q here. We know that the energy accumulated in this system, is equal to one-half CV squared. CV is equal to Q as we learned before. CV is equal to Q. So, if I replace it here, this equation will become one over two Q square over C. Q squared over C. That's why if you have a constant Q instead of constantly V, you need to use this form instead of this form. So, you can understand that here the delta U will be done on Q square over two C, and when we use the principle of virtual work to find the force between the plates of the capacitor to change in energy delta U is. You can think of this situation as if you are moving the plus plate by a very small amount delta say jet Z. When that happens you can already see because the distance is changing, capacitance will change as well, you will have delta C. But the charge will stay constant so Q will be constant. So in our equation Q will be constant, and only C will change. So that's why we're going to differentiate on C, not on Q. You can see that delta U is equal to Q squared over C, and I'm going to differentiate one over C. Now Melodie, if I differentiate one over C what happens? Then you would get negative one over C squared. Times delta C. Right. So that's what happens here. So that's how we got minus Q square over two, delta C over C squared. So this form will be the virtual work when Q is constant. Now, suppose that we were to calculate the work done in moving two conductors subject to the different condition that the volts between them is held constant. Then we can get the right answer if we use an artificial energy equal to the negative value of the real energy. You may wonder why. You may wonder why. So the delta U mechanical will be delta minus one over two CV squared which is minus V squared over two delta C. As you know C square, V square is Q square, you can see these two will have the same. But then you wonder, why in the case we keep voltage constant? Why do have to change the polarity of the energy? We get the correct result even though we neglect the work done by the electric system to keep the voltage constant because this is twice as big as a mechanical energy, and of the opposite sign. So, again, in the picture. If you have four pluses, and you're having some voltage here, which is Q over C. If you move this up by a small amount, then you start to change C. In order to get the same voltage, you have to put extra charge from the circuit which cause you to use some of the energy from the source. That's why you cannot just rely on the energy accumulated in the capacitor. Okay. So, now we're going to cover the energy of steady currents. We can now use the knowledge that U sub total is equal to minus U sub mech to find the true energy of steady currents in magnetic fields. So, U is equal to the total energy, is equal to plus mu.B for small plane loop of any shape. We can find the energy of a circuit of any shape by imagining that it is made up of small current loops as in the case we discussed Stoke Theorem where we had arbitrarily shaped potato chip, and cut it into well ordered square shape. If we let the current I circulate around each of the little loops, the net result will be the same as a current around gamma. We know that. So, the energy of the original circuit equals the energy of the solid the energy of the little loops. Because energy is conserved, and we can't add or subtract. So, if the total area of the little loop is delta a, its energy is I delta a times b sub n. Where b sub n is the component normal to delta a. So the total energy will be U is equal to sigma, I times b sub n delta a. Let delta a approaches zero then this sigma can be replaced by A integral, so U is equal to I times integral of b sub n times CA, which is to say I times integral B.nda. We remember B is equal to the curl of vector potential, and if I put it into this equation now we can use Stokes theorem where it states; "The circulation of a vector field along any loop is equal to the surface integral of the curl of that vector on the surface area bounded by the loop." So, you can get the equation where I times the line integral of the vector potential.ds. This is the energy of circuit of any shape. In this expression, A refers to the vector potential due to those currents which produce the field at the wire. So now the energy is equal to current times the circulation of your vector potential. So the total energy of steady currents will be the next topic we will think about. So we just derived a very nice equation where we know the total energy is function of current as well as the circulation of the vector potential. So mathematically that is really simple. Now any distribution of steady currents can be imagined to be made up of filaments parallel to the lines of current flow, and for each pair of such circuits the energy is given by U is equal to I times linear integral around the circuits of a.ds. Where the integral is taken around one circuit, using the vector potential A from the other circuit. Now for the total energy, we want the sum of all such pairs. If we take the complete sum over all filaments, we would be counting the energy twice. Therefore, the total energy can be written by putting one-half in front of this integral again. Because one of them is the loop that is getting the B field and one of them is making the B field. That role will be switched as we do this integral, and that's why we have to put one-half to avoid redundancy. Now this formula corresponds to the result we found for electrostatic energy. If you remember this. U is equal to one-half, integral of charge density times electrostatic potential. Now you remember you can replace the charge density by J over C square, and the metastatic potential phi by A. So you can see similarity between them. Now, both formulas are only true for static fields, and steady currents interact correct when the fields change with time. So, keep in mind, this is only for electrostatics and magnetostatics.