Having established the magnetic field of the simplest cases, straight wires, we must go through some calculus before analyzing more complex situations. In this section we shall generate an expression for the small contribution of a segment of a wire to the magnetic field at a given point, and then show how to integrate over the whole wire to generate an expression for the total magnetic field at that point.
Contribution to the Magnetic Field by a Small Segment of Wire
Consider a randomly shaped wire, with a current I running through it, as shown below. We want to find the magnetic field at a given point near the wire. First, we find the individual contributions of very small lengths of the wire, dl. The concept behind this method is that a very small piece of wire, no matter how the whole wire curves and twists, can be considered a straight line. So we sum over an infinite number of straight lines (i.e. integrate) to find the total field of the wire. If the distance between our small segment dl and the point is r, and the unit vector in this radial direction is denoted by , then the contribution by the segment dl is given by:
The derivation of this equation requires the introduction of the concept of vector potential. As this is beyond the scope of this text, we simply state the equation without justification.
Application of the Magnetic Field Equation
This equation is quite complicated, and is difficult to understand on a theoretical level. Thus, to show its applicability, we will use the equation to calculate something we already know: the field from a straight wire. We begin by drawing a diagram showing a straight wire, including an element dl, in relation to a point a distance x from the wire: From the figure, we see that the distance between dl and P is . In addition, the angle between and dl is given by sinθ = . Thus we have the necessary values to plug into our equation:
Since I, x and c are constants, we may remove them from the integral, simplifying the calculus. This integral is still quite complicated, and we must use a table of integration to solve it. It turns out that the integral is equal to . We evaluate this expression using our limits: