we have so far talked about electrostatic
that mainly concerned with electric field
due to charges we are now going to change
spheres and go to discuss magneto statics
and see how the magnetic field 
can be dealt with just to give you a little
background the way magnetic field came about
was through magnets and if one took a bar
magnet you may have done it in school take
two sides n and s and if i plot it the field
lines around it they look like this how do
you plot the field lines remember in electric
field represented force on a charge by the
field
in magnetostatics magnetic field is identified
by torque on a magnetic compass needle so
that if you put it in a magnetic field turns
around right that's how i know there is a
magnetic field so to plot these magnetic lines
one puts a compass and draws arrows going
from south to north of the compass what is
found is that these magnetic lines pretty
much follow the same pattern as the field
due to an electric dipole so it makes sense
to define a magnetic dipole alright and i
can say that magnetic field which i am going
to denote by b b r is going to be some constant
which will depend on the units the net magnetic
dipole moment dotted with r r three minus
m divided by r cubed this is in parallel with
the way we defined electric field for an electric
dipole which was one over four pi epsilon
zero which i am representing by c for the
case of magnetic field three p dot r r minus
p over r cubed so that's one
the other thing which is observed about magnetic
field is that there are no points where the
field converges to or diverges from that means
although in the electric field you saw the
charge q gave you free line like this in magnetic
case you never find a point where it happens
magnetic field lines always close on each
other and this means that there is no free
magnetic pole unlike the charges alright so
that is one difference although the formula
for the magnetic field may look similar to
the formula for the electric field of a dipole
but there are no free magnetic poles one thing
you notice from this is therefore the divergence
of b will always be zero because divergence
refers to source and in this case happens
to be no independent source from where all
the lines are coming from or where all the
lines are converging
what about curl of b 
again if i look at the lines it appears that
they never close on themselves if certain
field lines do not close on themselves that
means that b dot d l will not be zero and
therefore by stokes theorem del cross b may
not be zero alright so from these observations
what we see is that for a magnetic field or
dipoles i can write b r as some constant as
mu zero over four pi three r dot m r minus
m over r cubed there are no magnetic monopoles
and therefore divergence of b is zero lines
close on themselves therefore curl of b is
not equal to zero hm that means i also cannot
write b as minus grad some v magnetic i cannot
do that alright this is where the study of
magnetic field would have stopped if a new
connection was not found and that connection
was found by oersted who found that magnetic
field is produced by currents
so next experimental observation is that magnetic
field is produced by currents not only that
one could find the formula of how this is
so if i have a current loop carrying current
i or a large current element so it always
remember it always closes on itself then the
total b at point r can be written as mu zero
over four pi these constants were fix later
according to units i d l cross r minus r prime
over r minus r prime cubed let me write it
again neatly here this is equal to mu zero
over four pi i d l let me also put d l prime
so that it denotes the the point of integration
cross r minus r prime over r minus r prime
cubed so let's see what does it mean
suppose i look at the first case first loop
here and i want to see the field at this point
which is let's say at distance r what i'll
do is i'll take a small element here in the
direction of the current d l so direction
of the current or d l prime direction of the
current decides which directions that d l
is this is at r prime the vector from this
to my position where i want to find the magnetic
field is r minus r prime i'll calculate add
all these small small things and add them
together and that gives me the [neck/net]-net
magnetic field so at this point if i take
d l which is in the direction of the plane
of this paper in this direction this is the
direction of r so d l cross r if i take that
cross product it will give me something going
in so this will produce a field going in and
i add these small small contributions due
to the entire loop and that gives me the net
magnetic field this is known as the bio savart
law
one thing i must point out here that this
law is valid for steady currents only by steady
means the current is not changing with time
if current changes with time new terms come
in which we'll see later for the time being
for a steady state current you find that the
magnetic field is given by this formula the
moment this happens now you can have in lot
and lot of more studies because now you have
a formula from which you can derive various
properties of magnetic field so this gave
a jump to the steady of magnetic fields quite
a bit
let's take some examples of bio savart law
as a first example i take a long wire it may
close from outside coming from a distance
so that will not affect things and want to
calculate the field at a distance let's say
x by taking this direction to be x and direction
of the wire to be y i want to calculate the
field at a distance x from the wire we are
taking this plane to be x y plane if i take
a small element d l prime its distance from
x is going to be and this is at distance y
is going to be square root of x square plus
y square so b at x vector is going to be mu
zero over four pi i is outside d l prime cross
r minus r prime over r minus r prime cubed
which i can write as mu zero i over four pi
integral d l prime is nothing but d y in the
y direction cross r is nothing but at distance
x in the x direction minus y prime is y in
the y direction divided by x square plus y
square raise to three by two
notice that i did not have to write prime
out here but if you like i can write prime
here prime here denoting that prime is actually
where i am integrating and prime here and
no unprimed variables are those where i am
calculating this can be further written as
mu zero over i over four pi y prime varies
from minus infinity to infinity d y prime
y cross x gives me z with a minus sign x y
cross y gives me zero divided by x square
plus y prime square raise to three by two
so this gives me minus mu zero i over four
pi z you can do the integration very easily
by substituting y prime equals x tangent theta
and you'll get an answer of two over x here
so that the final result is minus mu zero
i over two pi x z
so at this point a field goes in the minus
z direction x cross y z is coming out of the
paper so it's going into the paper if you
calculate at this point it will be coming
out since this is an infinitely long wire
this point where it is it doesn't really matters
so all over the field is going in coming out
on this side and this magnitude is mu zero
i over two pi x as a second example let me
take a ring of wire ring of current let's
say in the x y plane so this is x this is
y and i am calculating field at some point
z at the height z of it this has a current
going in phi direction since this is ah in
phi direction it's easy to use the cylindrical
coordinates
now let see if i calculate the field at point
z due to the line element here and a line
element here you can easily see that d l cross
r will give a field going like this let me
make it here this point will give me a field
in this direction and this point the current
is coming out this will give me a field in
this direction so that two opposite ends will
keep cancelling this horizontal component
and net field is going to be in the vertical
direction along the x axis so let's calculate
that
what i'll do is i'll calculate the z component
and add it this distance is r current is i
and this distance is going to be square root
of r square plus z square this height is z
let this angle be theta so that this angle
is also theta so you can see that b z component
is going to be integration d l prime since
the direction of current and the vector r
minus r prime is perpendicular so this is
going to be over r minus r prime cube r minus
r prime cross ok and i am taking its magnitude
and cosine theta component and i'll add it
up mu zero i over four pi ok so let me say
it again i am taking the field due to these
small elements and adding it up taking only
the z component this can be written as mu
zero i over four pi integration this distance
is nothing but r minus r prime cubed modulus
r minus r prime this is also modulus but we
have already said this is going to give me
d l prime over square plus z square because
this together gives me one over mod r minus
r prime square cosine theta is going to be
r over square root of r square plus z square
so this gives me mu zero i over four pi times
two pi r times r over r square plus z square
raise to three by two which is mu zero i over
two r square over r square plus z square raise
to three by two and it's in the z direction
upper half plane and same direction here also
as you can see easily by taking the vector
product
let us do this in cylindrical coordinates
in cylindrical coordinates they coordinate
where the element d l prime is is nothing
but r phi so you're going to have b is equal
to mu zero i over four pi integration d l
prime is going to be r d phi prime in the
phi direction or phi prime direction cross
r minus r prime is going to be z z direction
minus r 
r direction divided by 
z square plus r square raise to three by two
which is r minus r prime cubed which gives
me mu zero i over four pi integration r d
phi prime over z square plus r square raise
to three by two inside phi prime cross z phi
prime cross z gives me r prime unit vector
minus phi prime cross r prime phi prime cross
r prime gives me minus z unit vector so this
will become plus z r that's the answer alright
now integration r prime d phi prime is zero
because r prime vector has cosine prime and
sine phi prime and the other integration gives
you two pi and therefore the final answer
comes out to be mu zero i over four pi this
first term as i already said gives you zero
r times two pi times r over r square plus
z square raise to three by two same as before
so we have to solve two examples of getting
magnetic field using bio savart's law where
we calculate one the field due to a long wire
and two the field due to a ring of wire remember
these formulas are valid only if the current
is steady
