# Relation between two chain's rule formula for gradient decomposition, Frenet Frame

Consider a function real valued function $$f$$ whose expression is given in terms of rectangular coordinates $$(x,y,z)$$ and the function $$\tilde f$$ such that: $$\tilde f(r,\theta,z)=f\circ g(r,\theta,z)$$ where $$g$$ is the change of variables from the cylindrical coordinates to rectangular coordinates.

Let's apply the chain's rule, we get $$\nabla \tilde f[r,\theta,z]^\intercal = \nabla f[g(r,\theta,z)]^\intercal\times Jac_g(r,\theta,z) \qquad (\star)$$ where $$Jac_g$$ is the Jacobian of $$g$$.

1. Cylindrical coordinates

It is well known (see Del operator in Cylindrical coordinates (problem in partial differentiation)) that: $$\frac{\partial f}{\partial x}i+\frac{\partial f}{\partial y}j+\frac{\partial f}{\partial z}k = \frac{\partial f}{\partial r}e_r+\frac{1}{r}\frac{\partial f}{\partial \theta}e_\theta+\frac{\partial f}{\partial z}e_z \qquad (\star \star)$$ where $$(i,j,k)$$ is the orthonormal basis related to rectangular coordinates and $$(e_r,e_\theta,e_z)$$ is the orthonormal basis related to the cylindrical coordinates. This equation results from a change of variables and a change of basis but in the first point, I only did a change of variables ... I don't like how they usually proof $$(\star \star)$$ (see for instance the accepted answer in the referred post), because they use the same notation $$f$$ for the function of different variables.

My question is the following: what are the (straighforward) connections between $$(\star)$$ and $$(\star \star)$$ ?

More precisely I wonder the following questions: in the equation $$(\star)$$, what are the basis of vectors assocaited to this matrices ? Is it $$(e_r,e_\theta,e_z)$$ ?

1. The first point to determine gradient in cylindrical coordinates may be fastidious for other coordinates system (spherical), that's why I am thinking to use $$(\star)$$. Also I am wondering if it's possible to do the same in the Frenet frame ? that is to express the gradient in the Frenet coordinates ?