# Find first partial derivates of function in polar coordinates

Write the Chain Rule formula for the following composition using a tree diagram

$$z=g(x,y)$$

where $$x= x(r,\theta)\quad\text{and}\quad y= y(r,\theta).$$

Find $\frac{\partial z}{\partial r}$ and $\frac{\partial z}{\partial \theta}$ . Use it to answer the following question: find first partial derivatives of the function

$$z = xe^y$$

in polar coordinates, that is find $\frac{\partial z}{\partial r}$ and $\frac{\partial z}{\partial \theta}$ as a function of polar coordinates $(r,\theta)$

What I have so far (and i dont know how to format im doing this manually bear with me):

$$\frac{\partial z}{\partial r}= \frac{\partial z}{\partial x} \frac{\partial x}{\partial r} + \frac{\partial z}{\partial y} \frac{\partial y}{\partial r},$$ $$\frac{\partial z}{\partial r}= \frac{\partial z}{\partial x} \frac{\partial x}{\partial \theta} + \frac{\partial z}{\partial y} \frac{\partial y}{\partial \theta}.$$

After almost an hour I found that those are the formulas for $\frac{\partial z}{\partial r}$ and $\frac{\partial z}{\partial \theta}$, but I have no idea how to find the partial derivative as a function of polar coordinates $(r,\theta)$. Can someone help?

With $x=r\cos\theta$ and $y=r\sin\theta$,
$$\frac{\partial z}{\partial r}= \frac{\partial z}{\partial x} \frac{\partial x}{\partial r} + \frac{\partial z}{\partial y} \frac{\partial y}{\partial r}=e^y\cos\theta+xe^y\sin\theta=e^{r\sin\theta}\cos\theta+r\cos\theta e^{r\sin\theta}\sin\theta$$$$=\cos\theta e^{r\sin\theta}(1+r\sin\theta)$$