Partial derivatives and chain rule explanation.

81 Views Asked by At

I have a function $w=f(x,y)$, where $x=r\cos{\theta}$ and $y=r\sin{\theta}$ and I'm asked to show that $$\frac{\partial w}{\partial x}=\frac{\partial w}{\partial{r}}\cos{\theta}-\frac{\partial{w}}{\partial{\theta}}\frac{\sin{\theta}}{r}$$

I'm not having any trouble with how to tackle the problem. It's very straight forward and I reached a solution, but when I checked the solutions, it had the following line - at this point in the solution, we are after $\frac{\partial\theta}{\partial x}$:

\begin{align*} \tan\theta&=\frac{y}{x}\\ \frac{\partial\theta}{\partial x}\sec^{2}\theta&=\frac{-y}{x^{2}} \end{align*}

I get that the right hand side is the partial with respect to $x$, but my question is, what is going on with the left hand side? Why can one differentiate $\tan\theta$ and also have $\frac{\partial\theta}{\partial x}$?

I'm just after an explanation of this line in the solutions, if possible. I'd really like to understand it properly. Many thanks for your time and patience. I checked quite a few of the suggested questions, but none seemed to contain the question I have (sorry if this is a duplicate).