Partial Derivatives of Cartesian and Polar Coordinate Systems Plane polar coordinates, $r$ and $\phi$, and Cartesian coordinates, $x$ and $y$, are related by 
$$x=r\cos\phi,\ y=r\sin\phi,$$
and
$$r^2=x^2+y^2,\ \phi=\tan^{-1}({y \over x}).$$
To try to find the partial derivative $\partial r \over \partial x$, I used two approaches:


*

*Using $x=r \cos \phi$, 
$${\partial x \over \partial r}=\cos \phi,$$
and using ${\partial x \over \partial r}=({\partial r \over \partial x})^{-1},$
$${\partial r \over \partial x}=\frac{1}{\cos \phi}.$$

*Using $r^2=x^2+y^2$,
$$r=(x^2+y^2)^{1/2},$$
$$\frac{\partial r}{\partial x}=\frac{x}{(x^2+y^2)^{1/2}}=\cos\phi.$$


Why are the two answers different? I think the second approach gives the correct answer but I do not understand what is wrong with the first approach. 
 A: Division in partial derivatives is just a notation so $\frac{\partial r}{\partial x} \neq \frac{\partial x}{\partial r}^{-1}$.
A: Sometimes notation causes confusion. You observe that both ${\partial r \over \partial x}=\frac{1}{\cos \phi}$ and $\frac{\partial r}{\partial x}=\frac{x}{(x^2+y^2)^{1/2}}=\cos\phi$ which seems to be a contradiction. Let us analyze what is going on.

*

*You start with $x = r\cos\phi$ which is equivalent to $r = \frac{x}{\cos \phi}x$ and get  ${\partial r \over \partial x}=\frac{1}{\cos \phi}$.


*You start with $r=(x^2+y^2)^{1/2}$ and get $\frac{\partial r}{\partial x}=\frac{x}{(x^2+y^2)^{1/2}}= \frac{x}{r} = \cos\phi$.
The problem is that in 1. and 2. you do not have the same function $r$. In 1. you have a function $r = r(x,\phi)$ and in 2. a function $r = r(x,y)$. Let us write more precisely $r_1(x,\phi) = \frac{x}{\cos \phi}$ and $r_2(x,y) = (x^2+y^2)^{1/2}$ to distinguish them.
The two-variable functions $r_1$ and $r_2$ are very different ($r_1$ is linear in $x$, but $r_2$ is not), so why should their partial derivatives $\frac{\partial r_1}{\partial x}$ and $\frac{\partial r_2}{\partial x}$ (which are again functions of two variables) agree?
The main problem is that they depend on different sets of variables (on $x,\phi$ and on $x,y$, respectively). So what can be done to relate them correctly?
The three variables $x, \phi$ and $y$ are not independent, but related by
$$y = r\sin\phi = x\tan \phi \tag{1}$$
which you ignore in 2. Actually the variable $x$ occurs in hidden form in $r_2$, we have $y = y(x,\phi) = x \tan \phi$, thus $\frac{\partial y}{\partial x}$ is not zero as you assume in 2. To compare $\frac{\partial r_1}{\partial x}$ and $\frac{\partial r_2}{\partial x}$ we must take this into account. Inserting $(1)$ in $(x^2+y^2)^{1/2}$ yields $r = \frac{x}{\cos\phi}$ which cannot be a surprise. Thus we have $r_1 = r_2$ if both functions are expressed in terms of the variables $x, \phi$.
A: 

*

*Using $x=r \cos \phi$,
$${\partial x \over \partial r}=\cos \phi,$$
and using ${\partial x \over \partial r}=({\partial r \over \partial x})^{-1},$

That is not true.  The correct way to invert partial differentials, is to Invert the Jacobian Matrix (though obviously this requires it to be non-singular).
$\qquad\begin{align}\dfrac{\partial\begin{bmatrix}r&\phi\end{bmatrix}}{\partial\begin{bmatrix}x&y\end{bmatrix}}&=\left(\dfrac{\partial\begin{bmatrix}x&y\end{bmatrix}}{\partial\begin{bmatrix}r&\phi\end{bmatrix}}\right)^{-1}\\[1ex]&=\begin{bmatrix}\dfrac{\partial~r \cos\phi}{\partial r}&\dfrac{\partial~r \cos\phi}{\partial \phi}\\\dfrac{\partial~r \sin\phi}{\partial r}&\dfrac{\partial~r \sin\phi}{\partial \phi}\end{bmatrix}^{-1}\\[1ex]&=\begin{bmatrix}\cos\phi&- r\sin\phi\\\sin\phi&r\cos\phi\end{bmatrix}^{-1}\\[1ex]&=\dfrac{1}{r}\begin{bmatrix}r\cos\phi&r\sin\phi\\-\sin\phi&\cos\phi\end{bmatrix}\\[1ex]&=\begin{bmatrix}\cos\phi&\sin\phi\\ -r^{-1}\sin\phi&r^{-1}\cos\phi\end{bmatrix}\end{align}$

So $\dfrac{\partial r}{\partial x}=\cos\phi~$, $\dfrac{\partial r}{\partial y}=\sin\phi~$, $\dfrac{\partial \phi}{\partial x}=\dfrac{-\sin\phi}{r}~$, and $\dfrac{\partial\phi}{\partial y}=\dfrac{\cos\phi}{r}~$.




*Using $r^2=x^2+y^2$,
$$r=(x^2+y^2)^{1/2},$$

Similarly
$\qquad\begin{align}\dfrac{\partial\begin{bmatrix}r&\phi\end{bmatrix}}{\partial\begin{bmatrix}x&y\end{bmatrix}} &=\begin{bmatrix}\dfrac{\partial \surd(x^2+y^2)}{\partial x}&\dfrac{\partial \surd(x^2+y^2)}{\partial y}\\\dfrac{\partial \arctan(y/x)}{\partial x}&\dfrac{\partial \arctan(y/x)}{\partial y}\end{bmatrix}\\[1ex]&=\begin{bmatrix}\dfrac{x}{\surd(x^2+y^2)}&\dfrac{y}{\surd(x^2+y^2)}\\\dfrac{-y}{(x^2+y^2)}&\dfrac{x}{(x^2+y^2)}\end{bmatrix}\\[1ex]&=\begin{bmatrix}\cos\phi&\sin\phi\\ -r^{-1}\sin\phi&r^{-1}\cos\phi\end{bmatrix}
\end{align}$
A: What you are doing using the "inverse" of the derivate, is a property that has the derivation when proceding with bijective functions, this means that they have and inverse function so the derivative of the inverse function is the inverse of the derivative of the initial function. Let me suggest you to read these pages:


*

*Bjective function: https://en.wikipedia.org/wiki/Bijection

*Inverse function theorem: https://en.wikipedia.org/wiki/Inverse_function_theorem
This is, the function $r^2 = x^2 + y^2$ is not bijective, so you can not do the derivative as you proposed in the second case.
