A
small element
of
a thin wire carrying a conventional current I
produces a small magnetic field
at
a point P given by the formula
,
where
is
the vector distance from the element to the field point P where we want
to
calculate the field (see Figure 1). We find the total magnetic field
due to a current-carrying
wire by considering it to be made up of many infinitesimally small
pieces of
length
each
containing the same current I (see Figure 2). Note
that
will
be different for each different piece of the wire. We will need to sum
up each
infinitesimal contribution via an integral.


· First note that your answer can only have the symbols given in the question.
· Choose a coordinate system and origin. If there is a lot of symmetry, put the origin at the symmetry point.
·
If the wire
lies on the x axis in your
coordinate system, then choose an arbitrary piece of the wire and say
it is
distance x from the origin – x
is your variable of integration. The
size of the piece will then be
.
Use positive +i if the current
flows in that direction and –i
otherwise. Note that x should be an arbitrary
positive point – not the
ends or middle.
· The limits of integration are the values of x for the ends of the wire.
·
The vector
distance
should
be expressed in i j k notation.
In general each component
of
will
depend the variable x.
·
The magnitude
of the vector
,
R, is found using the Pythagorean identity
.
·
The magnetic
field is thus given by 
·
Evaluate the
cross-product, ×,
using the
mnemonic
·
Note that the
term
in the equation for the magnetic field always equals zero.
Find both the magnetic field due a straight wire of length L carrying conventional current I to the right at a point P a distance b to the right and 2b above the right end of the wire as shown in the diagram below.

First set up the axis and identify limits of integration.

Second,
choose an arbitrary piece of the
wire of length dx, label its location as x.
Since the current is
to the right,
.

Third,
identify
in
the drawing and express it in i j k
notation.

Your magnetic field is thus
.
Note that the magnetic field is directed out of the page in agreement with the right-hand rule.
If the wire is a circular arc with radius or curvature r then the natural variable of integration is the angle θ measured from the centre of the radius or curvature. The limits of integration will be start and end angles of the wire.
There are a number of steps to properly constructing the integral for a curved wire.
· First note that your answer can only have the symbols given in the question.
· Choose a coordinate system and put the origin at the centre of the radius of curvature.
· Choose an arbitrary piece of the wire at an angle q from the positive x axis – θ is your variable of integration. Note that θ should be an arbitrary positive angle – not the ends or middle.
·
The size of
the arbitrary piece is
.
The vector direction of the piece requires some work. In the diagram
below
is
moved to origin. Simple trigonometry indicates that it makes an angle q with the y
axis. As a result we have the identity
.
Note that θ
must be measured from the positive x-axis. Use + in
the
identity for counterclockwise currents and – for clockwise
currents. You may
always use this identity; there is not need to rederive it.

·
The vector
distance
should
be expressed in i j k notation.
In general each component
of
will
depend the variable θ usually in the form of cosθ or sinθ.
·
The magnitude
of the vector
,
R, is found using the Pythagorean identity
.
·
The magnetic
field is thus given byθ
.
· If symmetry indicates that one of the components is zero, you should indicate which it is.
· Always check the direction of the field using the right-hand rule.
θ
Find both the magnetic field due to a curved semicircle of wire of radius r carrying counterclockwise conventional current I at a point P which a distance 2b to the right and b above the right end of the wire as shown in the diagram below.

First set up the axis with the origin at the centre of curvature
.
Second, choose an arbitrary piece of the wire of the curve and label its location as θ. Since the current is counterclockwise,
.
Identify the limits of integration from the start and end angles of the
wire.

Third, identify
in
the drawing and express it in i j k
notation using cosθ and sinθ.

.
Note that the magnetic field should be directed into the page according to the right-hand rule, so the integral should be negative.