Find the potential function of a conservative vector field $\mathbf{F}(r,\phi)=r\sin(2\phi)\mathbf{\hat{r}}+r\cos(2\phi)\mathbf{\hat{\phi}}$
Does my solution seem right:
So if $\mathbf{F}(r,\phi)=r\sin(2\phi)\mathbf{\hat{r}}+r\cos(2\phi)\mathbf{\hat{\phi}}=\nabla\phi(r,\phi)$ then,
$$\frac{\partial{g}}{\partial{r}}=r\sin(2\phi)$$ and $$\frac 1r\frac{\partial{g}}{\partial{\phi}}=r\cos(2\phi)$$
When we integrate the first equation with respect to $r$ we get $$g=\frac{r^2}{2}\sin{2\phi}+ C(\phi)$$
Now when derivate this with respect to $\phi$ we get $$r^2\cos(2\phi)+C'(\phi)$$ Now when we insert this to $\dfrac 1r\dfrac{\partial{g}}{\partial{\phi}}=r\cos(2\phi)$ we get $$\begin{align}r\cos(2\phi)+C'(\phi)&=r\cos(2\phi)\\C'(\phi)&=0\\C(\phi)&=C \end{align}$$
So the potential function $g$ is $$g=\frac{r^2}{2}\sin{2\phi}+C$$
Did I get it right?