 Say we have a circular wire of radius r carrying a current i. Our goal of this video is to figure out the strength of the magnetic field somewhere on the axis at a distance x from the center. So how do we begin? Where do we start? We can start by something that we've already seen before. We know the relationship between current and magnetic field, given by Bayer-Severts law. It says that if you have a tiny piece of wire of length dL, which carries the current i, and if you want to calculate magnetic field at some distance r, making an angle theta, then that magnetic field is given by dB, that is a very small magnetic field because it's a very small wire, equals some constant times the current times dL, that's the length of the current elements times sin theta, where sin of this angle divided by r square. And we've seen before that this is very similar to, not exactly same, but pretty similar to Coulomb's law, which tells you the strength of the electric field due to a charge. This one tells you the strength of the magnetic field due to a current carrying small element. So what we could do now is we can divide this entire loop into tiny tiny pieces, calculate the magnetic field at this point due to each piece and then integrate over the entire wire. So that's the strategy that we're going to use. Alright, so to begin with, let's take a tiny piece of wire and just focus on that. And because this is in three dimensions, it'll be easier if I take a piece over here so we can see everything. So let me take a piece here and just focus on that. So imagine this is our tiny current carrying wire and I want to now calculate the magnetic field at this point only due to this piece, only due to this piece. We'll have to first draw a line connecting from here to here. That will be my R, so let me go ahead and do that. So here's our R. Alright, so if I substitute over here, what will I get? Well, the constant says the same. The current is I, that's not going to change. Length of that current element, length of this piece, let's call that DL, it's a very tiny piece. Okay, the two things we need to know is what is the value of R? I need to know what R is and I also need to know what theta is. Let's start with R. Can you tell me what the value of R is just by looking at this diagram? I'm pretty sure you can. Here's a right angle triangle. So Pythagoras' theorem tells me R squared should equal capital R squared plus X squared. So that thing we got right away. So I know this is going to be R squared plus X squared. So we got that. Okay. The next thing we need to know is what is sine theta. And this is the part that always confused me. So I really want to spend some time over here. Theta is the angle between the DL vector, which is the same direction as I. So you can just say angle between the current direction and the R direction. In our case, R is over here. As you can see, what direction is the current? Well, because the current is flowing this way, at this point, the current is directed out of the screen. Hopefully you can see that. So, can you think about what that angle theta is going to be in this particular diagram, where that angle theta is? And then, can you think about what the value of sine theta is going to be? At this point, I encourage you to click the link here and come to our website where you get to interact with this derivation. I can guide you, but you will do the derivation yourself. Best way to learn. But of course, if you're pressed for time, then you can just pause the video over here. Give this a shot before we continue. All right. If you're given this a shot, let's see. Because the current I is out of the screen and this R vector is in the screen, the angle between them has to be 90 degrees. Now, because this is hard to see, I have a demo for you. So let's say this cellotape represents our current carrying wire and this pen top represents the current flowing out of the screen and this is our R vector. From this angle, we can't really see the angle between these two. And therefore, I will turn this a little bit. So if I turn, then things become a little bit more clear. Now, look at this. What is the angle between the blue top and this R vector? What is that angle? Hopefully, you can see that angle is 90 degrees. Now, I hope you can appreciate that it really doesn't matter what the value of X is. Meaning it doesn't matter where on this axis I'm calculating the magnetic field. Even if I was calculating somewhere very close, the angle would still stay 90 degrees. Even if I was calculating somewhere very far, the angle would still remain 90 degrees. And again, let me show you this. As you can see, even if I turn the pen, the angle stays 90 degrees because I'm still calculating on the axis. If I calculate off axis, that angle will change. And again, from the front view, that basically means it doesn't matter where I'm calculating on the axis, the angle stays 90 degrees. So long story short, what we are seeing, the thing that always confused me and hopefully that's a little bit clear now is that that angle theta between the R vector and I, that's going to be 90 degrees. And so if I put this all together, the magnetic field at this point, just due to this current element, is going to be, let's see, mu naught over 4 pi times I dL. Sine 90 is just 1, so I will not write that, divided by R squared plus X squared. The question is, what's the next step? Well, this is the magnetic field due to a tiny piece of wire. Now, if I want to calculate the magnetic field due to the entire coil, then I have to calculate, I have to integrate this over the entire wire. Now, here's my first attempt at calculating the integral, okay? It doesn't matter where I consider that dL. I hope you'll agree that the value of the magnetic field stays the same. Because, notice, mu naught by 4 pi is a constant wherever you go. I is a constant. dL is the length of that current element. I'm going to say same current element everywhere. And this R squared and X squared will remain the same. It doesn't matter where I go. So, because this value is going to stay the same, doesn't matter which current element I take, I now say that the integral is going to be super, super easy for me. I don't really have to integrate that means. So, if I take the integral, if I take the integral, then hopefully you see that all these things are constants, that they come out of the integral. And so, the only thing I'll effectively be integrating is just this. Just this. And so, what I will end up with now is mu naught by 4 pi times I times integral of dL. What's integral of dL? Well, if you look mathematically, you will say L. But what is that L? L is the length of that wire. And the length of that wire is the circumference of this circle. And that is 2 pi R. So, I know that. That is 2 pi R divided by R squared plus X squared. And I'm done. Right? No, I'm not done. There's something I haven't taken care of and I want you again to think a little bit about why this approach is wrong. What haven't I taken care of? Pause the video and give this a try. Hopefully you've given this a try. The thing that we didn't take into account is the direction of the magnetic field. Remember, magnetic field is a vector quantity. So, we know that the magnitude of the magnetic field due to each of the tiny section is exactly the same. But do we know for sure the direction is also going to be the same? Only then we can add them up. If the direction is not going to be the same then we need to take care of that. So, let's now focus on the direction of the magnetic field and how do we get that? By your server's law, what do we call that? It tells us that the direction of the magnetic field is given by crossing dL and r. So, dL has the same direction as the current and r direction is given over here. So, in this particular example, if you were to cross dL and r the way you would do that is you would start with your right hand making sure that your four fingers are initially facing in the direction of the dL vector. And then as you cross towards the r fold your four fingers in the direction in which you are crossing. So, if you do that you get this and now the thumb represents the direction of the magnetic field. So, over here the thumb is pointing into the screen which means in this particular example the magnetic field would be pointing into the screen. So, now I want you again, it's time for you to pause the video again and think about what the magnetic field at this point would be just due to this current element. Let me go back to that. So, take your right hand and cross it in the direction from i or the dL vector to r over here and see which direction the thumb is pointing. And just one thing to keep in mind is that when you do a cross product the product will always be perpendicular to both the vectors. So, in this case notice that dB will be perpendicular to both dL or i and r. And so the dB is into the board and therefore they are perpendicular to both. So, that's one thing to keep in mind. Whatever answer you're going to get needs to be perpendicular to both the current and the r vector. Alright, give this a shot and see what direction you end up with. Alright, if you're giving this a shot we'll start with our right hand such that the four fingers are pointing in this direction and so the way we'll keep it is this way. And when you cross from dL to r we get this. So, notice the thumb is pointing in this direction and therefore the magnetic field at this point will be this way. And notice that magnetic field is perpendicular to r vector. It's also perpendicular to i vector or dL vector. i is not a vector, dL vector but the direction of the current. And that is because current is coming out of the screen so it will always be perpendicular to this. Now, think about this. Do you think the magnetic field due to every single current element will be in this direction? Highly unlikely. In fact, if you were to take, let's say, the magnetic field due to a tiny piece over here the current over here points inwards. And so if you were to use your right hand rule now you will find that the magnetic field is not in this direction. In fact, is in this direction. Again, you can go ahead and give this a try yourself. And so, in fact, now, if you were to calculate the direction of the magnetic field due to every single piece on that current element you would now find that all these magnetic field vectors will be in this direction, sort of forming a cone. So they will have the same magnitude that we have found out already but they will have different directions. And that's why we couldn't directly add them. So now comes the question what do I do? I need to do a vector addition. That sounds complicated but here's the way I like to think about it. Imagine these were force vectors. Imagine, you know, something was being pulled in all direction this way with the same magnitude of force. Tell me what would be the resulting direction. Think about it. All of them are being pulled in all the direction. What would be the resulting direction? Well, the resulting direction cannot be inclined towards any one side. It cannot be towards the right or it cannot be towards the left. It cannot be towards the front or back because everything is symmetric. So the only direction it can go is along the axis. Interesting, isn't it? Another way to say the same thing is we could say if we take h and every vector and let's say decompose it into two components one along the axis and one along perpendicular to the axis then along the axis all of them add up. But if you look at the vectors perpendicular to axis the components perpendicular to the axis then you would see these are all the components perpendicular to the axis. They will all cancel out. They will all kill each other. So the only component that really matters that contributes to the total magnetic field is the actual component. And so all I need to do is figure out what's the component of our magnetic field along the axis of our coil and then once I calculate that then I can integrate that because I know they are all adding up. Does that make sense? Alright, so how do I do that? How do I figure out what's the component along the axis? Well, you might already recall. Again, this is your vectors. So you may recall to calculate the component along the axis I can use trigonometry. So if this let's say is the component along the axis let me call that db axis then if this angle is say alpha I already used theta then notice from trigonometry we can say this vector is db times cos alpha. Can you see that? I'm pretty sure you can do that. If you take cos you will get adjacent side and divide by the hypotenuse and so the db axis the component of the magnetic field along the axis is going to be this. Let me just copy paste that over here. db times times cos alpha cos alpha and so the last thing I need to do before I integrate this is find the value of cos alpha and again I want you to give this a shot. This is the last thing I would want you to try and again you might say how do I know the value of cos alpha. Well look carefully this is like a geometry problem now. Physics is already done. We are now into mathematics. Can you somehow use geometry to see what alpha would be in this particular triangle and maybe then by using this triangle you can figure out what cos alpha would be. So again I want you to give this a shot before going ahead. Alright if you have given this a shot let's see. We know that this total angle is 180 degrees 90 gone so this plus this should be 90 or this should be 90 minus alpha. And again in this triangle since this is 90 that means this should be alpha. Did you get that? And now from here I can calculate what cos alpha is. Cos alpha is going to be adjacent side r divided by small r. So if I just copy and paste this down. Cos alpha is going to be capital r divided by small r but I know the value of small r. Small r is the square root of r square plus x square. It's the hypotenuse. And so now I'm pretty much done. I know now that due to each and every single element the magnitude of the magnetic field is going to be along the axis is going to be this number. And so now I can go ahead and integrate this. And so if I integrate this just like before everything is going to be a constant. The only thing to integrate will be dl. So again since there is no space I'm just going to integrate it. Show that integration over here itself. So the total magnetic field along the axis is just the integral of this. And if the integral of dl is just like before we said the total length which is going to be 2 pi r. And of course you can finally simplify it even further. But I'm just going to leave it as it is. We don't have space or time. And the direction of the magnetic field will be along the axis. And again if you want to remember what direction that is. Then you can again use your right hand thumb rule. Make sure that your four fingers are giving the direction of the current. Then the thumb represents the direction in which the magnetic field will be pointing. It will be along the axis and the thumb will represent that. So to summarize and put it all together the way we approach this is we start with Biosawar's law. And then we calculate the magnetic field due to a small piece of that wire in magnitude. Then in direction. Then we realize that the actual components add up. So we only consider the actual component. And then finally we integrated over the entire loop to calculate the total magnetic field.