# Prove partial differentiation equation

Let $z=f(x, y), x = r \cos \theta, y = r \sin \theta$, prove the equation below

$\left(\frac{\partial z}{\partial x} \right) ^2+\left(\frac{\partial z}{\partial y} \right) ^2 =\left(\frac{\partial z}{\partial r} \right) ^2 +\left(\frac{1}{r} \right) ^2\left(\frac{\partial z}{\partial \theta} \right) ^2$

This is a calculus problem in $R^n \mapsto R$. I tried it by using chain rule but found nothing. Also, I substitute $z, x, y$ in the left side of the equation, hoping to get the right one, but I can't proceed somehow. Help me please.

$$\frac{\partial z}{\partial x} = \frac{\partial z}{\partial r} \times \frac{\partial r}{\partial x} + \frac{\partial z}{\partial \theta} \times \frac{\partial \theta}{\partial x}$$ $$= \frac{\partial z}{\partial r} \frac{1}{\cos \theta} + \frac{\partial z}{\partial \theta} \frac1{r \sin \theta}$$