# 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.

-