About derivative of the inverse function I think I misunderstand something about derivative of the inverse function. Say we are transforming from (x,y) to (r, $\theta$), this requires calculating $\frac{\partial x}{\partial r}$.
$$x=rcos \theta$$
$$y=rsin\theta$$
Therefore:
$$\frac{\partial x}{\partial r} = cos\theta$$
And because of derivative of the inverse we have: $$dx/dy = \frac{1}{dy/dx}$$
, however $\frac{\partial r}{\partial x} \neq 1/cos\theta$. It is actually equal to $\frac{\partial r}{\partial x} = \frac{\partial \sqrt{x^2+y^2}}{\partial x} = cos\theta$.
I am not sure where I am going astray, please help if you understand.
 A: What works when you have more than one variable is that the derivative matrix of the inverse mapping is the inverse of the matrix of the original mapping. So here you want the Jacobian matrix of $(x,y)$ with respect to $(r,\theta)$:
\begin{align*}
\frac{\partial (x,y)}{\partial (r,\theta)} &= \begin{bmatrix}\frac{\partial x}{\partial r} & \frac{\partial x}{\partial \theta} \\ \frac{\partial y}{\partial r} & \frac{\partial y}{\partial \theta} \end{bmatrix}
\\ &=\begin{bmatrix} \cos\theta & -r\sin\theta \\
\sin\theta & r\cos\theta\end{bmatrix}
\end{align*}
Then we'll have
\begin{align*}
\frac{\partial (r,\theta)}{\partial (x,y)} &= \begin{bmatrix}\frac{\partial r}{\partial x} & \frac{\partial r}{\partial y} \\ \frac{\partial \theta}{\partial x} & \frac{\partial \theta}{\partial y} \end{bmatrix}
\\ &=\begin{bmatrix} \cos\theta & -r\sin\theta \\
\sin\theta & r\cos\theta\end{bmatrix}^{-1}  = \begin{bmatrix} \cos\theta & \sin\theta \\ -(\sin\theta)/r & (\cos\theta)/r\end{bmatrix}
\end{align*}
You can verify the final result by taking partial derivatives of $r = \sqrt{x^2+y^2}$ and $\theta = \arctan(y/x)$ (up to a constant).
To elaborate slightly, when you try to apply the single-variable rule $dx/dy = \dfrac1{dy/dx}$ when you have more than one variable, you have to consider what partial derivative means. If you take $\partial r/\partial x$, you are computing the rate of change of $r$ as you vary $x$ with $y$ fixed. When you compute $\partial x/\partial r$ you are computing the rate of change of $x$ as your vary $r$ with $\theta$ fixed. What if you tried to compute the derivative of $x$ with respect to $r$ fixing $y$ instead? This means that we are keeping $r\sin\theta$ constant, say $r\sin\theta=c$, so, assuming we have $0<\theta<\pi/2$ for concreteness, that will mean that $x=r\cos\theta=r\sqrt{1-(c/r)^2}$. I'll leave you to check that $\dfrac{dx}{dr} = \dfrac 1{\sqrt{1-(c/r)^2}} = \dfrac xr = \dfrac1{\partial r/\partial x}$, as you'd hoped.
By the way, physical chemists (and others) often use the notation $\left(\dfrac{\partial x}{\partial r}\right)_y$ to indicate explicitly what variables are being held constant. Now you can appreciate why.
