# Jackson 5.10 topic problem

dingo_d

## Homework Statement

There is one thing I'm not getting in this problem. It's about uniformly magnetized sphere. In solving the problem with formula for magnetic potential:

$$\phi_M=-\nabla\cdot\int\frac{\vec{M}}{|\vec{r}-\vec{r}'|}d^3r'$$

At one point a change of variable for differentiation is made

$$\frac{\partial}{\partial z}=\frac{\partial r}{\partial z}\frac{\partial}{\partial r}$$

And he says that $$\frac{\partial r}{\partial z}=\cos\theta$$. But I can't see that. If I'm using the formula for spherical coordinate system transformation: $$z=r\cos\theta$$ I don't get just cosine, I get 1/cosine :\

So what formula is he using?

Thanks

rafaelpol
He is using $r = \sqrt {x^2 + y^2+z^2}$, and then
$\frac{\partial r}{\partial z} = \frac{z}{r} = cos{(\theta)}$

Since $$r = \sqrt{ x^2 + y^2 + z^2}$$,
$$\frac{\partial r }{\partial z} = \frac{z}{r},$$