# Calculating partial derivative, polar and cartesian coordinates

Let $a=r\cdot\cos(\theta)$ and $b=r\cdot\sin(\theta)$. How can I derive the following? $$\frac{\partial \psi(r)\cos(\phi(\theta))}{\partial a} = \frac{\partial \psi }{\partial r}\cdot \cos\phi(\theta)\cdot \cos(\theta)+\frac{\psi(r)}{r}\cdot \frac{\partial \phi}{\partial \theta} \cdot \sin \phi(\theta)\cdot \sin \theta,$$ where $a,b \in \mathbb{R}$, $r,\theta \in \mathbb{R}^{0+}$ and $\psi,\phi : \mathbb{R}^{0+} \to \mathbb{R}^{0+}$. Here $\mathbb{R}^{0+}=\{ x\in\mathbb R\mid x \ge 0\}$. If I just apply chain rule, I get all my derivatives on the right side to be derivatives with respect to $a$, but I need to derive it in the form that is given.

-

I figured it out myself. By chain rule, \begin{align*} \frac{\partial \psi(r) cos (\phi(\theta))}{\partial a} = \frac{d \psi(r)}{d r}\cdot \frac{\partial r}{\partial a} \cdot cos(\phi(\theta))+\psi(r)\cdot (-sin(\phi(\theta)))\cdot \frac{d \phi(\theta)}{d \theta}\cdot \frac{\partial \theta}{\partial a} \end{align*} Given that \begin{align*} \frac{\partial r}{\partial a} = \frac{a}{r}=cos(\theta) \end{align*} and \begin{align*} -\frac{\partial \theta}{\partial a} = \frac{b}{r^2} = \frac{sin(\theta)}{r} \end{align*} We have \begin{align*} \frac{\partial f^R}{\partial u^R} = \frac{\partial \psi }{\partial r}\cdot cos\phi(\theta)\cdot cos(\theta)+\frac{\psi(r)}{r}\cdot \frac{\partial \phi}{\partial \theta} \cdot sin \phi(\theta)\cdot sin \theta \end{align*}

-