# Modelling a particle under the influence of an electric field with a restoring force

Suppose I have a particle under the influence of an electric field. The particle is also attached to a spring. The particle should therefore feel the influence of two forces such that the total force is then:

\begin{align} F_T &= F_E + F_S\\ &= qE - kx \end{align} where $$k$$ is just the spring constant. This is then a second order differential equation:

$$m\frac{\mathrm d^2x}{\mathrm dt^2} = qE - kx$$

What I am struggling with is solving this equation such that I get an expression for $$\Delta x$$ which is essentially the distance moved by the particle in some interval $$\Delta t$$.

For context, the spring is a rough model for the surface tension of a surrounding material pulling the particle back toward the equilibrium point of the surface. This is going into a computer model, with arbitrary time-steps, with each step calculating the change in $$x$$, $$\Delta x$$. To be clear, the potential applied to the particle is constant, but the electric field depends upon $$x$$. So if we say that the particle is being attracted toward some source, the field strength and therefore the force will increase as the particle moves closer to the source.

• Is this homework? If so, then please add the homework-and-exercises tag. – Ben Crowell Dec 5 '19 at 21:59

The general trick is to convert the one second-order differential into two first-order ones. This is done by introducing an extra variable to carry around: \begin{align} \frac{\mathrm dv}{\mathrm dt}&=f(x,\,t)\\ \frac{\mathrm dx}{\mathrm dt}&=v \end{align} for whatever function $$f(\cdot)$$ you need.