Mechanics Question on Differential Equations I am going through a question in a past mechanics exam paper for a first-year undergraduate course and I was pretty stumped on this question. 

Question: A particle of mass 5kg moves along the x axis under the influence of two forces. Firstly,
  it experiences an attractive force towards the origin O of 40 times the instantaneous distance
  from O and secondly damping (or resistive force) which is 20 times the instantaneous
  speed. Assume that the particle starts from 0.2m from the origin.
(i) Set up the differential equation and conditions which describe the motion of the
  particle.
(ii) Write down the position of the particle x at time t and determine the period of the
  oscillation.

I managed to get a differential equation for the first part but is really confused with how to manipulate it for part 2, which is making me question the answer to the first part. I managed to get $$ \frac{dv}{dx} = \frac{8x-4v}{v}$$ for the first part using Newton's second law of motion. If anyone could help correct this or give me tips for the second part, that would be great. Thanks! 
 A: $$F = ma$$
Imagine a particle with positive position and velocity. The forces will be in the negative direction, which gives the sign on the forces:
$$-40x - 20v = 5a$$
$$5x'' + 20x' + 40x = 0$$
This is solved with the characteristic equation. I assume you can continue from here? 
A: Assume $x:\Bbb R\to\Bbb R$ describes the motion of the particle. You have $$\begin{cases} 5x''(t) = -40x(t) +20v(t) \\ x'(t) = v(t) \\ x(0) = 0.2\end{cases}$$ The first equation is Newton's equation, and the second is the definition of speed. We can also assume that $v(0)=0$ so that the particle starts at rest. I'll let you check that the general solution of  $$x''(t) -4x'(t) + 8x(t) = 0$$is $x(t) = c_1 e^{2t} \cos(2t)+c_2e^{2t}\sin  (2t) $ for certain $c_1,c_2\in \Bbb R$. Then $0.2 = x(0) = c_1$, and $$x'(t) = 2x(t) - 0.4 e^{2t}\sin (2t) +2c_2e^{2t}\cos (2t). $$ Then $$0=x'(0) = 2x(0)+2c_2 \implies c_2 = -0.2, $$ whence $$x(t) = 0.2e^{2t} (\cos(2t)-\sin(2t)) = 0.2\sqrt{2} e^{2t}\sin\left(\frac{\pi}{4}-2t\right). $$
