Required math: calculus
Required physics: electrostatics & magnetostatics
Reference: Griffiths, David J. (2007) Introduction to Electrodynamics, 3rd Edition; Prentice Hall – Problem 5.10.
Here are a couple more examples of calculating the magnetic field due to a steady current in a wire.
Suppose we have an infinite straight wire on the axis carrying a current in the direction. A square loop of side length (also carrying current flowing clockwise around the square as viewed from above) is placed in the plane so that the side nearest the wire is parallel to the wire and along the line . What is the force on the loop due to the wire?
First, we need to work out the magnetic field caused by the current in the wire. We can apply the result we used earlier in calculating the magnetic field due to a wire segment. In this case, we get, for a wire a perpendicular distance from the observation point :
From the symmetry of the problem the forces on the two sides of the square that are perpendicular to the wire cancel, so we need to work out only the forces on the two edges parallel to the wire. We get, using the form of the Lorentz force law for linear currents
Now suppose we have an equilateral triangle (side length ) with its base aligned with the wire, and along the line .. As before, the current flows clockwise around the triangle.
The force on the edge nearest the wire is the same as for the square, namely
To calculate the force on one of the other edges, we can take the coordinates of the vertex on this edge nearest the wire to be . Then the equation of the line of which that edge is a part is
The line increment along this edge is
The integral we need to do to figure out the force on this one edge is
where is the perpendicular distance from a point on the edge of the triangle to the infinite wire. In our coordinates, and over the extent of this edge varies from 0 to so we get
This is the total force on the edge, which from the cross product right hand rule is perpendicular to the edge and pointing towards the interior of the triangle. The force on the third edge will, by symmetry, point in a direction that is the mirror image of (reflected about the line ). Thus the components of these two forces parallel to the wire cancel, and the net force from these two edges is twice the perpendicular component of . Since is perpendicular to the edge of the triangle, which in turn makes an angle of with the axis, makes an angle of with the axis (draw a little diagram if this isn’t clear), so its perpendicular component is and the total perpendicular component from the two edges of the triangle is . This component is directed in the direction while the force on the bottom edge is in the direction, so the net force is