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?
\begin{align*} \mathbf{F} &= -m\omega^{2} \mathbf{r} \\ \Delta V &= \int_{C} \mathbf{F} \cdot d\mathbf{r} \\ &= -\int_{C} m\omega^{2} \mathbf{r} \cdot d\mathbf{r} \\ &= -\int_{C} m\omega^{2} d\left(\frac{\mathbf{r} \cdot \mathbf{r}}{2} \right) \\ &= -\int_{C} \frac{1}{2} m\omega^{2} dr^{2} \\ V &= -\frac{1}{2} m\omega^{2} r^{2} \end{align*}