Given a vector field $F=(f_1,f_2,f_3)$, we can associate it to a differential 2-form $\omega = f_1 dy\wedge dz+f_2 dx\wedge dz+f_3dx\wedge dy$. Taking the exterior derivative is sort of an equivalent of taking the divergence of $F$. If we have a scalar field $f= f(x_1, \ldots, x_n)$ we can see it as a 0-form, and the exterior derivative would be like calculating $\nabla f$ and we can define something similar for the curl.
All of that was using the standard basis, but what if I want to use a change of coordinates, say spherical, for instance. How would these things above translate?
My attempt so far consisted in using the pullback. I tried it on polar coordinates for the gradient of $f$:
$$ \phi(r,\varphi) = (r\cos\varphi, r\sin\varphi)\\ \phi^{\ast}(f) = f\circ\phi \\ d\phi^{\ast}(f) = \frac{\partial f}{\partial r}dr+\frac{\partial f}{\partial \varphi} d\varphi $$
As you can see it's missing the $1/r$ in the second term. So I don't think I'm doing it right. Any hints? Thanks.
EDIT: So after asking my professor he said to use the Jacobian. Using this hint I got the expression for the gradient in generalized coordinates as follows:
Let $\phi(x,y,z) = (u,v,w)$ be our new coordinates. Then we have the Jacobian to be:
$$D\phi(\vec{x}) = \begin{pmatrix}\frac{\partial u}{\partial x} && \frac{\partial u}{\partial y} && \frac{\partial u}{\partial z} \\ \frac{\partial v}{\partial x} && \frac{\partial v}{\partial y} && \frac{\partial v}{\partial z} \\ \frac{\partial w}{\partial x} && \frac{\partial w}{\partial y} && \frac{\partial w}{\partial z}\end{pmatrix}$$
Now, given $i,j,k$ the usual basis, we can find a new basis by using:
$$D\phi(\vec{x})(i), D\phi(\vec{x})(j), D\phi(\vec{x})(k)$$
And we can normalise it, which gives the new basis vectors:
$$e_u = D\phi(\vec{x})(i)/||D\phi(\vec{x})(i)||, e_v = D\phi(\vec{x})(j)/||D\phi(\vec{x})(j)||, e_w = D\phi(\vec{x})(k)/||D\phi(\vec{x})(k)||$$
Then $\nabla f = \frac{\partial f}{\partial u}e_u+\frac{\partial f}{\partial v}e_v + \frac{\partial f}{\partial w}e_w $. This gives the correct expressions for the gradient. How can I generalize this for divergence and curl?