Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Physics LibreTexts

23.8: Appendix 23A- Solution to Simple Harmonic Oscillator Equation

( \newcommand{\kernel}{\mathrm{null}\,}\)

In our analysis of the solution of the simple harmonic oscillator equation of motion, Equation (23.2.1),

kx=md2xdt2

we assumed that the solution was a linear combination of sinusoidal functions,

x(t)=Acos(ω0t)+Bsin(ω0t)

where ω0=k/m. We shall now derive Equation (23.A.2).

Assume that the mechanical energy of the spring-object system is given by the constant E . Choose the reference point for potential energy to be the unstretched position of the spring. Let x denote the amount the spring has been compressed (x<0) or stretched (x>0) from equilibrium at time t and denote the amount the spring has been compressed or stretched from equilibrium at time t=0 by x(t=0)x0. Let vx=dx/dt denote the x -component of the velocity at time t and denote the x -component of the velocity at time t=0 by vx(t=0)vx,0. The constancy of the mechanical energy is then expressed as

E=K+U=12kx2+12mv2

We can solve Equation (23.A.3) for the square of the x -component of the velocity,

v2x=2Emkmx2=2Em(1k2Ex2)

Taking square roots, we have

dxdt=2Em1k2Ex2

(why we take the positive square root will be explained below).

Let a12E/m and a2k/2E. It’s worth noting that a1 has dimensions of velocity and w has dimensions of [length] to the power −2 . Equation (23.A.5) is separable,

dxdt=a11a2x2dx1a2x2=a1dt

We now integrate Equation (23.A.6),

dx1a1x2=a1dt

The integral on the left in Equation (23.A.7) is well known, and a derivation is presented here. We make a change of variables cosθ=a2x with the differentials dθ and dx related by sinθdθ=a2dx. The integration variable is

θ=cos1(a2x)

Equation (23.A.7) then becomes

sinθdθ1cos2θ=a2a1dt

This is a good point at which to check the dimensions. The term on the left in Equation (23.A.9) is dimensionless, and the product a2a1 on the right has dimensions of inverse time, [ length ]1[length time1]=[time 1] so a2a1 dt is dimensionless. Using the trigonometric identity 1cos2θ=sinθ, Equation (23.A.9) reduces to

dθ=a2a1dt

Although at this point in the derivation we don’t know that a2a1, which has dimensions of frequency, is the angular frequency of oscillation, we’ll use some foresight and make the identification

ω0a2a1=k2E2Em=km

and Equation (23.A.10) becomes

θθ=θ0dθ=tt=0ω0dt

After integration we have

θθ0=ω0t

where θ0ϕ is the constant of integration. Because θ=cos1(a2x(t)) Equation (23.A.13) becomes

cos1(a2x(t))=(ω0t+ϕ)

Take the cosine of each side of Equation (23.A.14), yielding

x(t)=1a2cos((ω0t+ϕ))=2Ekcos(ω0t+ϕ)

At t = 0

x0x(t=0)=2Ekcosϕ

The x -component of the velocity as a function of time is then

vx(t)=dx(t)dt=ω02Eksin(ω0t+ϕ)

At t = 0,

vx,0vx(t=0)=ω02Eksinϕ

We can determine the constant ϕ by dividing the expressions in Equations (23.A.18) and (23.A.16),

vx,0ω0x0=tanϕ

Thus the constant ϕ can be determined by the initial conditions and the angular frequency of oscillation,

ϕ=tan1(vx,0ω0x0)

Use the identity

cos(ω0t+ϕ)=cos(ω0t)cos(ϕ)sin(ω0t)sin(ϕ)

to expand Equation (23.A.15) yielding

x(t)=2Ekcos(ω0t)cos(ϕ)2Eksin(ω0t)sin(ϕ)

and substituting Equations (23.A.16) and (23.A.18) into Equation (23.A.22) yields

x(t)=x0cosω0t+vx,0ω0sinω0t

agreeing with Equation (23.2.21).

So, what about the missing ± that should have been in Equation (23.A.5)? Strictly speaking, we would need to redo the derivation for the block moving in different directions. Mathematically, this would mean replacing ϕ by πϕ (or ϕπ) when the block’s velocity changes direction. Changing from the positive square root to the negative and changing ϕ to πϕ have the collective action of reproducing Equation (23.A.23).


This page titled 23.8: Appendix 23A- Solution to Simple Harmonic Oscillator Equation is shared under a not declared license and was authored, remixed, and/or curated by Peter Dourmashkin (MIT OpenCourseWare) via source content that was edited to the style and standards of the LibreTexts platform.

Support Center

How can we help?