# Engineering Acoustics/Simple Oscillation

## The Position Equation

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

```{=html}
<center>
```
$f = -sx\,$

```{=html}
</center>
```
where *x* is the displacement of the mass from its rest position.
Substituting the expression for *f* into the linear momentum equation,

```{=html}
<center>
```
$f = ma = m{d^2x \over dt^2}\,$

```{=html}
</center>
```
where *a* is the acceleration of the mass, we can get

```{=html}
<center>
```
$m\frac{d^2 x}{d t^2 }= -sx$

```{=html}
</center>
```
or,

```{=html}
<center>
```
$\frac{d^2 x}{d t^2} + \frac{s}{m}x = 0$

```{=html}
</center>
```
Note that the frequency of oscillation $\omega_0$ is given by

```{=html}
<center>
```
$\omega_0^2 = {s \over m}\,$

```{=html}
</center>
```
To solve the equation, we can assume

```{=html}
<center>
```
$x(t)=A e^{\lambda t} \,$

```{=html}
</center>
```
The force equation then becomes

```{=html}
<center>
```
$(\lambda^2+\omega_0^2)A e^{\lambda t} = 0,$

```{=html}
</center>
```
Giving the equation

```{=html}
<center>
```
$\lambda^2+\omega_0^2 = 0,$

```{=html}
</center>
```
Solving for $\lambda$

```{=html}
<center>
```
$\lambda = \pm j\omega_0\,$

```{=html}
</center>
```
This gives the equation of *x* to be

```{=html}
<center>
```
$x = C_1e^{j\omega_0 t}+C_2e^{-j\omega_0 t}\,$

```{=html}
</center>
```
Note that

```{=html}
<center>
```
$j = (-1)^{1/2}\,$

```{=html}
</center>
```
and that *C~1~* and *C~2~* are constants given by the initial conditions
of the system

If the position of the mass at *t* = 0 is denoted as *x~0~*, then

```{=html}
<center>
```
$C_1 + C_2 = x_0\,$

```{=html}
</center>
```
and if the velocity of the mass at *t* = 0 is denoted as *u~0~*, then

```{=html}
<center>
```
$-j(u_0/\omega_0) = C_1 - C_2\,$

```{=html}
</center>
```
Solving the two boundary condition equations gives

```{=html}
<center>
```
$C_1 = \frac{1}{2}( x_0 - j( u_0 / \omega_0 ))$

```{=html}
</center>
```
\

```{=html}
<center>
```
$C_2 = \frac{1}{2}( x_0 + j( u_0 / \omega_0 ))$

```{=html}
</center>
```
\
The position is then given by

```{=html}
<center>
```
**$x(t) = x_0 cos(\omega_0 t) + (u_0 /\omega_0 )sin(\omega_0 t)\,$**

```{=html}
</center>
```
\
This equation can also be found by assuming that *x* is of the form

```{=html}
<center>
```
$x(t)=A_1 cos(\omega_0 t) + A_2 sin(\omega_0 t)\,$

```{=html}
</center>
```
And by applying the same initial conditions,

```{=html}
<center>
```
$A_1 = x_0\,$

```{=html}
</center>
```
\

```{=html}
<center>
```
$A_2 = \frac{u_0}{\omega_0}\,$

```{=html}
</center>
```
\
This gives rise to the same position equation

```{=html}
<center>
```
$x(t) = x_0 cos(\omega_0 t) + (u_0 /\omega_0 )sin(\omega_0 t)\,$

```{=html}
</center>
```
Back to Main page

## Alternate Position Equation Forms

If *A~1~* and *A~2~* are of the form

```{=html}
<center>
```
$A_1 = A cos( \phi)\,$

```{=html}
</center>
```
```{=html}
<center>
```
$A_2 = A sin( \phi)\,$

```{=html}
</center>
```
\
Then the position equation can be written

```{=html}
<center>
```
**$x(t) = Acos( \omega_0 t - \phi )\,$**

```{=html}
</center>
```
\
By applying the initial conditions (*x(0)=x~0~, u(0)=u~0~*) it is found
that

```{=html}
<center>
```
$x_0 = A cos(\phi)\,$

```{=html}
</center>
```
\

```{=html}
<center>
```
$\frac{u_0}{\omega_0} = A sin(\phi)\,$

```{=html}
</center>
```
\
If these two equations are squared and summed, then it is found that

```{=html}
<center>
```
**$A = \sqrt{x_0^2 + (\frac{u_0}{\omega_0})^2}\,$**

```{=html}
</center>
```
\
And if the difference of the same two equations is found, the result is
that

```{=html}
<center>
```
**$\phi = tan^{-1}(\frac{u_0}{x_0 \omega_0})\,$**

```{=html}
</center>
```
The position equation can also be written as the Real part of the
imaginary position equation

```{=html}
<center>
```
$\mathbf{Re} [x(t)] = x(t) = A cos(\omega_0 t - \phi)\,$

```{=html}
</center>
```
\
Due to euler\'s rule (e^jφ^ = cosφ + jsinφ), **x**(t) is of the form

```{=html}
<center>
```
$x(t) = A e^{j(\omega_0 t - \phi)}\,$

```{=html}
</center>
```
{m\_{TOTAL}}} = \\sqrt{\\frac{2s}{M}} `</math>`{=html}

$\mathbf{f_0} = \frac{\omega_{0}}{2\pi} = \mathbf{\frac{1}{2\pi}\sqrt{\frac{2s}{M}}}$

2.  !Simple
    Oscillator-1.2.1.b{width="100"}

$\omega_{0} = \sqrt{\frac{s_{TOTAL}}{m_{TOTAL}}} = \sqrt{\frac{s}{2M}}$

$\mathbf{f_0} = \frac{\omega_{0}}{2\pi} = \mathbf{\frac{1}{2\pi}\sqrt{\frac{s}{2M}}}$

3.  !Simple
    Oscillator-1.2.1.c{width="100"}

!Simple
Oscillator-1.2.1.c-solution{width="300"}

$\mathbf{1.}\text{ }
s(x_1-x_2) = sx_2$

$\mathbf{2.}\text{ }
-s(x_1-x_2) = m \frac{d^2x}{dt^2}$

$\frac{d^2x_1}{dt^2} + \frac{s}{2m}x_1 = 0$

$\omega_0 = \sqrt{\frac{s}{2m}}$

$\mathbf{f_0 = \frac{1}{2\pi}\sqrt{\frac{s}{2m}}}$

4.  !Simple
    Oscillator-1.2.1.d{width="100"}

$\omega_0=\sqrt{\frac{2s}{m}}$

$\mathbf{f_0 = \frac{1}{2\pi}\sqrt{\frac{2s}{m}}}$

}}

Back to Main page
