The force acting on a particle of unit mass is given in terms of time
$t$ by $F = a \cos \omega t \hat\imath + b \sin \omega t \hat\jmath.$
If the particle is initially at rest at the origin,
find its position at any later time.
I have tried to solve by following : by the second Newtons' law $m a = F.$ so $1 * a = F,$ where $$1* a = 1 * (d^2 r)/dt = F.$$ Integrating once we get the velocity : $$v = (a \sin \omega t)/ \omega \hat\imath - (b \cos \omega t) / \omega \hat\jmath$$ Integrating the second time we get the positon $$r = -a \cos (t \omega ) / \omega^2 \hat\imath - b \sin (t \omega ) / \omega^2 \hat\jmath$$
The answer in the book is different $$r = a (1 - \cos \omega t) / \omega^2 \hat\imath + b (\omega t - \sin \omega t) / \omega^2 \hat\jmath$$
Note that "initially at rest" means that $\mathbf{v}(0)=\mathbf{0}$. Hence $$\mathbf{v}(t)=\int_0^t (a \cos(ws) \mathbf{i} + b\sin (ws) \mathbf{j})ds=\frac{1}{w}\left[a \sin(ws) \mathbf{i} - b\cos (ws) \mathbf{j}\right]_0^t\\=\frac{a \sin(wt)}{w} \mathbf{i} - \frac{b(\cos (wt)-1)}{w} \mathbf{j}.$$ Can you take it from here?