# D/dx in spherical coordinates

1. Aug 27, 2009

### raul_l

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

Hi. I have a simple question. Is it true that $$\frac{\partial r}{\partial x} = (\frac{\partial x}{\partial r})^{-1}$$ ?

Because I'm having some trouble with the conversion between rectangular and spherical coordinates.

2. Relevant equations

$$x = r cos \phi sin \theta$$

$$y = r sin \phi sin \theta$$

$$z = r cos \theta$$

$$r = \sqrt{x^2+y^2+z^2}$$

3. The attempt at a solution

It is easy to show that
$$\frac{\partial r}{\partial x} = cos \phi sin \theta$$

However, we see that
$$(\frac{\partial x}{\partial r})^{-1} = (\frac{\partial (r cos \phi sin \theta)}{\partial r})^{-1}= \frac{1}{cos \phi sin \theta}$$

and these are clearly not equal.

What am I missing?

2. Aug 27, 2009

### tiny-tim

Hi raul_l!

(have a curly d: ∂ )
No, it doesn't work for partial derivatives, because they depend on what the other (unwritten) coordinates are.

∂r/dx keeps y constant, but ∂x/dr keeps θ constant …

and keeping y and θ constant aren't the same!

3. Aug 27, 2009

### raul_l

Yes, I suspected that. Thanks.

But it's weird that if I multiply both sides by $$\frac{\partial x}{\partial r}$$ I get
$$\frac{\partial r}{\partial x} \frac{\partial x}{\partial r} = 1$$
and that seems mathematically correct.

4. Aug 27, 2009

### njama

$$\frac{dx}{dr}=cos \phi sin \theta$$

Proof.

$$r = \frac{x}{cos \phi sin \theta}$$

$$dr=\frac{(x)'cos \phi sin \theta - x(cos \phi sin \theta)'}{cos^2 \phi sin^2 \theta} dx$$

$$dr=\frac{cos \phi sin \theta}{cos^2 \phi sin^2 \theta}dx$$

$$dr=\frac{1}{cos \phi sin \theta}dx$$

$$\frac{dr}{dx}=\frac{1}{cos \phi sin \theta}$$

Is this right, mate ?

Last edited: Aug 27, 2009
5. Aug 27, 2009

### tiny-tim

Sorry, chuck

not unless you're using those weird (x,θ,φ) coordinates.

6. Aug 27, 2009

### njama

Just you need to prove that

$$\frac{dr}{dx} = (\frac{dx}{dr})^{-1}$$

$$(\frac{dx}{dr})^{-1}=(cos \phi sin \theta)^{-1}=\frac{1}{cos \phi sin \theta}=\frac{dr}{dx}$$

I can do science me.

7. Aug 27, 2009

### raul_l

njama, there's a difference between $$\frac{dr}{dx}$$ and $$\frac{\partial r}{\partial x}$$.

Correct me if I'm wrong but I think the left side of what you wrote is equal to
$$\frac{dr}{dx} = \frac{\partial r}{\partial x} + \frac{\partial r}{\partial y} \frac{d y}{d x} + \frac{\partial r}{\partial z} \frac{d z}{d x}$$

while right side is equal to
$$(\frac{dx}{dr})^{-1} = (\frac{\partial x}{\partial r} + \frac{\partial x}{\partial \phi} \frac{d \phi}{d r} + \frac{\partial x}{\partial \theta} \frac{d \theta}{d r})^{-1}$$

and it doesn't look like these would be equal.

Last edited: Aug 28, 2009