From cartesian to cylindrical coordinates I'm reading about determining the magnetic field of a straight conductor. It stated in the book 
$$B_{x}=\frac{\partial A_{z}}{\partial y}, \quad B_{y}=-\frac{\partial A_{z}}{\partial x} \quad \text { und } \quad B_{z}=0$$
The magnetic field in cylindrical coordinates is as follow:
$$B_{r}=\frac{1}{r} \frac{\partial A_{z}}{\partial \varphi} \quad \text { und } \quad B_{\varphi}=-\frac{\partial A_{z}}{\partial r}$$
I tried to derive $B_{r}$ and $B_{\varphi}$ by writing $B_{x}=\frac{\partial \varphi}{\partial y}\cdot\frac{\partial y}{\partial \varphi}\cdot\frac{\partial A_{z}}{\partial y}$. Tho it doesnt get me anywhere.
 A: Recall that $x = r \cos \varphi$ and $y = r \sin \varphi$ in cylindrical coordinates. Using the Chain Rule, we have $$B_r = \frac{\partial B}{\partial x} \frac{\partial x}{\partial r} + \frac{\partial B}{\partial y} \frac{\partial y}{\partial r} = \cos \varphi B_x + \sin \varphi B_y \text{ and}$$ $$B_\varphi = \frac{\partial B}{\partial x} \frac{\partial x}{\partial \varphi} + \frac{\partial B}{\partial y} \frac{\partial y}{\partial \varphi} = -r \sin \varphi B_x + r \cos \varphi B_y.$$ On the other hand, the Chain Rule also gives us that $$\frac{\partial A_z}{\partial r} = \frac{\partial A_z}{\partial x} \frac{\partial x}{\partial r} + \frac{\partial A_z}{\partial y} \frac{\partial y}{\partial r} = -\cos \varphi B_y + \sin \varphi B_x \text{ and}$$ $$\frac{\partial A_z}{\partial \varphi} = \frac{\partial A_z}{\partial x} \frac{\partial x}{\partial \varphi} + \frac{\partial A_z}{\partial y} \frac{\partial y}{\partial \varphi} = r \sin \varphi B_y + r \cos \varphi B_x.$$ From this, I believe that you can convince yourself of the validity of the identities in question.
