# Differentiating Function of Multiple Variables

Consider a function $w=f(x,y)$, where $x=rcos\theta$ and $y=rsin\theta$. Verify each of the following:

$$\frac{\partial{w}}{\partial{x}} = \frac{\partial{w}}{\partial{r}}\cos\theta - \frac{\partial{w}}{\partial{\theta}}\frac{\sin\theta}{r}$$

$$\frac{\partial{w}}{\partial{y}} = \frac{\partial{w}}{\partial{r}}\sin\theta + \frac{\partial{w}}{\partial{\theta}}\frac{\cos\theta}{r}$$

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

I believe I am supposed to utilize the chain rule:

$$Z = f(x(t), y(t))$$ $$\frac{\partial{Z}}{\partial{t}} = \frac{\partial{Z}}{\partial{x}} \frac{\partial{x}}{\partial{t}} + \frac{\partial{Z}}{\partial{y}} \frac{\partial{y}}{\partial{t}},$$

but I am unsure how to modify the formula to obtain $\frac{\partial{Z}}{\partial{x}}$.

Using the chain rule, write $$\begin{bmatrix} \frac{\partial w}{\partial r} \\ \frac{\partial w}{\partial \theta} \end{bmatrix} = \begin{bmatrix} \frac{\partial x}{\partial r} & \frac{\partial y}{\partial r} \\ \frac{\partial x}{\partial \theta} & \frac{\partial y}{\partial \theta} \end{bmatrix} \begin{bmatrix} \frac{\partial w}{\partial x} \\ \frac{\partial w}{\partial y} \end{bmatrix} =: \mathbf{J} \begin{bmatrix} \frac{\partial w}{\partial x} \\ \frac{\partial w}{\partial y} \end{bmatrix}$$ Compute $\mathbf{J}$: $$\mathbf{J} = \begin{bmatrix} \cos\theta & \sin\theta \\ -r\sin\theta & r\cos\theta \end{bmatrix}$$ Find the inverse of $\mathbf{J}$ (which does not exist at $r = 0$): $$\mathbf{J}^{-1} = \frac{1}{r}\begin{bmatrix} r\cos\theta & -\sin\theta \\ r\sin\theta & \cos\theta \end{bmatrix}$$ Then $$\begin{bmatrix} \frac{\partial w}{\partial x} \\ \frac{\partial w}{\partial y} \end{bmatrix} = \mathbf{J}^{-1} \begin{bmatrix} \frac{\partial w}{\partial r} \\ \frac{\partial w}{\partial \theta} \end{bmatrix} = \frac{1}{r} \begin{bmatrix} r\cos\theta \frac{\partial w}{\partial r} - \sin\theta \frac{\partial w}{\partial \theta} \\ r\sin\theta \frac{\partial w}{\partial r} + \cos\theta \frac{\partial w}{\partial \theta} \end{bmatrix}$$ The expressions you need follow directly.