# Magnetic field of bent wire for a point along parallel axis

Tags:
1. Nov 25, 2014

### Treefrog

1. The problem statement, all variables and given/known data
Long wire is bent such that it forms two parallel line segments that goes to -∞ along the z-axis and a semicircle of radius (R). Find magnetic field on Z axis.

2. Relevant equations
Biot-Savart Law
(μ0/4π) I = ∫ dl' x R/ R^2

where dl' is element of length and R is the unit vector, and R is the vector from source to point on z-axis

3. The attempt at a solution
So my attempt. I broke the problem into two parts. Magnetic field due to semicircle and magnetic field due to infinite wires.

For the infinite wires I got

B= μ0 I/2πR

which I'm pretty sure is correct.

The problem I'm having is calculating the magnetic field due to the semicircle

dl' = Rdθ [sinθ, 0, cosθ]

R = [Rcosθ, 0, Rsinθ+z]

R^2= (Rcosθ)^2 + (Rsinθ+z)^2

(dl' x R) = R^2+Rzsinθ dθ

B = μ0/4π ∫ {(R^2+Rzsinθ)/(Rcosθ)^2 + (Rsinθ+z)^2 } dθ

I feel like a made mistake somewhere.
Since if z=0
magnetic field due to the semicircle should be

B = μ0*I/2R

but thats not what my answer is showing.

Any help would greatly appreciated.
thanks

2. Nov 28, 2014

### Bystander

What's the orientation of the semicircle relative to the z-axis?