I am actually doing a question that involves the conversion of cartesian to polar coordinates and I am stuck at a partial derivative part.
Given $r= \sqrt{x^2+y^2}$, $\phi = \tan^{-1} \frac{y}{x}$, I am finding partial derivative with respect to $y$.
According to my teacher's working:
$(\frac{\partial \phi}{\partial y})_x = (\frac{\partial \tan \phi}{\partial y})_x \frac{d\phi}{d\tan \phi} = \frac{1}{x} \cos^2 \phi$
What is actually going on here? I could not understand it. I understand that the partial derivative of $\phi$ with respect to $y$ involves only differentiating the $y$ component
Here are the hidden steps your teacher did : $$ \begin{array}{rclll} \displaystyle\frac{\partial\phi}{\partial y} &=& \displaystyle \frac{\partial(\tan\phi)}{\partial(\tan\phi)}\cdot\frac{\partial\phi}{\partial y} \\ &=& \displaystyle \frac{\partial(\tan\phi)}{\partial y}\cdot\frac{\partial\phi}{\partial(\tan\phi)} \\ &=& \displaystyle \frac{\partial (y/x)}{\partial y}\cdot\left(\frac{\partial(\tan\phi)}{\partial\phi}\right)^{-1} \\ &=& \displaystyle \frac{1}{x}\cdot\left(\frac{1}{\cos^2\phi}\right)^{-1} \\ &=& \displaystyle \frac{\cos^2\phi}{x} \end{array} $$
Alternatively, you can prove this result by differentiating directly the relation $\tan\phi = \frac{y}{x}$ with respect to $y$, i.e. $\frac{1}{\cos^2\phi}\frac{\partial\phi}{\partial y} = \frac{1}{x}$.
Finally, it is to be noticed that all this circumvention is made to avoid to compute the derivative of $\arctan$, but its expression wouldn't be that difficult to handle, knowing that $\arctan'(x) = \frac{1}{1+x^2}$.