Hooke's Law & Harmonic Ocillator

System without Damping

Consider the external force Fext applied on a spring as showed in Fig 1 which displaces the spring by x with acceleration "a".

Fig. 1: The Spring System [1]

The spring will assert the stretching force (-kx) having linear dependence of displacement (Hooke's laws). The equation for the system can therefore be written as

Fext - kx = ma

The system becomes dynamic after releasing the spring ( i.e. Fext = 0) i.e.

This is the second order Ordinary Differential Equation (ODE). 

We can guess that the system oscillates periodically. So, we can define the system with sine function and for the solution to have dimension, amplitude is included, which becomes:

In the initial condition, at time t = 0, 

x(0) = A sin (0) = 0

The displacement is 0 if starting from rest but not when it is already stretched. Then we need the following equation to cover this part of boundary condition.

x(t) = A cos (ωt)

x(0) = A cos (0) = A

The general solution must allow for these and any other starting conditions. So instead we re-write it with the phase angle:

equation

Substituting the value in ODE.

m (-w2x) + kx = 0

x (-mw2 + k) = 0

For x ≠ 0, it gives ω2  = k/m .Or, if you prefer, we can write the general solution as

equation

For elegance, however, we normally write

equation
equation

Now,

sin φ = x0/A & cos φ = v0/wA

(x0/A)2 + (v0/wA)2 = 1 (using trigonometric identity)

A = sqrt (x02 + (v0/w0)2)

Calculate Phase Angle:

tan φ = sin φ /cos φ = v0/wx0

Fig. 2 gives the final picture of the dynamic system.

Fig. 2: Dynamic System [1]

Alternative Ways [2] - Characteristic Equation

Assume exponential solution: y = x(t) = ert

y' = rert & y''=r2ert

Substituting y' & y'' in the equation, we get

r2ert + kert = 0

r2 + k = 0

r = +- ik

General solution is the linear combination of solutions.

x(t) = A*eikt + A* e-ikt

Applying Euler's identity below, we get the similar equations

eikt = coskt + isinkt & e-ikt = coskt - isinkt

Damped System:

In real oscillators, friction, or damping, slows the motion of the system. Due to frictional force, the velocity decreases in proportion to the acting frictional force. In many vibrating systems the frictional force Ff can be modeled as being proportional to the velocity v of the object: Ff = −cv, where c is called the viscous damping coefficient. Let's introduce this in the differential equation.

Substituting the values, we get the quadratic equation

r2 + cr + k = 0

The equation will have three solutions based on whether c2 - 4k is smaller than, equal to or greater than 0 providing under damped, critically damped, and over damped systems.

The solution is:

x(t) = Ae(-ct/2m) sin (ωt + φ)

Fig. 3: Damped System