derivative of $f(r\cos\phi,r\sin\phi)=r^a\cos(a\phi)$ Let 
$$
f(r\cos\phi,r\sin\phi)=r^a\cos(a\phi)
$$for some $r\in(0,\sigma)\subset\mathbb R$ and $\phi\in (0,\rho)\subset(0;2\pi]$.
How do you calculate $Df=(\partial_1 f,\partial_2 f)$ ?
I thought about using the chain rule and
$$
g(r,\phi)=r(\cos\phi,\sin\phi)\qquad h(x,y)=r^a\cos(a\phi)
$$
and so $h\circ g=r^a\cos(a\phi)$. We have
$$
Dg(r,\phi)=\begin{pmatrix}
\cos\phi&-r\sin\phi\\
\sin\phi&r\cos\phi
\end{pmatrix}
$$How do you get $Dh$ and therefore $Df$?
 A: HINT: use implicit differentiation.
Let $f = f(x,y)$ and let $(x,y) = (r\cos \phi, r \sin \phi)$. Then
$$
\frac{\partial f}{\partial r} = \frac{\partial f}{\partial x} \frac{\partial x}{\partial r}  + \frac{\partial f}{\partial y} \frac{\partial y}{\partial r}  = 
\partial_x \,f \, \cos \phi + \partial_y \,f \, \sin \phi 
\\
\frac{\partial f}{\partial \phi} = \frac{\partial f}{\partial x} \frac{\partial x}{\partial \phi}  + \frac{\partial f}{\partial y} \frac{\partial y}{\partial \phi}  = 
\partial_x \,f \, (-r \sin \phi) + \partial_y \,f \, (r \cos \phi  )
$$
On the other hand, 
$$
\frac{\partial f}{\partial r} = \frac{\partial }{\partial r} \Big( r^a \cos (a\phi)\Big)= ar^{a-1} \cos (a\phi)
\\
\frac{\partial f}{\partial \phi} = \frac{\partial }{\partial \phi} \Big( r^a \cos (a\phi)\Big)=-ar^a \sin(a\phi)
$$
Therefore, solving system of linear equations
$$
\left\{
\begin{aligned}
&\cos \phi \, \partial_x \,f   + \sin \phi \,\partial_y \,f    &&=   ar^{a-1} \cos (a\phi)
\\
& \big(-r \sin \phi\big) \,\partial_x \,f   + \big(r \cos \phi  \big) \partial_y \,f  &&=-ar^a \sin(a\phi)
\end{aligned}
\right.
$$
for $\partial_x \,f $ and $\partial_y \,f $, you will be able to write out explicitly $Df = \big( \partial_x \,f , \partial_y \,f \big)$.
