# Homework Help: Magnetostatics - field of a current loop

1. Nov 30, 2008

### darkchild

1. The problem statement, all variables and given/known data
Find the magnetic field at the center of a square loop, which carries a steady current I. Let R be the distance from center to side.

2. Relevant equations
Biot-Savart for a steady line current:
B(r) = μI∫ dl X r
---- ----------------------
4pi r2

r is the vector from the point at which we want to calculate the field (the center, in this case) to the infinitesimal element of line current that is creating the part of the field dB. dl is the infinitesimal length of wire. μ is a constant. 1/r2 is inside the integral.

3. The attempt at a solution
1. The problem statement, all variables and given/known data
I set the loop in the xy-plane. Using a right triangle with base dl and height R, I found that r = R/cosθ. I took each side of the loop as one wire, and found that the the dl's were

dl = (r sinθ dθ) l' = (R/cosθ)sinθ dθ l' = R tanθ dθ l'.

where l' was the unit vector y-hat in two cases and the unit vector x-hat for the other two wires. Whenever l' was y-hat, r' was x-hat, and vice versa, so all cross products ended up with direction -z', and my integrand was 4 times the magnitude of my cross products times 1/r2:

4/R(-z')∫tanθ*cos2θ dθ =

4/R(-z')∫sinθ cosθ dθ = 4/R(-z')∫sin (2θ) dθ/2 =

2/R(-z')∫sin (2θ) dθ.

I decided that integrating from one end of each wire to the other end corresponded to integrating from some θ = -pi/4 to pi/4 because when r goes from the center to the very end of any wire, a triangle with base = R, height = R is formed (a 45-45-90 triangle).

All seems well to me...except that my integral evaluates to zero:

∫sin (2θ) dθ = .5 (cosθ0 - cos(-θ0)) = 0.

I'm positive that that is incorrect because 4 wires each contributing a downward B field (by the right-hand rule) should add up to a net downward B field.

I'm hoping someone can point out where I went wrong.

2. Relevant equations

3. The attempt at a solution
1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution

Last edited: Nov 30, 2008
2. Dec 1, 2008

### buffordboy23

Let $$l = Rtan\theta \rightarrow dl = Rsec^{2}\theta d\theta = \frac{Rd\theta}{cos^{2}\theta}$$

When you substitute all of your expressions into the biot-savart equation you should only have a cosine term, which is easy to integrate.

Last edited: Dec 1, 2008