Consider a one-dimensional force field given by the formula $$F(x, m) = −kmx, k > 0, x ∈ (−∞, ∞)$$ that acts on a point mass $P$ of mass $m$ located at position $x$.
Consider two point masses $P_1$ and $P_2$ with $m_1=m_2=m$, and with initial conditions $x_1(0) = l > 0, x_2(0) = 2l > 0$ and $\dot{x}_1(0) = \dot{x}_2(0) = 0 $
Show that the first collision of $P_2$ with $P_1$ occurs at $x = 0$. Compute the time $T_1$ when this collision occurs.
This question is basically one part of a couple parts to a larger question. I have already obtained the function for the trajectory which is $$x(t)=a\sin(t\sqrt{k}+\frac \pi 2)$$
Now where this looks simple, I'm just having a bit of issue working it out because I can't see how $P_1$ and $P_2$ are going to differ at all really, and just generally confused where to start to get the $T_1$ I'm pretty sure I'm just overlooking this while it shouldn't be too difficult but could anyone lend a hand?
Thanks to Newton's second law we have $$ \begin{cases} m_1\ddot{x}_1=-km_1x_1\\ m_2\ddot{x}_2=-km_2x_2 \end{cases} \iff \begin{cases} \ddot{x}_1=-kx_1\\ \ddot{x}_2=-kx_2 \end{cases}. $$ Solving these two differential equations we get: $$ x_1(t)=A_1\cos(\sqrt{k}t+\varphi_1),\quad x_2(t)=A_2\cos(\sqrt{k}t+\varphi_2), $$ where $A_1,A_2$ are positive real constants, and $\varphi_1,\varphi_2\in [0,2\pi)$.
Using the initial conditions we have: $$ \begin{cases} A_1\cos\varphi_1=l\\ -\sqrt{k}A_1\sin\varphi_1=0\\ A_2\cos\varphi_2=2l\\ -\sqrt{k}A_2\sin\varphi_2=0 \end{cases} \iff \begin{cases} (\varphi_1,A_1)=(0,l)\\ (\varphi_2,A_2)=(0,2l) \end{cases}. $$ Hence $$ x_1(t)=l\cos(\sqrt{k}t),\quad x_1(t)=2l\cos(\sqrt{k}t). $$ There is a collision at any time $t$ such that $$ x_1(t)=x_2(t), $$ i.e. when $$ \cos(\sqrt{k}t)=0. $$ Thus these collisions occur at any $$ t_n=\frac{\pi}{2\sqrt{k}}+\frac{2n\pi}{\sqrt{k}}, \quad n=0,1,2,\ldots. $$ Thus, the first collision occurs at $$ T_1=\min_nt_n=\frac{\pi}{2\sqrt{k}}. $$ The corresponding position where the first collision occurs is: $$ x_1(T_1)=x_2(T_1)=l\cos\frac\pi2=0. $$