case 1) displacement horizontally:
If the charge q is displaced slightly to the right side along the line joining the two charges -q, then the force of attraction of the right side -q is more than the force of attraction of the -q on the left side.
So +q moves towards right side. As it moves closer to the -q (right side), the force increases. Then it will accelerate more and collide with it.
case 2) displacement of +q along the perpendicular bisector of line joining two charges -q and -q.
Let the direction of x be towards the top upwards from the center. Let the origin be at the center of two charges -q. Let the charge q be displaced by x , where x << d. The distance between the two charges is 2 d. Mass of charge q is m.
The distance between -q and +q = √(d² + x²)
Let K = 1/[ 4 πε ].
see the diagram. Let F1 be the force due to -q on the right and F2 be the force due to -q on the left side. They are equal in magnitude and directions are as shown.
magnitude = F1 = F2 = K q² / (d² + x²)
Components of F1 and F2 along the perpendicular bisector are:
F1 Sin Ф = K q² x / (x²+d²)³/²
The components of these forces parallel to the line joining -q charges are = F1 Cos Ф and will cancel as they are in opposite directions.
Let F and a be the instantaneous resultant force and net acceleration of +q.
Then the resultant force on q due to the two charges:
F = 2 K q² x / (d²+x²)³/² towards the origin in the direction of - x.
m d² x/ dt² = - 2 K q² x / [d³ (1 + x²/d²)³/² ]
= - 2 K q² x / d³ if x << d, then we ignore x² as it is << d²
m d² x / d t² = - [ 2 q² / 4 π ε d³ ] x
= ⁻ω² x
This is the equation of motion of the charge q. SO q oscillates in a simple harmonic motion with an amplitude of x₀ that is the displacement at t = 0.
The angular frequency of oscillation = ω = q / √ (2π ε d³)