The simplest example of Simple Harmonic Oscillation (SHO) is a mass hanging on a spring. In equilibrium, the string will have stretched some equilibrium distance xo, so that the weight of the mass mg is balanced by the spring force kxo. Any additional motion x of the spring will result in an unbalanced force:

(1)ΣF=ma=mgk(xo+x)
(2)md2xdt2=(mgkxo)kx
(3)d2xdt2=kmx

This last equation is in the form of the equation for SHO:

(4)d2xdt2=ω2x

where ωkm in this case. Knowing ω, we can then go on to do whatever we need to do with the problem. The period of the motion is T=2πω, the position as a function of time will be x(t)=Acos(ωt+ϕ), etc.

We can use this “known solution” to SHO any time we can get the equation of motion into the form of the SHO differential equation. If the second derivative of a variable is equal to a negative constant times the variable, the solution is SHO with ω equal to the square root of that constant.

Even when we can’t get the equation of motion for a system into the form of SHO, we can often approximate the motion as SHO for small oscillations. The classic example of this is the simple pendulum. The equation of motion for the pendulum is

(5)d2θdt2=gLsinθ

This equation is not SHO, but for small θ, sinθθ so we can approximate the motion as SHO as long as the oscillations are small.

In the case of our wedge-shaped boat, the equation of motion is

(6)d2γdt2=ωo2(1+γ2)γ

This is not SHO! If γ is small, it is approximately SHO, but only approximately.

Note: The Mathematica and Python solutions here make use of built-in tools for solving differential equations. For other implementations the reader is directed to Numerical Recipes in C, or equivalent text, which will provide an introduction and theoretical description of the numerical approach to solutions via finite-difference methods.