I am getting very confused when trying to find the partial derivative operators in polar co-ordinates. For example, I need to show that $\partial_{x}=\partial_{r}cos(\theta)-\frac{sin(\theta)}{r}\partial_{\theta}$, given that $x=rcos\theta, y=rsin\theta$
I started by using the chain rule to give that $\partial_x=\partial_r\frac{\partial r}{\partial x}+\partial_\theta\frac{\partial \theta}{\partial x}$ and then I went to fine the two partials I could and I am pretty sure this is where I went wrong but I don't understand why it doesn't work. $x=rcos\theta\\\frac{\partial x}{\partial r}=cos\theta\\\frac{\partial r}{\partial x}=\frac{1}{cos\theta}$
and similarly for $\theta$ I got that $\frac{\partial \theta}{\partial x}=\frac{-1}{rsin\theta}$ But I know what I should get and this doesn't get me there. I looked online and saw things with people using the fact that $tan\theta=\frac{y}{x}$ but I don't understand why my way doesn't seem to work and I am just getting confused.