I have the equation of a curve passing through the origin of Cartesian coordinate system as:
$ f(x)= \begin{cases} x,x>0\\ -x,x<0\\ \end{cases} $
Note that we assume $f(x)$ is not defined if $x=0$.
How could I show if gradient of $f$ is the same in Cartesian and in polar coordinates.
I know in case $x>0$ we have $\frac{\partial f}{\partial x}=1$. In case $x<0$ also we have $\frac{\partial f}{\partial x}=-1$.
Note also that in polar system gradient is taken with respect to $\theta$ and in Cartesian gradient is taken with respect to $x$.
In case $x>0$ we have:
$f(x)=x$
or,
$y=x$.
Converting to polar system we have:
$\overbrace{r \cos{\theta}}^{x}=\overbrace{r\sin{\theta}}^{y}$.
or,
$\sin{\theta}=\cos{\theta}$
or,
$\tan{\theta}=1$
Here $\tan{\theta}$ is the slop in polar system that is the same with the gradient $f(x)$ with respect to $x$ in Cartesian system while $x>0$. With same approach one could work out the case $x<0$.