# Homework Help: Inverting the gradient operator

1. Sep 4, 2009

### Bacat

1. The problem statement, all variables and given/known data

I have a derivation for an equation here:

Basically, I need to invert the gradient operator, so I have:

$$\nabla B = k_z$$

k is known and I want to solve for B numerically. How do I get rid of the gradient operator? Do I integrate? If so, in 3D or 1D? With respect to what? Time or space?

If $$k_z$$ is a vector that lies completely in the z-axis, does that change how I un-operate the gradient operator on B?

2. Relevant equations

$$\nabla = (\frac{d}{dx}, \! \frac{d}{dy}, \! \frac{d}{dz})$$

3. The attempt at a solution

See the link for the derivation I've done:

2. Sep 4, 2009

### Dick

Pick a point and define B(x)=0. Define the value of B(y) at any other point y to be the path integral of k from x to y along ANY path connecting x and y. You do have to check that this definition is independent of the choice of path. How would you check that?

3. Sep 4, 2009

### HallsofIvy

So you are saying that
$$\nabla B= \frac{\partial B}{\partial x}\vec{i}+ \frac{\partial B}{\partial y}\vec{j}+ \frac{\partial B}{\partial z}\vec{k}= k_z \vec{k}$$

Is your "kz" constant or a function of x, y, and z?

In any case, you have
$$\frac{\partial B}{\partial x}= 0$$
which says that B does NOT depend on x,

$$\frac{\partial B}{\partial y}= 0$$
which says that B does NOT depend on y, and

$$\frac{\partial B}{\partial z}= k_z$$
It should be clear that kz cannot depend on either x or y (because then B would depend on them) so you must have
$$\frac{dB}{dz}= k_z$$
B is just the anti-derivative of kz.

4. Sep 4, 2009

### Bacat

HallsOfIvy,

Yes, that is exactly what I'm saying. The magnetic field, B, varies only along z, so it is constant in x and y. Your formalism for it makes a lot of sense to me now.