Hey, guys, let's do an example. What is the magnetic field at the position shown in the following figure. Do Thio the finite current carrying wire. Okay, we already saw what the magnetic field, due to an infinitely long current carrying wire is now we want to find it due to a finite current carrying wire in this case, a wire of length to a Okay, I centered the Z axis so that the wire extends negative A to the left of the Z axis and positive a to the right of the Z axis. Okay, Now, what Bill Sabarwal tells us is that each chunk of this current carrying wire contributes a very small amount of a very small amount to the magnetic field equals, um, you not over four pi i d l cross our over our cute. That's the very, very small contribution of each piece. De l of this current. So if I were to grab an arbitrary piece of this current, let's say right here, I'm not gonna call it D l. I'm gonna call it the X because it's in the X direction Okay than this is my our vector. The position from my current d l to the point at which we're interested in measuring the magnetic fields. Okay. And what is our are simply whatever we call this distance which I'll call X And this distance the vertical distance which we called our is the square root of X squared plus Z squared. Okay, so let's simplify our DP right here. Okay? I This is gonna be dx okay and said it d l r sine theta because I'm doing the cross product between them over our cubes, we're gonna lose the value of our so it's gonna be Muna over four pi. I signed Fada over the square root of X squared plus Z squared DX. We're not quite done. The reason is, as we're integrating along X as we move from negative a across X all the way over to positive a this angle, right? Your data changes. So we do need to know what sign of data is. We can say, though that sign of data is just the opposite edge, which is easy over the high pot noose are, which is the square root of X squared plus Z squared. Ok, I did make one little typo right here. This is R squared. Are is the square root. So the square cancels the square root. Okay, this is what sign of fate it looks like, though. Okay, so now we can plug in sign of data. I'm gonna minimize myself to give us some room. Mu not over four pi I z over. This is to the power of one. This is to the power of one half. One plus one half is three halves. Okay, the X. Okay, So all we have to do is integrate this over our integration variable X, and that will tell us what the magnetic field strength is at that point. So be is just the integral along X from negative A too positive A of mu, not I over four pi z over x squared plus z squared to the three halves DX. Okay, Now you cannot use u substitution here because the denominator you would use Sorry you in the denominator as x squared plus z squared. But that means you need a next in the numerator. That doesn't work. This is an integral that we've actually seen before when dealing with cool OEMs law. And it uses trig and metric substitution. I'm not gonna do the integral again. I'm just going to show the result. This is something that you can find in your books in the table of integrations. It would be given to you on an exam. Okay, Unless your professor was a sadist and made you solve this from scratch on an exam. Okay, but the solution is just mu not I. Over four pi to a over Z square roots Z squared, plus a squared. That is the solution already plugging in the integration limits. Negative. A and positive A. Okay, so one thing that we could do right here is we could knock a two down, and that would be simplified. Okay, this is the correct answer right here to find the magnetic field at a point z for a finite wire of length to a Now, an interesting question is, does this result match up with the result that we know is true for an infinitely long wire. Okay. Meaning what does the limit as a go to infinity look like? Well, this is just mu, not I over two pi. None of that is involved with the limit. A over Z square root Z squared, plus a squared. The numerator ended a nominator. Both have the same power of a It's a in the numerator and square root of a square in the denominator. So we can't say for sure which wins the numerator or the denominator because they're both growing at the same rate. I need to use a little bit of algebra to manipulate our limit. This becomes you and I over two pi. Nothing changes there, Limit. What I'm going to do is I'm going to factor out this a squared. When I pull it out off the square root, it loses its power, okay, loses its power of two, and it just becomes a So this is a over Z a square roots Z squared over a squared plus one. Okay, that's the factored form. And now, luckily notice we could just lose the power A in the numerator and the denominator. So once again, what's wrong color continuing with this this is mu not I. Over two pi limit as a goes to infinity of one over z Z squared over a squared plus one. Now what happens when it goes to infinity? Well, this is e squared over a squared, so that goes to zero. Zero plus one is just one. So this whole thing is mu not I over two pi z. And that is exactly the equation that we have for a wire that's infinitely long and straight carrying a current I If we wanted to know the magnetic field, the distance z away, right? If we had some wire carrying some current and I wanted to know what was the magnetic field at this point a distance z away, it would be this equation. All right, guys, Thanks for watching.