Since directions of magnetic fields due to all current elements are same, we can integrate the expression of magnitude as given by BiotSavart law for the small current element (we have replaced dl by dy in accordance with notation in the figure) :
B
=
∫
đB
=
μ
0
4
π
∫
I
đ
y
sin
θ
r
2
B
=
∫
đB
=
μ
0
4
π
∫
I
đ
y
sin
θ
r
2
In order to evaluate this integral in terms of angle φ, we determine đy, r and θ in terms of perpendicular distance “R” (which is a constant for a given point) and angle “φ”. Here,
y
=
R
tan
φ
y
=
R
tan
φ
d
y
=
R
sec
2
φ
đ
φ
d
y
=
R
sec
2
φ
đ
φ
r
=
R
sec
φ
r
=
R
sec
φ
θ
=
π
2

φ
θ
=
π
2

φ
Substituting in the integral, we have :
⇒
B
=
μ
0
4
π
∫
I
R
sec
2
φ
đ
φ
sin
π
2
−
φ
R
2
sec
2
φ
=
μ
0
4
π
∫
I
cos
φ
đ
φ
R
⇒
B
=
μ
0
4
π
∫
I
R
sec
2
φ
đ
φ
sin
π
2
−
φ
R
2
sec
2
φ
=
μ
0
4
π
∫
I
cos
φ
đ
φ
R
Taking out I and R out of the integral as they are constant :
⇒
B
=
μ
0
I
4
π
R
∫
cos
φ
đ
φ
⇒
B
=
μ
0
I
4
π
R
∫
cos
φ
đ
φ
Integrating between angle “
φ
1
φ
1
” and “
φ
2
φ
2
”, we have :
⇒
B
=
μ
0
I
4
π
R
∫
φ
1
φ
2
I
cos
φ
đ
φ
⇒
B
=
μ
0
I
4
π
R
∫
φ
1
φ
2
I
cos
φ
đ
φ
⇒
B
=
μ
0
I
4
π
R
sin
φ
2
−
sin
φ
1
⇒
B
=
μ
0
I
4
π
R
sin
φ
2
−
sin
φ
1
We follow the convention whereby angle is measured from perpendicular line. The angle below perpendicular line is treated negative and angle above perpendicular line is positive. In case, we want to do away with the sign of angle, we put
φ
1
=
−
φ
1
φ
1
=
−
φ
1
in above equation :
⇒
B
=
μ
0
I
4
π
R
sin
φ
1
+
sin
φ
2
⇒
B
=
μ
0
I
4
π
R
sin
φ
1
+
sin
φ
2
Note that angles being used with this expression are positive numbers only. Also note that the magnitude of magnetic field depends on where the point of observation P lies with respect to straight wire, which is reflected in the value of angle φ.
We can also express magnetic field due to current in a straight wire at a perpendicular distance “R” in terms of angles between straight wire and line joining point of observation and end points.
B
=
μ
0
I
4
π
R
X
[
sin
π
2
−
θ
1
+
sin
π
2
−
θ
2
]
B
=
μ
0
I
4
π
R
X
[
sin
π
2
−
θ
1
+
sin
π
2
−
θ
2
]
⇒
B
=
μ
0
I
4
π
R
X
[
cos
θ
1
+
cos
θ
2
]
⇒
B
=
μ
0
I
4
π
R
X
[
cos
θ
1
+
cos
θ
2
]
In this case, angles on either side of the bisector are equal :
φ
1
=
φ
2
=
φ
φ
1
=
φ
2
=
φ
Magnetic field at a point on perpendicular bisector is :
B
=
μ
0
I
4
π
R
X
[
sin
φ
1
+
sin
φ
2
]
=
μ
0
I
4
π
R
X
2
sin
φ
B
=
μ
0
I
4
π
R
X
[
sin
φ
1
+
sin
φ
2
]
=
μ
0
I
4
π
R
X
2
sin
φ
⇒
B
=
μ
0
I
sin
φ
2
π
R
⇒
B
=
μ
0
I
sin
φ
2
π
R
Let “L” be the length of wire. Then,
sin
φ
=
O
C
P
C
=
L
2
{
L
2
2
+
R
2
}
=
L
L
2
+
4
R
2
sin
φ
=
O
C
P
C
=
L
2
{
L
2
2
+
R
2
}
=
L
L
2
+
4
R
2
Putting in the equation of magnetic field,
⇒
B
=
μ
0
I
sin
φ
2
π
R
=
μ
0
I
L
2
π
R
L
2
+
4
R
2
⇒
B
=
μ
0
I
sin
φ
2
π
R
=
μ
0
I
L
2
π
R
L
2
+
4
R
2
Problem : A square loop of side “L” carries a current “I”. Determine the magnetic field at the center of loop.
Solution : The magnetic field due to each side of the square here is same as Magnetic field due to current in straight wire at a distance L/2 on the perpendicular bisector. The magnetic fields due to current in the four sides are in the same direction. Hence, magnitude of magnetic field due to current in loop is four times the magnetic field due to current in one side :
⇒
B
=
4
X
μ
0
I
L
2
π
R
L
2
+
4
R
2
⇒
B
=
4
X
μ
0
I
L
2
π
R
L
2
+
4
R
2
Here, R = L/2
⇒
B
=
4
X
μ
0
I
L
2
π
L
2
{
L
2
+
4
L
2
2
}
=
4
μ
0
I
L
π
L
2
L
⇒
B
=
4
X
μ
0
I
L
2
π
L
2
{
L
2
+
4
L
2
2
}
=
4
μ
0
I
L
π
L
2
L
⇒
B
=
2
2
μ
0
I
π
L
⇒
B
=
2
2
μ
0
I
π
L
In this case, the angles involved are :
φ
1
=
0
;
φ
2
=
φ
φ
1
=
0
;
φ
2
=
φ
and
⇒
B
=
μ
0
I
4
π
R
sin
0
+
sin
φ
=
μ
0
I
sin
φ
4
π
R
⇒
B
=
μ
0
I
4
π
R
sin
0
+
sin
φ
=
μ
0
I
sin
φ
4
π
R
We can also get the expression for magnetic field in terms of length of wire. Here,
sin
φ
=
O
C
P
C
=
L
L
2
+
R
2
sin
φ
=
O
C
P
C
=
L
L
2
+
R
2
Putting in the expression of magnetic field, we have :
B
=
μ
0
I
L
4
π
R
L
2
+
R
2
B
=
μ
0
I
L
4
π
R
L
2
+
R
2
In case, R = L, then,
⇒
B
=
μ
0
I
L
4
π
L
L
2
+
L
2
=
μ
0
I
4
π
L
2
=
2
μ
0
I
8
π
L
⇒
B
=
μ
0
I
L
4
π
L
L
2
+
L
2
=
μ
0
I
4
π
L
2
=
2
μ
0
I
8
π
L
Problem : A current 10 ampere flows through the wire having configuration as shown in the figure. Determine magnetic field at P.
Solution : We shall determine magnetic field to different straight segments of wires. Let us consider the out of plane orientation as positive. Now, for wire segment AC, the point P is at the end of straight wire of length 4 m and is at a perpendicular linear distance of 4 m. The magnetic field at P due to segment AC is perpendicular and out of the plane of drawing. The magnetic field due to segment AC is :
B
AC
=
2
μ
0
I
8
π
L
=
2
μ
0
I
8
π
X
4
=
2
μ
0
I
32
π
B
AC
=
2
μ
0
I
8
π
L
=
2
μ
0
I
8
π
X
4
=
2
μ
0
I
32
π
For the wire segment CD, the point P lies on the extended line passing through the wire. The magnetic field due to this segment, therefore, is zero.
B
CD
=
0
B
CD
=
0
For the wire segment DE, the angles between the line segment and line joining the point P with end points are known by geometry of the figure. Hence, Magnetic field due to this segment is :
B
DE
=

μ
0
I
4
π
R
cos
θ
1
+
cos
θ
2
=

μ
0
I
4
π
2
X
cos
45
0
+
cos
45
0
B
DE
=

μ
0
I
4
π
R
cos
θ
1
+
cos
θ
2
=

μ
0
I
4
π
2
X
cos
45
0
+
cos
45
0
⇒
B
DE
=

μ
0
I
4
π
2
X
2
2
=

μ
0
I
4
π
⇒
B
DE
=

μ
0
I
4
π
2
X
2
2
=

μ
0
I
4
π
For the wire segment EF, the point P lies on the extended line passing through the wire. The magnetic field due to this segment, therefore, is zero.
B
EF
=
0
B
EF
=
0
For the wire segment GA, the point P is at the end of straight wire of length 4 m and is at a perpendicular linear distance of 4 m. The magnetic field at P due to segment GA is perpendicular and out of the plane of drawing. The magnetic field is :
B
FA
=
2
μ
0
I
32
π
B
FA
=
2
μ
0
I
32
π
The net magnetic field at P is :
B
=
B
AC
+
B
CD
+
B
DE
+
B
EF
+
B
FA
B
=
B
AC
+
B
CD
+
B
DE
+
B
EF
+
B
FA
⇒
B
=
2
μ
0
I
32
π
+
0
−
μ
0
I
4
π
+
0
+
2
μ
0
I
32
π
⇒
B
=
2
μ
0
I
32
π
+
0
−
μ
0
I
4
π
+
0
+
2
μ
0
I
32
π
⇒
B
=
μ
0
I
2
−
4
16
π
⇒
B
=
μ
0
I
2
−
4
16
π
⇒
B
=

2.59
X
4
π
X
10

7
X
10
16
π
=

2.59
X
10

7
X
10
4
⇒
B
=

2.59
X
4
π
X
10

7
X
10
16
π
=

2.59
X
10

7
X
10
4
⇒
B
=

0.65
X
10

6
=

6.5
X
10

5
T
⇒
B
=

0.65
X
10

6
=

6.5
X
10

5
T
The net magnetic field is into the plane of drawing.