# Ampere's Law Differential Form

## Homework Statement

A long cylindrical wire of radius R

Problem Solving 5: Ampere’s Law OBJECTIVES 1. To learn how to use Ampere’s Law for calculating magnetic fields from symmetric current distributions 2. To find an expression for the magnetic field of a cylindrical current-carrying shell of inner radius a and outer radius b using Ampere’s Law. Ampere’s circuital law can be written as the line integral of the magnetic field surrounding closed-loop equals to the number of times the algebraic sum of currents passing through the loop. Suppose a conductor carries a current I, then this current flow generates a magnetic field that surrounds the wire. In this article, we shall study the Ampere’s law and its application in finding magnetic induction due to long straight conductor, solenoid and toroid. Statement: The line integral of the magnetic field B around any closed path is equal to μ 0 times the net steady current enclosed by this path. 0 lies in the z-axis and carries a current density given by:
##j(r)= j_0 left( frac{r}{R_0} right)^2 hat{z} for r< R_0##
##j(r) = 0 elsewhere##
Use the differential form of Ampere's law to calculate the magnetic field B inside and outside the wire.

## Homework Equations

Differential form of Ampere's law: ##nabla times B = mu_0 J##
Curl in cylindrical coordinates:

## Ampere's Force Law

##nabla times B = [frac{1}{r}frac{partial B_z}{partial phi}] hat{r} + [frac{partial B_r}{partial z} - frac{partial B_z}{partial r}] hat{phi} + frac{1}{r} [frac{partial}{partial r} (r B_phi)-frac{partial B_r}{partial phi}]##

## The Attempt at a Solution

Could anyone please explain, in the equation above for curl in cylindrical coordinates, which derivative can be non-zero in this case?
If I take this to be the one involving differentiating φ-component with respect to r, then the answer I get for Bin seems to be correct, but Bout is wrong:
##frac{1}{r} frac{partial}{partial r} (r B_{phi}) = mu_0 j_0 (frac{r}{R_o})^2 implies B_{in}= frac{mu_0 j_0 r^3}{4 R_0^2}##
##frac{1}{r} frac{partial}{partial r} (r B_{phi}) = mu_0 (0) implies B_{out} = frac{C}{r}##​

What should I do here?
P.S. I am checking my answers by comparing them to the ones I've obtained using the integral form of Ampere's law:

## Ampere's Law Derivation

##I_{enc, in} = int^r_0 frac{j_0 r^2}{R_0^2} . 2 pi r dr =frac{j_0 2 pi r^4}{4 R_0^2}, I_{enc, out} = frac{j_0 2 pi R_0^2}{4}##

## Ampere S Law In Differential Form

##therefore oint B_{in} .da =B_{in} 2pi r= frac{j_0 2 pi r^4}{4 R_0^2} implies B_{in}=frac{mu_0 j_0 r^3}{4 R_0^2}, B_{out}=frac{mu_0 j_0 R_0^2}{4 r}##

## Ampere's Circuital Law Differential Form

Any help would be appreciated.