# Magnetostatics - Magnetic field of a nonuniform current slab

#### cmo2978

1. Homework Statement
A thick slab in the region $0 \leq z \leq a$, and infinite in $xy$ plane carries a current density $\vec{J} = Jz\hat{x}$. Find the magnetic field as a function of $z$, both inside and outside the slab.

2. Homework Equations
Ampere's Law: $$\oint \vec{B} \cdot d\vec{l} = \mu_0 I_{\text{enc}}=\mu_0\int_S\vec{J}\cdot d\vec{a}$$
Biot-Savart Law: $$\vec{B}(\vec{r}) = \frac{\mu_0}{4\pi}I\int_C d\vec{l}'\times\frac{\vec{r}-\vec{r}'}{\left|\vec{r}-\vec{r}'\right|^3}$$

3. The Attempt at a Solution
My first approach was to start with the Ampere's Law. If the current density was uniform ($\vec{J}=J\hat{x}$), by symmetry we would have $B=0$ at $z=\frac{a}{2}$ and find the magnetic field:
$$Bl=\mu_0l(z-a/2)J \quad \Rightarrow \quad \vec{B_{\text{in}}} = -\mu_0J(z-a/2)\hat{y}$$
$\dots$
In this case though, with a non-uniform current density, I can't see any symmetry or a way to find a proper Amperian loop to use. Am I missing something here?

Next I thought about using Biot-Savart Law,
$$\vec{B}(\vec{r})\stackrel{?}{=}\frac{\mu_0}{4\pi}\int_V \vec{J}d\tau'\times\frac{\vec{r}-\vec{r}'}{\left|\vec{r}-\vec{r}'\right|^3}$$
which I think is a bit of a ...stretch, since $V$ is infinite.

Related Introductory Physics Homework Help News on Phys.org

Homework Helper
Gold Member
2018 Award
Suggestion is to use Ampere's law and find $d \vec{B}$ for each wire of infinite length (as a function of z), that is located at height $z=z'$. (Each $d \vec{B}$ will have x and y components, but no z component). $\\$The current carried by each $dz$ will be $dI=Jz \, dz$. Incidentally, the current is a surface current, so that it is a current density per unit length, and they would have been better to say that surface current per unit length $\vec{K}=J \, z \, \hat{x}$ , where $J$ is a constant with units of current/unit area.

#### rude man

Homework Helper
Gold Member
I suggest considering a thin sheet within the slab, at z=z. Make the x extent of the slab infinite but restrict the y direction to a length = 2L, making L arbitrarily large but finite.

Now consider an amperian loop extending parallel to the sheet in the y direction & wrapping around x = +/- L above and below the sheet. Can you assume ∫B⋅dl = - 2L J dz along the top and 2L J dz along the bottom of the sheet, ignoring ∫B⋅dl along the z direction above to below the sheet at x= + and -L?

Then sum all the thin sheets' B fields by integration.

#### rude man

Homework Helper
Gold Member
(Each $d \vec{B}$ will have x and y components, but no z component).
The current is traveling along the x direction so no x component of dB.

• Homework Helper
Gold Member
2018 Award
The current is traveling along the x direction so no x component of dB.
I got the geometry momentarily confused, but otherwise my comments are applicable.

#### rude man

Homework Helper
Gold Member
I got the geometry momentarily confused, but otherwise my comments are applicable.
I should have assumed a typo anyway.

I agree that J should have been written J = Jz z i
where Jz = constant = dJ/dz and J is the usual current density in amp/m2.

Other than that I'm not sure what your "wire" is. What is its cross-section?

Not trying to be difficult, just trying to help the OP.