I came across an interesting approach to a problem involving a spring the other day, and it made me wonder if I could derive the equations for simple harmonic motion. The basic principle of a spring is Hooke’s law, that the spring exerts a restoring force proportional to its displacement from equilibrium position: F = –kx, where k is the spring constant representing the stiffness of the spring. I wondered if I could derive the formulas for its motion, and where the sinusoidal components would appear from, since clearly there are no trigonometric functions in this basic equation. To begin with, from Newton’s second law, F = ma:
We know that acceleration is the derivative of velocity and velocity is the derivative of position:
We can rewrite these as a dt = dv and v dt = dx, and integrate. However, our acceleration equation has a in terms of position x, not time t, so I would prefer to integrate with respect to x (as at this point I don’t know how x depends on t — that’s what we’re trying to derive!).
This equation is well-known and could have been used as a starting point, but it’s nice to derive it from the most basic principles. We can now substitute our expression in for a and integrate both sides.
Let’s solve this for v:
There’s still no sign of sine appearing anywhere (I know; I couldn’t resist). I’m also a bit uncomfortable with the plus/minus sign, but velocity can be both positive and negative, so I don’t think that discarding the negative solution is justified. I want to integrate again to remove the velocity, but we face a similar problem as before: we have velocity in terms of position x, not time t. We can rearrange the differential again:
to get v on the dx side:
Let’s substitute in our expression for v, and integrate:
This is not pretty, and I’m not sure how to integrate the right side. I believe I can pull out the plus/minus as a constant.
I had to consult a table of integrals for assistance with this integration. Of course, it can be solved with trignometric substitution! All of a sudden, we have a hint of where a sine function will appear. We need to get the radical in the form :
Now, we set
Let’s now take our original integral back, and start substituting.
This expression is complicated, but I can already see how it will simplify out.
Let’s convert the dx to a dθ:
Substituting this back in yields:
Remembering our equation for x in terms of θ:
Finally, we can substitute this back in for θ and solve for x:
The plus-minus is driving me crazy, but I can’t justify dropping it — even though I want to.
Actually, I think I can get rid of it now! Since sin(-x) = -sin(x) = sin(x+π), I can incorporate the +π into the constant!
Let’s rewrite this equation using the conventional symbols for the constants.
There it is. The basic sine wave equation is readily apparent, with the constants representing the amplitude and the phase shift, and the radical representing the angular frequency. The fourth possible constant (a “+ D”) is absent, and I wondered if I had accidentally dropped a constant somewhere — since that entire family of curves should be solutions. That is, x should be able to oscillate around 1, -5, whatever. But the reason for its absence is our starting point of Hooke’s law, F=-kx, which assumes that the equilibrium point is x=0. We would have had to start with F=-k(x–xeq) to have had that last constant.
It’s pretty neat to see the equation emerge from just four basic equations: Hooke’s law F = –kx, Newton’s second law F=ma, and the definitions of velocity and acceleration v=x′ and a=v′!