# Mixed up over spherical coordinates

So messing about with spherical coordinates, I wanted at some point to get the expressions for $\frac{\partial r}{\partial x}$ and $\frac{\partial x }{\partial r}$; using the convention:

$$\left\{ \begin{array}{c} x = r \text{ cos} \theta \text{ sin} \phi \\ y = r \text{ sin} \theta \text{ sin} \phi \\ z = r \text{ cos} \phi. \\ \end{array} \right.$$

For $\frac{\partial x }{\partial r}$ I do:

$$\frac{\partial{} }{\partial r} [r \text{ cos} \theta \text{ sin} \phi] = \text{ cos} \theta \text{ sin} \phi.$$

For $\frac{\partial r }{\partial x}$, I use:

$$r^2 = x^2 + y^2 + z^2$$ $$\rightarrow \frac{\partial}{\partial x} [r^2] = 2 r \frac{\partial r }{\partial x} = 2 x$$ $$\rightarrow \frac{\partial r }{\partial x} = \frac{x}{r} = \frac{r \text{ cos} \theta \text{ sin} \phi}{r} = \text{ cos} \theta \text{ sin} \phi.$$

How come I get the same for both?

• Isn't $x = r \cos \theta \sin \phi$? – David G. Stork Feb 9 '17 at 19:47
• I measured $\theta$ from the x axis toward the y axis (like in the polar coordinates), and $\phi$ from the xy plane toward the position vector - comparing with the book I see they swap around $\phi$ and $\theta$ but they are just labels for the same thing as far as I can see – shost71 Feb 9 '17 at 22:10
• I urge you to use traditional notation, so that the limits are traditional as well. (The traditional limits on $\phi$ and $\theta$ are of course not the same. – David G. Stork Feb 9 '17 at 22:13
• I.e. I get $\text{ cos} \phi}$ because I measure $\phi$ from the "floor" instead of from the z-axis. But shouldn't it all add up anyways? – shost71 Feb 9 '17 at 22:13
• I'll edit the question to use traditional notation – shost71 Feb 9 '17 at 22:15