I am given that $\mathbf{r}=acos(\omega t) \hat i+bsin (\omega t) \hat j.$
From this I am able to conclude using $\mathbf{F}=m\mathbf{a}$ that $\mathbf{F}=m \bigg(-a\omega^2 cos(\omega t) \hat i -b\omega^2 sin(\omega t) \hat j \bigg).$
I am also given that the force field is conservative and so I know that $\mathbf{F}=-\nabla V$ where $V$ is potential energy.
How would I then use this information to calculate the potential energy at a general point $(x,y)$?
I guess I would just find $$\int_{t=0}^t m \bigg(a\omega^2 cos(\omega t) \hat i +b\omega^2 sin(\omega t) \hat j \bigg) \bullet \bigg(acos(\omega t)\hat i +bsin(\omega t)\hat j \bigg) dt.$$
Is this correct or do I need to do something else?