# Vector differential equation problem

I was trying to do this question from a past paper, but I'm not sure how to proceed. The question is:

A particle of mass $m$ moves subject to a force $\mathbf F = A(y\mathbf i + x\mathbf j)$ where $\mathbf r = x\mathbf i + y\mathbf j + z\mathbf k$. Find the general solution $\mathbf r(t)$ to the equations of motion.

I wrote down the equation of motion:

$$m\ddot{ \mathbf r} = \mathbf F = A(y\mathbf i + x\mathbf j)$$

And dotted with $\dot{\mathbf r}$ to get and integrated to get:

$$\frac{1}{2} m |\dot{\mathbf r}|^2 +Axy = E$$

Where $E$ is a constant of energy. But I'm unsure how to continue from here. Normally I would substitute back in to the original equation of motion, but there's no $\dot{\mathbf r}$ for me to sub with. I tried to substitute the $Axy$ back in, writing the force as $\nabla(Axy)$, but I have no idea how to solve the resulting differential equation.

$\ddot{\mathbf{r}} = \ddot{x}\mathbf{i} + \ddot{y} \mathbf{j} + \ddot{z} \mathbf{k}$. Therefore you need to solve the following system of differential equations, where $\omega =A/m$, $$\ddot{x} = \omega y$$ $$\ddot{y} = \omega x$$ $$\ddot{z} = 0$$
For $z(t)$ the solution is $z(t) = z_0 + v_{z0} t$. For $x(t)$ and $y(t)$ differentiate twice the 1st equation to get $$\frac{d^4}{dt^t}x = \omega \ddot{y} = \omega^2 x$$ where we substituted the second equation. This is a linear equation of order 4 with constant coefficients, so the general soltion is $$x(t) = A_1 \exp( \sqrt{\omega}t ) + A_2 \exp( -\sqrt{\omega}t ) + A_3 \exp( \sqrt{-\omega}t ) + A_4 \exp( -\sqrt{-\omega}t )$$ where $\sqrt{-\omega} = \sqrt{-1}\sqrt{\omega} = i \omega$.
For $y(t)$ the solution is similar.