Sub topic 4
Field of a straight wire: finite and infinite
This chapter assumes you know the Biot-Savart law, the cross product and its right-hand rule, and basic trigonometric integrals. It derives the field of a straight current segment and then reduces it to the cases JEE uses most often.
Setting up the integral
Take a straight wire carrying a steady current I. Let P be a point at perpendicular distance d from the wire. Put the origin at the foot of the perpendicular from P, and measure position l along the wire from there.
For a current element of length dl at position l, the Biot-Savart law gives
dB = (μ0 / 4π) · I dl sin φ / r²
Here r is the distance from the element to P, and φ is the angle between the current direction and the line from the element to P.
Use the angle α between r and the perpendicular instead of φ. The two are related by sin φ = cos α. The geometry gives three relations:
- l = d tan α
- dl = d sec²α dα
- r = d sec α
Substituting these gives
dB = (μ0 I / 4π d) cos α dα
Every element contributes in the same direction. That direction is perpendicular to the plane containing the wire and P. So you can add magnitudes and do not need to add vectors.
The finite-wire result
Suppose the two ends of the wire subtend angles θ1 and θ2 at P. Measure each angle from the perpendicular to the line joining P to that end. When the foot of the perpendicular lies between the ends, the angle α runs from −θ1 to +θ2. The integral is
B = (μ0 I / 4π d) ∫ cos α dα = (μ0 I / 4π d)(sin θ1 + sin θ2)
If the wire has length a on one side of the foot and b on the other, then sin θ1 = a / √(a² + d²) and sin θ2 = b / √(b² + d²).
import numpy as np
MU0 = 4e-7 * np.pi
def finite_wire_formula(I, d, a, b):
s1 = a / np.hypot(a, d)
s2 = b / np.hypot(b, d)
return MU0 * I / (4 * np.pi * d) * (s1 + s2)
def finite_wire_numeric(I, d, a, b, n=200000):
# Wire on the z axis from z = -a to z = +b, current along +z.
# The field point is P = (d, 0, 0).
edges = np.linspace(-a, b, n + 1)
z = 0.5 * (edges[:-1] + edges[1:]) # midpoints of the elements
dz = (a + b) / n
dl = np.zeros((n, 3))
dl[:, 2] = dz
src = np.zeros((n, 3))
src[:, 2] = z
r = np.array([d, 0.0, 0.0]) - src
dist = np.linalg.norm(r, axis=1)[:, None]
dB = MU0 * I / (4 * np.pi) * np.cross(dl, r) / dist**3
return np.linalg.norm(dB.sum(axis=0))
I, d, a, b = 10.0, 0.10, 0.30, 0.40
print(finite_wire_formula(I, d, a, b)) # about 1.919e-05 T
print(finite_wire_numeric(I, d, a, b)) # agrees with the formulaThe summed field points along +y, which is the direction ẑ × x̂ predicts.
Special cases
The same formula covers every case you need. Only the angles change.
| Situation | θ1 | θ2 | Field |
|---|---|---|---|
| Infinite wire | 90° | 90° | μ0 I / (2π d) |
| Semi-infinite wire, P level with the end | 0° | 90° | μ0 I / (4π d) |
| Finite wire, P on the perpendicular bisector | θ | θ | μ0 I sin θ / (2π d) |
| P on the line of the wire (extended) | not applicable | not applicable | 0 |
For the infinite wire, sin 90° + sin 90° = 2, so B = μ0 I / (2π d). A wire of 10 A at 5 cm gives 4 × 10⁻⁵ T. The field falls off as 1/d, and its lines are circles around the wire.
The semi-infinite case is half the infinite result. This follows from symmetry: the two halves of an infinite wire contribute equally at the point level with the join.
On the extension of the wire, dl and r are parallel or antiparallel. Then dl × r = 0 for every element and B = 0. This fact is often the quickest way to discard a segment of a composite conductor.
When the foot of the perpendicular is outside the wire
Sometimes P lies beside the wire but its perpendicular foot is beyond one end. Both ends are then on the same side of the foot. Let their angles from the perpendicular be α1 (the near end) and α2 (the far end), with α2 > α1. The integral runs from α1 to α2:
B = (μ0 I / 4π d)(sin α2 − sin α1)
This is the formula with a sign change, and it is the usual place for errors.
Choosing the right formula
Direction of the field
Use the right-hand grip rule. Point your right thumb along the current. Your fingers then curl in the direction of B around the wire. For a point P in the plane of a diagram, the field is into or out of the page. With the current pointing up the page, the field is out of the page on the left side of the wire and into the page on the right side.
Common errors and edge cases
- Using the infinite formula too freely. The result holds when d is much smaller than the distance to either end. Near an end, the field is smaller. At a point level with an end, it is exactly half.
- Treating one segment as a complete circuit. In a real circuit the current must return. JEE problems accept the field of a single segment as a building block. You then add the contributions of all segments of the conductor.
- Forgetting the zero-field segments. Straight sections that lie along the line through P contribute nothing. Check for them first.
- Adding magnitudes when directions differ. For one segment all elements add in the same direction. For several segments you must add vectors, using the grip rule for each.
- Unit slips. Keep d in metres. With μ0 / 4π = 10⁻⁷ T m A⁻¹, many results reduce to quick arithmetic.
Worked case: the square loop
A square loop of side a carries current I. Find the field at its centre.
Each side is a finite wire. The centre is at distance d = a/2 from each side, on its perpendicular bisector. Each end makes an angle of 45° with the perpendicular, so θ1 = θ2 = 45°.
One side gives (μ0 I / 4π (a/2)) · 2 sin 45° = √2 μ0 I / (2π a).
By the grip rule, all four sides produce a field in the same direction at the centre. So
B = 4 × √2 μ0 I / (2π a) = 2√2 μ0 I / (π a)
This is the standard result for a square loop.
Exercise
A semi-infinite straight wire carries 10 A. A point lies 0.10 m from the wire, level with its end. Find the magnitude of the field.
Show answer
The perpendicular foot is at the end, so θ1 = 0 and θ2 = 90°. B = (μ0 I / 4π d)(sin 0° + sin 90°) = (10⁻⁷ × 10 / 0.10) × 1 = 1 × 10⁻⁵ T.
Exercise
A straight wire of length 2L carries current I. Find the field at a point on its perpendicular bisector at distance d = L from the wire.
Show answer
Each end subtends θ with sin θ = L / √(L² + L²) = 1/√2. Then B = (μ0 I / 4π L)(2 / √2) = √2 μ0 I / (4π L).
Exercise
A point P is at perpendicular distance d from the line of a wire. The foot of the perpendicular is at distance d from the nearer end, and the wire extends a long way past that end (treat it as very long). Find B at P.
Show answer
The near end makes α1 with tan α1 = d/d = 1, so α1 = 45° and sin α1 = 1/√2. The far end is effectively at α2 = 90°. So B = (μ0 I / 4π d)(1 − 1/√2).