we have been talking about ah vector potential
and how do we calculate it using the magnetic
field what we have done so far is that for
a vector potential we know that curl of a
is equal to b at that point and therefore
what we have done so far is calculated the
explicit expression for curl of a and equated
the components to the corresponding 
components of b off course you maybe be wondering
if we know the magnetic field b why are we
calculating a then because [calculate/calculating]-calculating
a potential is suppose to make calculation
of the field easier as we saw in the case
of electric field
the idea right now is to get a feel for the
vector feel vector potential for a given magnetic
field later we will see how we calculate a
vector potential directly from a given current
distribution but for the time being so far
i'll call this now method one that we've used
there's another way of calculating the the
vector potential so we'll be discussing that
today making use of stokes theorem recall
that stokes theorem relates the line integral
of a vector around a closed path so this line
integral is written as so let's say this is
a a dot d l it relates it to the surface integral
of the curl of this vector curl of a dot d
s where we take the direction of the surface
element according to the right hand convention
that is if my fingers go ah around d l my
thumb gives the direction of d s
let us now apply this to the magnetic field
and in that case what we will see is that
a dot d l is equal to curl of a dot d s but
curl of a is nothing but the magnetic field
and therefore this s let me enclose this here
therefore what we learn from this is that
if i take around a close path the line integral
or vector potential a it is equal to the magnetic
flux passing through the area enclosed by
the curve and this we can make use of in calculating
the vector potential particularly in those
situations where the there's some sort of
a symmetry
we'll off course be making use of stokes theorem
later in calculating other quantities and
here we want to focus strictly on calculating
so use the vector potential of stokes theorem
to calculate vector potential so what we'll
be doing in this is given a situation take
a path depending on if it depends only on
the cylindrical coordinate s i'll take a circular
path or depending on the situation some other
path calculate a dot d l and equate this to
the flux passing through that the the area
covered by that path and that'll give give
us the vector potential
i'll be solving two examples with this one
will be better vector right these are the
examples two examples one will be vector potential
for a solenoid carrying certain current and
two vector potential 
for a current carrying wire in example one
i'll be taking a solenoid which has n turns
per unit length and is carrying current i
so that the magnetic field for this b its
magnitude is given as mu zero n i so to calculate
the vector potential for this solenoid let
us now write these in terms of vectors so
i'll take the axis of the current to be the
z direction and therefore this becomes solenoid
of radius r phi directions so i have b is
equal to mu naught n i in the z direction
alright
now by analogy ok now these that i was drawing
if i have a current going in the z direction
i have b which goes around in phi direction
so j in z direction gives b magnet sorry not
current magnetic field in phi direction i
earlier said j in z direction gives current
in phi directions j in z direction gives b
in phi direction by analogy if i look at this
equation del cross a equals b now j gets replaced
by b and b gets replaced by a and b is in
z direction again so i can anticipate by again
same form of the equation that a will also
be in the phi direction so what i anticipate
now this implies by analogy with this that
a would actually be some a phi in the phi
direction
so let me now choose a loop around the solenoid
and calculate a dot d l on this loop and they
should be equal to the flux passing through
this loop a dot d l is going to be nothing
but a phi times two phi s where two pi s is
the length since a is in phi direction i get
only a phi this is going to be equal to pi
r square b which is equal to pi r square mu
naught n i and therefore for let me write
this result in black now s greater than r
the radius of the solenoid a vector is pi
actually i can cancel this pi right here so
i get r square mu naught n i over two s in
phi direction that is a vector ah vector potential
outside the solenoid
how about inside let me make this again this
is b for inside i'll take a loop like this
going in pi direction again a will be in phi
direction because this is like a distributed
source of current giving rise to b here i
have distributed b giving rise to a so i have
a phi times two pi s and now the flux is going
to be pi s square times b which is equal to
pi square mu naught n i and from this again
i am going to cancel pi and i get a vector
is equal to s mu naught n i divided by two
in the phi direction for s less than r you
can put less than or equal to so i have got
my final answer that a is equal to s mu naught
n i by two phi for s less than equal to r
and is equal to r square mu naught n i over
two s phi for s greater than or equal to r
off course at r equal to s equals r they are
both equal
let's check the answer it should give me correct
a correct ah magnetic field b so curl of a
since a is in only phi direction and i also
know that the final answer is in the z direction
i can write only the z component of this the
z component of this is given by partial s
s a phi minus partial a s over partial phi
one over s outside in the z direction and
you can see already that for s greater than
r this gives b equal to zero and for s less
than it gives b equals mu naught n i z you
can take the other components and cylindrical
coordinates and check for yourself that they
are indeed zero
let me take another example that of a current
carrying wire a current carrying wire long
wire that carries a current i in this case
we have already calculated b if i take this
direction to b the z direction in which the
current is going b is nothing but mu naught
over 2 pi s i in the phi direction again by
analogy with the current producing a magnetic
field let me draw it on the right side of
your screen when i take del cross b equals
mu naught j and suppose i had a current going
over a disc what kind of feel do i expect
if it is all its in a cylinder the feel i
expect in this case is nothing but b feel
going up right we just now solved the solenoid
case and that's precisely what this is
similarly in this case i should now anticipate
that my a would be going up like this and
therefore i choose a path which is going like
this and goes all the way to infinity and
closes there off course then i am going to
assume that a at infinity is zero if i choose
at this path and now apply stokes theorem
it gives me a dot d l over this path is equal
to flux through the area let me take the height
of this to be l this is starting from s so
that flux and since the the the right hand
fingers are going clockwise the area element
is also going in so b dot d s is positive
and therefore flux is positive this comes
out to be l mu naught n i o there's no n mu
naught i over two pi s prime then i am going
to have this area element which is going to
be l d s prime and this integrates from s
to infinity which comes out to be l i have
already taken care of so i'll remove this
l i'll remove this also this comes out to
be l mu naught i over two pi log of s prime
s and infinity discarding the infinite value
this comes out to be minus l mu naught i over
two pi log of s
how about the left hand side the left hand
side the only contribution for a since its
in z direction comes from this particular
vertical path and therefore this is going
to be a at s times l and you can clearly see
then by cancelling terms if i cancel this
l that final answer a s comes out to be the
vector minus mu naught i over two pi log of
s in the z direction the answer we are obtained
earlier so i have done two examples of using
the curl equation for b along with the stokes
theorem to calculate b this method is just
to get a feel for what a looks like it is
it'll not it is not useful to calculate b
because right now we are calculating a from
b so i already know the answer for magnetic
field what would be useful if i could calculate
a directly in terms of the current and then
a would be useful in calculating b
however before i end this lecture i just want
to push that analogy that i have been drawing
between curl of a equals b and curl of b mu
naught j a bit and see that this equation
actually in free space gives me the answer
for b as mu naught over four pi integral j
r prime cross r minus r prime over r minus
r prime cube d b prime where d b prime is
the integral over the current can i in a similar
manner therefore write a at r is equal to
one over four pi integral b at r prime cross
r minus r prime over r minus r prime cube
d b prime
again emphasizing since the equations are
the same only the symbols have changed the
answers should be the same for example we've
used this equation already by using the flux
of b to calculate a our case of this would
be if i have a torrid which is like a sole[noid]-solenoid
went onto itself so it has these wires going
around that carry current if the solenoid
is very thin right suppose this is this solenoid
or the torrid is very thin it becomes like
a flux carrying ring can i then calculate
a on the axis just like i calculated magnetic
field for a current carrying wire can i then
calculate a at this point by treating the
flux phi going through this ring as ring of
flux and then applying this formula
this i'll give as an exercise later and we
will again see in coming lectures that this
kind of similarity of equations these two
same answers or same expressions for the answers
and that becomes a very useful way of visualizing
different feels
