Solution (source code)

= Solution

The <force> law separates into two identical <harmonic oscillator equations>:
$$
m\ddot x=-kx,\qquad m\ddot y=-ky.
$$
For positive $m,k$, the general real solution is
$$
\boxed{x(t)=x_0\cos(\omega t+\phi_1),\qquad y(t)=y_0\cos(\omega t+\phi_2),\qquad\omega=\sqrt{k/m}.}
$$
Since $\operatorname{Re}(e^{i\alpha})=\cos\alpha$ by <Euler's formula>, these are exactly the stated <real parts> of <complex exponentials>. The <amplitudes> $x_0,y_0$ and <phases> $\phi_1,\phi_2$ are fixed by the four initial position and <velocity> components. This is two-dimensional <isotropic harmonic oscillator flow>: the same <angular frequency> acts in every direction.