How does this application of the chain rule work? 
*

*Let $\bar{x_1} = x_1 \cos(x_2)$ and $ \bar{x_2} = x_1 \sin(x_2)$
Suppose that $f:\mathbb{R}^{2} \to \mathbb{R}^{2}$ is a smooth function of $\bar{x_1}$ and $\bar{x_2}.$ Show that: $(\frac{\partial{f}}{\partial\bar{x_1}})^2+(\frac{\partial{f}}{\partial\bar{x_2}})^2 = (\frac{\partial{f}}{\partial{x_1}})^2+ \frac{1}{x_1^2}(\frac{\partial{f}}{\partial{x_2}})^2$.


Using the Chain Rule: $\frac{\partial{f}}{\partial{x_1}} = \frac{\partial{f}}{\partial{\bar{x_1}}} \frac{\partial{\bar{x_1}}}{\partial{x_1}}  + \frac{\partial{f}}{\partial{\bar{x_2}}}\frac{\partial{\bar{x_2}}}{\partial{x_1}}$
 and $\frac{\partial{f}}{\partial{x_2}} = \frac{\partial{f}}{\partial{\bar{x_1}}} \frac{\partial{\bar{x_1}}}{\partial{x_2}}  + \frac{\partial{f}}{\partial{\bar{x_2}}}\frac{\partial{\bar{x_2}}}{\partial{x_2}}$
$\frac{\partial{\bar{x_1}}}{\partial{x_1}} = \cos{x_2}$, $\frac{\partial{\bar{x_2}}}{\partial{x_1}}=  \sin{x_2
}$, $\frac{\partial{\bar{x_1}}}{\partial{x_2}} = -x_{1}\sin{x_2}$, $\frac{\partial{\bar{x_2}}}{\partial{x_2}} = x_{1}\cos{x_2}$
$\partial_{x_1}{f} = \cos{x_2}\partial_{\bar{x_1}}{f}+\sin{x_2}\partial_{\bar{x_2}}{f}$
$\partial_{x_2}{f} = -x_{1}\sin{x_2}\partial_{\bar{x_1}}{f}+x_{1}\cos{x_2}\partial_{\bar{x_2}}{f}$
$(\partial_{x_1}{f})^{2} = (\frac{\partial f}{\partial \bar{x}_1} \cos{x_2}+\frac{\partial f}{\partial \bar{x}_2} \sin{x}_2) ^{2} = (\frac{\partial f}{\partial \bar{x}_1}) ^{2} \cos^{2}x_2 + 2 \frac{\partial f}{\partial \bar{x}_1} \frac{\partial f}{\partial \bar{x}_2} \cos{x}_2 \sin{x}_2+(\frac{\partial f}{\partial \bar{x}_2})^{2}\sin^{2}x_2$
$(\partial_{x_2}{f})^{2} = (\frac{\partial f}{\partial \bar{x}_1} (-x_1\sin x_2) + \frac{\partial f}{\partial \bar{x}_2}x_1\cos x_2)^{2} =  \frac{\partial f}{\partial \bar{x}_1}^{2}(x_1^{2}\sin^{2}x_2)+2\frac{\partial f}{\partial \bar{x}_1}\frac{\partial f}{\partial \bar{x}_2}(-x_1\sin x_2)(x_2\cos x_2) + (\frac{\partial f}{\partial \bar{x}_2})^{2}x_1^{2}\cos^{2}x_2$
$\frac{\partial f}{\partial \bar{x}_2}^{2} = (x_1)^{2}[(\frac{\partial f}{\partial \bar{x}_1})^{2}\sin^{2}x_{2}-2\sin x_2\cos x_2 \frac{\partial f}{\partial \bar{x}_1}\frac{\partial f}{\partial \bar{x}_2}+(\frac{\partial f}{\partial \bar{x}_2})^{2}\cos^{2}x_2]$
So $(\frac{\partial f}{\partial x_1})^{2}+ \frac{1}{x_1^{2}}(\frac{\partial f}{\partial x_2})^{2} = \frac{\partial f}{\partial \bar{x}_1}^{2}(\cos^2 x_2 + \sin^2 x_2) + (\frac{\partial f}{\partial \bar x_2})^2(\sin^2 x_2+\cos^2 x_2)$
$= (\frac{\partial f}{\partial \bar{x}_1})^{2}+(\frac{\partial f}{\partial \bar{x}_2})^{2}$
When solving for $\frac{\partial f}{\partial x_1}$, isn't $x_1$ dependent on $x_2$ and $\bar{x}_1$ and $\bar{x}_2$? So why is his $\frac{\partial f}{\partial x_1}$ formulated in a way that does not include $x_2$? And also My professor only showed the right side of the equation without expanding the LHS. How would someone know that both the RHS and LHS are equivalent without the answer? Would they need to expand the LHS to see? and if you were to expand the LHS, how would $\frac{\partial f}{\partial \bar{x}_1}$ look?
 A: In general, problems like this are tough in part because $f$ means two different things. So let's clear that up (and simplify the notation a bit). 
I'm going to replace the barred variables with a new name:
$$
u_1(x_1, x_2) = x_1 \cos x_2 \\
u_2(x_1, x_2) = x_1 \sin x_2.
$$ 
Now let $F: \Bbb R^2 \to \Bbb R: (c_1, c_2) \mapsto f(c_1, c_2)$, and define
$$
F(x_1, x_2) = f(u_1(x_1, x_2), u_2(x_1, x_2))
$$
The only remaining tricky thing is what to call the partial derivatives of $f$. As I've written it, they should probably be called 
$$
\frac{\partial f}{\partial c_1}\\
\frac{\partial f}{\partial c_2}
$$
but $c$ was just a name I chose to not conflict with other names. More typical would be to write $f$ as a function of two arguments named $u_1$ and $u_2$, but then $u_1$ and $u_2$ are both dummy arguments of the function $f$ and also functions of $x_1$ and $x_2$, and that's another name-clash that's likely to confuse folks. 
I'm instead going to write $\partial_1 f$ to mean "the derivative of $f$ with respect to its first argument", and similarly for $F$. Now the chain rule reads like this
$$
\partial_1 F (x_1, x_2) = \partial_1 f(u_1(x_1, x_2), u_2(x_1, x_2)) \cdot \color{red}{\partial_1 u_1 (x_1, x_2) }+ \partial_2 f(u_1(x_1, x_2), u_2(x_1, x_2)) \cdot \color{red}{\partial_1 u_2 (x_1, x_2)}\\
\partial_2 F (x_1, x_2) = \partial_1 f(u_1(x_1, x_2), u_2(x_1, x_2)) \cdot \color{red}{\partial_2 u_1 (x_1, x_2)} + \partial_2 f(u_1(x_1, x_2), u_2(x_1, x_2)) \cdot \color{red}{\partial_2 u_2 (x_1, x_2)}.
$$
The claim being made is then that 
$$
[\partial_1 F (x_1, x_2)]^2 + \frac{1}{x_1^2} [\partial_2 F (x_1, x_2)]^2
= (\partial_1{f}(u_1(x_1, x_2), u_2(x_1, x_2)))^2+ (\partial_2{f}(u_1(x_1, x_2), u_2(x_1, x_2)))^2.
$$
The nice thing is that the partials of $u_1$ and $u_2$, highlighted in red above, are easy to compute. If you do that, and leave out the arguments for all the partials, the equations above become
$$
\partial_1 F  = \partial_1 f \cdot \color{red}{\cos x_2 }+ \partial_2 f \cdot \color{red}{\sin x_2}\\
\partial_2 F  = \partial_1 f \cdot \color{red}{-x_1 \sin x_2 }+ \partial_2 f \cdot \color{red}{x_1 \cos x_2}\\
\frac{1}{x_1} \partial_2 F  = -\partial_1 f \cdot \color{red}{\sin x_2 }+ \partial_2 f \cdot \color{red}{\cos x_2}\\
$$
Sum the squares of the left-hand sides of the first and third equations to get the left-hand side of the "claim" above. What's that get you? A bunch of partials of $f$, mutliplied by sines and cosines. Simplifying, you get some $\sin^2 + \cos^2 $ terms, which can be replaced by $1$. You also get some products of $\sin$ and $\cos$, but with opposite signs, so they cancel. And when you simplify, what you end up with is the right hand side, so I've proved that the left hand side is indeed equal to the right. 
That's what your professor did, too, but using that confounding notation where $f$ means two different things, and $\bar{x}_1$ also means two different things, and it's a miracle anyone can every get this right. 
The bad news: everyone writes stuff like this, and it gets to be systematic and habitual and you find yourself just doing it and knowing that "it really does all make sense, even though it looks crazy." And it's a lot easier to write than the $\partial_1$ stuff, too. So once you understand my version of the proof (and, implicitly, my version of the chain rule), see whether you can go back and make sense of your prof's version, because it's the sort of thing you'll end up writing someday, except when you're explaining things to someone on MSE. :) 
