In John M. Lee's Introduction to Smooth Manifolds, exercise 11.17 goes as follows:
Let $f(x,y)=x^2$ on $\mathbb R^2$, and let $X$ be the vector field $$X=\operatorname{grad} f=2x\frac\partial{\partial x}.$$ Compute the coordinate expression for $X$ in polar coordinates (on some open subset on which they are defined) and show that it is not equal to $$\frac{\partial f}{\partial r}\frac{\partial }{\partial r}+\frac{\partial f}{\partial \theta}\frac{\partial}{\partial\theta}.\tag{*}$$
I am not sure, what I am supposed to do here, but this is what I thought: Considering the change of coordinates $(x,y)=(r\cos\theta,r\sin\theta)$ we can compute the change of bases of tangent spaces: $$ \begin{align} \frac{\partial}{\partial r} &=\cos\theta\frac{\partial}{\partial x}+\sin\theta\frac{\partial}{\partial y}\\ \frac{\partial}{\partial\theta} &=-r\sin\theta\frac{\partial}{\partial x}+r\cos\theta\frac{\partial}{\partial y} \end{align} $$ and then since $f(r,\theta)=r^2\cos^2\theta$ we have $$ \begin{align} \frac{\partial f}{\partial r}&=2r\cos^2\theta\\ \frac{\partial f}{\partial\theta}&=-2r^2\cos\theta\sin\theta \end{align} $$ we see that the coefficient of $\dfrac{\partial}{\partial y}$ in $(*)$ becomes $$ 2r\cos^2\theta\sin\theta-2r^3\cos^2\theta\sin\theta\neq 0 $$ but to equal $X$, this coefficient should have been identical zero. I chose to use $(x,y)=(r\cos\theta,r\sin\theta)$ instead of $(r,\theta)=(\sqrt{x^2+y^2},\tan^{-1}(y/x))$ which is limited to $x>0$ and more heavy to work with.
But I would like to know, if what I write here even makes sense, or if I am way off.
One mistake in your computation:
$$\frac{\partial f}{\partial \theta}=-2r^2\sin{\theta}\cos{\theta}$$
The others look correct to me. However in the problem, I understand $X=\nabla f$. But then what does $2x\frac{\partial }{\partial x}$ mean?