## The Position EquationEdit

This section shows how to form the equation describing the position of a mass on a spring.

For a simple oscillator consisting of a mass *m* attached to one end of a spring with a spring constant *s*, the restoring force, *f*, can be expressed by the equation

where *x* is the displacement of the mass from its rest position. Substituting the expression for *f* into the linear momentum equation,

where *a* is the acceleration of the mass, we can get

or,

Note that the frequency of oscillation is given by

To solve the equation, we can assume

The force equation then becomes

Giving the equation

Solving for

This gives the equation of *x* to be

Note that

and that *C _{1}* and

*C*are constants given by the initial conditions of the system

_{2}If the position of the mass at *t* = 0 is denoted as *x _{0}*, then

and if the velocity of the mass at *t* = 0 is denoted as *u _{0}*, then

Solving the two boundary condition equations gives

The position is then given by

This equation can also be found by assuming that *x* is of the form

And by applying the same initial conditions,

This gives rise to the same position equation

## Alternate Position Equation FormsEdit

If *A _{1}* and

*A*are of the form

_{2}Then the position equation can be written

By applying the initial conditions (*x(0)=x _{0}, u(0)=u_{0}*) it is found that

If these two equations are squared and summed, then it is found that

And if the difference of the same two equations is found, the result is that

The position equation can also be written as the Real part of the imaginary position equation

Due to euler's rule (e^{jφ} = cosφ + jsinφ), **x**(t) is of the form