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?