Artificial Intelligence 🤖
Differential equations
Ordinary differential equations
Harmonic motion

Harmonic motion

In this chapter, we have looked at different techniques to solve the second order, linear differential equation, namely

y+P(x)y+Q(x)y=f(x),y^{\prime \prime}+P(x) y^{\prime}+Q(x) y=f(x),

for situations where P(x)P(x) and Q(x)Q(x) are constants or nonconstants and where f(x)f(x) is zero or nonzero. The motivation behind studying second order ODEs is that they can represent many physical problems which we often want to find solutions to. In what follows, we discuss some physical examples that are described by second order ODEs.

Generally, when a physical system at stable equilibrium is disturbed, vibrations tend to occur. The system is then subject to various forces acting to restore the system equilibrium. Examples of applications where this is observed include vibrations in springmass systems (such as car suspensions), the motion of a simple pendulum, Kirchhoff's circuit law which describes the charge on a capacitor, the motion of fluid in a U-tube manometer and many more. The subject discussed in this section is that of mechanical vibrations and we particularly look at the vertical spring-mass system.

Derivation of spring-mass system equation

Figure 13.1 shows the spring-mass system in 3 stages: (a), (b) and (c).

Figure 13.1: Sketch of the vertical spring-mass system.

  • In (a), no mass is attached and l0l_{0} denotes the unstretched, natural length of the spring.
  • In (b), the mass-spring system is said to be at equilibrium. A mass is attached that stretches the spring a distance of ll. Note that the equilibrium position is set to y=0y=0. At equilibrium there are two forces acting on the system: (1) gravity (acting downwards) and (2) force due to the spring, FsF_{s} (acting upwards). This upwards force can be thought of as the tension created in the spring which, by Hooke's law we know it is proportional to the distance, ll by which the string has been stretched, i.e. kl-k l (note the minus sign as it is acting upwards, i.e. in the opposite direction to gravity). Since the spring is in equilibrium, the two forces balance each other:
mgkl=0,m g-k l=0,

where g9.8 ms2g \approx 9.8 \mathrm{~ms}^{-2} is the acceleration due to gravity, mm is the mass of the spring and kk is the spring constant. The latter is a property of the spring which is always positive.

  • In (c), the mass-spring system is set in motion. The mass stretches an additional distance yy and the following forces act on the spring:
  1. gravity =mg=m g;
  2. force due to spring =k(l+y)=-k(l+y);
  3. damping =μy=-\mu y^{\prime};
  4. external forces =F(t)=F(t).

Let us briefly discuss the last two forces. Realistically, the object is subject to a resistance force (e.g. due to surrounding air) which ultimately acts to bring the object back to the equilibrium position. This force is referred to as damping and, for simplicity, we assume that it is proportional to the velocity, v=dy/dtv=d y / d t, of the object. It follows that if the object is at rest, then it will not be subject to such resistive forces. The proportionality constant μ\mu is taken to be positive here and hence the damping force, μy-\mu y^{\prime} is considered to act against the direction of the velocity (the minus sign takes this into account). Finally, F(t)F(t) describes any external forces on the system (like, for example, a motor attached to the spring that drives the oscillations).

By taking into account the forces given above, then, the net force that may be acting on the system when it is in motion is described by

Fnet =mgk(l+y)μy+F(t),F_{\text {net }}=m g-k(l+y)-\mu y^{\prime}+F(t),

which, by using Eq. (13.116), may be expressed as:

Fnet =kyμy+F(t).F_{\text {net }}=-k y-\mu y^{\prime}+F(t) .

By Newton's second law of motion, we know that the net force acting on the system is proportional to its acceleration, aa,

Fnet =ma.F_{\text {net }}=m a .

The acceleration of the particle is equivalent to the change of velocity with time,

dvdt=ddt(dydt)=d2ydt2=y\frac{d v}{d t}=\frac{d}{d t}\left(\frac{d y}{d t}\right)=\frac{d^{2} y}{d t^{2}}=y^{\prime \prime}

Therefore, by Eqs. (13.118) and (13.119) and by making use of a=ya=y^{\prime \prime}, we have,

my+μy+ky=F(t).m y^{\prime \prime}+\mu y^{\prime}+k y=F(t) .

In standard form, Eq. (13.120) is:

y+2cy+ω02y=F(t),y^{\prime \prime}+2 c y^{\prime}+\omega_{0}^{2} y=F(t),

where 2c=μ/m2 c=\mu / m and ω02=k/m\omega_{0}^{2}=k / m. Equation (13.121) is known as the harmonic motion equation and it describes the displacement, yy, of the mass attached on the spring with time, tt. In (13.121), the term 2c2 c is referred to as the coefficient of resistance and ω0\omega_{0} is the natural, undamped frequency of motion.

Unforced, undamped motion

In this subsection, we look at unforced harmonic motion which means that we only consider cases in which F(t)=0F(t)=0,

y+2cy+ω02y=0y^{\prime \prime}+2 c y^{\prime}+\omega_{0}^{2} y=0

we also focus on the case of no damping; this implies that c=0c=0 in Eq. (13.122) reducing it to the simple harmonic motion equation given as follows,

y+ω02y=0.y^{\prime \prime}+\omega_{0}^{2} y=0 .

Since (13.123) is a homogeneous, constant coefficient ODE, we attempt to solve it algebraically, using the characteristic equation. The latter is given by,

m^2+ω02=0\hat{m}^{2}+\omega_{0}^{2}=0

where we are looking to solve for the roots, m^\hat{m}, of (13.124) (note: here, we use m^\hat{m} to denote the roots to distinguish from mm which represents the mass of the object). Since ω02>0\omega_{0}^{2}>0, the roots are complex:

m^1=ω0i and m^2=ω0i.\hat{m}_{1}=\omega_{0} i \quad \text { and } \quad \hat{m}_{2}=-\omega_{0} i .

The general solution is therefore given by:

y(t)=c1cos(ω0t)+c2sin(ω0t).y(t)=c_{1} \cos \left(\omega_{0} t\right)+c_{2} \sin \left(\omega_{0} t\right) .

The solution given by (13.126) implies that the temporal displacement of the object is described by oscillations with frequency ω0\omega_{0}. This is shown in Fig. 13.2: the mass oscillates between the locations AA and A-A.

Definitions

We have already defined the (natural) frequency of motion as ω0=k/m\omega_{0}=\sqrt{k / m}; therefore, given kk and mm we can calculate ω0\omega_{0}. The period of motion, TT, defined as the time required for one complete repetition of motion, is given by T=2π/ω0T=2 \pi / \omega_{0}.

Now, in Fig. 13.2, we observe that the object oscillates between AA and A-A where AA represents the amplitude of the motion. By solving the ODE, we end up with Eq. (13.126) and two unknown constants c1c_{1} and c2c_{2} which are determined through application of initial conditions. However, in describing the physical problem, it is more useful to express (13.126) in a way from which we can extract the amplitude of the motion. We therefore rewrite Eq. (13.126) a

y(t)=Acos(ω0tϕ),y(t)=A \cos \left(\omega_{0} t-\phi\right),

where ϕ\phi is the phase constant also known as phase angle or phase shift. This gives a measure of the offset of the wave from the cosine wave. The value of ϕ\phi depends on the initial conditions (see below) and it is defined within π<ϕ<π-\pi<\phi<\pi (in fact, it is defined on any range that describes the full circle, i.e. alternatively ϕ\phi may lie within 0<ϕ<2π0<\phi<2 \pi ). Note that, here, we take the ϕ\phi range to be between π-\pi and π\pi. We can show that Eqs. (13.126) and (13.127) are equivalent by recalling the cosine difference identity:

Acos(ω0tϕ)=Acos(ω0t)cosϕ+Asin(ω0t)sinϕ.A \cos \left(\omega_{0} t-\phi\right)=A \cos \left(\omega_{0} t\right) \cos \phi+A \sin \left(\omega_{0} t\right) \sin \phi .

Comparing Eqs. (13.126) to (13.128), it is easy to see that,

c1=Acosϕ and c2=Asinϕ.c_{1}=A \cos \phi \quad \text { and } \quad c_{2}=A \sin \phi .

From Eqs. (13.129), we have:

A=c12+c22 and tanϕ=c2c1A=\sqrt{c_{1}^{2}+c_{2}^{2}} \text { and } \tan \phi=\frac{c_{2}}{c_{1}}

The box below summarises the results from this section.

The solution to the simple harmonic equation,

y+ω02y=0,y^{\prime \prime}+\omega_{0}^{2} y=0,

is given by

y(t)=c1cos(ω0t)+c2sin(ω0t)y(t)=c_{1} \cos \left(\omega_{0} t\right)+c_{2} \sin \left(\omega_{0} t\right)

which is equivalent to,

y(t)=Acos(ω0tϕ).y(t)=A \cos \left(\omega_{0} t-\phi\right) .

where A=c12+c22A=\sqrt{c_{1}^{2}+c_{2}^{2}} is the amplitude of the motion, ω0=km\omega_{0}=\sqrt{\frac{k}{m}} is the frequency of the motion and ϕ\phi, calculated from tanϕ=c2/c1\tan \phi=c_{2} / c_{1} is the phase of the motion.

Note on calculating ϕ\phi :

As mentioned above, ϕ\phi is defined within the circle π<ϕ<π-\pi<\phi<\pi. However, ϕ\phi is calculated from

arctan(c2c1)\arctan \left(\frac{c_{2}}{c_{1}}\right)

and we know that

π2<arctan(c2c1)<π2-\frac{\pi}{2}<\arctan \left(\frac{c_{2}}{c_{1}}\right)<\frac{\pi}{2}

Therefore, we need to make sure that the calculated value of ϕ\phi satisfies the initial conditions which, in turn, means that it need to satisfy the constants c1c_{1} and c2c_{2}. Generally, for π<ϕ<π-\pi<\phi<\pi

  • if c1>0,ϕ=arctan(c2c1)c_{1}>0, \phi=\arctan \left(\frac{c_{2}}{c_{1}}\right);
  • if c1<0,c2>0,ϕ=arctan(c2c1)+πc_{1}<0, c_{2}>0, \phi=\arctan \left(\frac{c_{2}}{c_{1}}\right)+\pi
  • if c1<0,c2<0,ϕ=arctan(c2c1)πc_{1}<0, c_{2}<0, \phi=\arctan \left(\frac{c_{2}}{c_{1}}\right)-\pi.

Figure 13.2: The vertical mass-spring system executes simple harmonic motion, i.e. the system is not subject to any external forces or damping.

Unforced, damped motion

In this section, we consider the effects of damping on the resulting motion. In damped motion, μ\mu, the damping constant is greater than zero which implies that c>0c>0 in Eq. (13.122). To solve Eq. (13.122) we write down the characteristic equation,

m^2+2cm^+ω02=0.\hat{m}^{2}+2 c \hat{m}+\omega_{0}^{2}=0 .

The roots, m^\hat{m} of (13.131) are given by,

m^=c±c2ω02\hat{m}=-c \pm \sqrt{c^{2}-\omega_{0}^{2}}

It follows that the roots may be:

  1. real + distinct if c2ω02>0c^{2}-\omega_{0}^{2}>0;
  2. complex conjugates if c2ω02<0c^{2}-\omega_{0}^{2}<0;
  3. real + equal if c2ω02=0c^{2}-\omega_{0}^{2}=0.

Case 1: OVERDAMPED

If c2ω02>0c^{2}-\omega_{0}^{2}>0 in Eq. (13.132), the two roots are,

m^1=c+c2ω02 and m^2=cc2ω02.\hat{m}_{1}=-c+\sqrt{c^{2}-\omega_{0}^{2}} \text { and } \hat{m}_{2}=-c-\sqrt{c^{2}-\omega_{0}^{2}} .

The general solution for the overdamped case is:

y(t)=c1em^1t+c2em^2t.y(t)=c_{1} e^{\hat{m}_{1} t}+c_{2} e^{\hat{m}_{2} t} .

In the overdamped case, both roots are negative. Since ω02\omega_{0}^{2} is positive, it implies that c2ω02<c2c^{2}-\omega_{0}^{2}<c^{2}. Therefore,

c2ω02<c2\sqrt{c^{2}-\omega_{0}^{2}}<\sqrt{c^{2}}

Since m^1=c+c2ω02\hat{m}_{1}=-c+\sqrt{c^{2}-\omega_{0}^{2}}, using Eq. (13.135), we know that the term in red is <c<c and therefore m^1<0\hat{m}_{1}<0. Of course, m^2<m^1\hat{m}_{2}<\hat{m}_{1} and hence m^2<0\hat{m}_{2}<0 as well.

With both roots negative, the solution given by (13.134) is decaying as time increases. A plot of the solution is shown in Fig. 13.3. As time increases, the displacement approaches the equilibrium position given by y=0y=0.

Figure 13.3: The temporal displacement of the mass as described by solution (13.134). With increasing time tt, the mass approaches the equilibrium position given by y=0y=0. This case is referred to as overdamped.

Case 2: UNDERDAMPED

For c2ω02<0c^{2}-\omega_{0}^{2}<0, the roots are

m^1=c+(ω02c2)i and m^2=c(ω02c2)i\hat{m}_{1}=-c+\left(\sqrt{\omega_{0}^{2}-c^{2}}\right) i \text { and } \quad \hat{m}_{2}=-c-\left(\sqrt{\omega_{0}^{2}}-c^{2}\right) i

For complex roots, the solution is:

y(t)=ect[c1cos(ωt)+c2sin(ωt)]y(t)=e^{-c t}\left[c_{1} \cos (\omega t)+c_{2} \sin (\omega t)\right]

where ω=ω02c2\omega=\sqrt{\omega_{0}^{2}-c^{2}} is the frequency of the resulting motion which takes into account both the natural frequency, ω0\omega_{0} and the effects of damping. The solution given by (13.137), may be combined in a single cosine term as follows:

y(t)=Aect[cos(ωtϕ)]y(t)=A e^{-c t}[\cos (\omega t-\phi)]

Note that the amplitude of the motion is now given by the term AectA e^{-c t} which is a timedependent term. Since c>0c>0, then the amplitude decreases with increasing time. In fact, as t,Aect0t \rightarrow \infty, A e^{-c t} \rightarrow 0. The solution implies that the temporal displacement is described by oscillations whose amplitude decreases as tt increases. This motion is shown in Fig. 13.4.

Case 3: CRITICALLY DAMPED

Finally, we consider the case where c2ω02=0c^{2}-\omega_{0}^{2}=0, yielding only one root from the characteristic equation, equal to c-c. The resulting motion is therefore described by,

y(t)=c1ect+c2tect.y(t)=c_{1} e^{-c t}+c_{2} t e^{-c t} .

Figure 13.4: The temporal displacement of the mass as described by solution (13.138). The motion is described by oscillations whose amplitude decreases with increasing time. As tt \rightarrow \infty, the mass approaches the equilibrium position given by y=0y=0. This case is referred to as underdamped. The curves represented by dotted lines represent ±Aect\pm A e^{-c t}, where AA is the amplitude as defined in Subsec. 13.5.2.

Since c>0,y(t)c>0, y(t) decays with increasing time and approaches y=0y=0 as tt \rightarrow \infty. The solution given by (13.139) describes a critically damped system.

Critical damping coefficient

We can define a critical damping coefficient, denoted by μc\mu_{c} which marks the threshold level for overdamping and underdamping such that, if:

  • μ>μc\mu>\mu_{c}, the system is overdamped;
  • μ<μc\mu<\mu_{c}, the system is underdamped.

This is calculated from the following relations:

c2ω02=0,2c=μm, and ω0=km,c^{2}-\omega_{0}^{2}=0, \quad 2 c=\frac{\mu}{m}, \text { and } \omega_{0}=\frac{k}{m},

giving,

c2=ω02;(μc2m)2=km;μc=2km.\begin{aligned} c^{2} & =\omega_{0}^{2} ; \\ \left(\frac{\mu_{c}}{2 m}\right)^{2} & =\frac{k}{m} ; \\ \mu_{c} & =2 \sqrt{k m} . \end{aligned}

The solution given by (13.139) is plotted in Fig. 13.5. Note this looks similar to the overdamped case.

Figure 13.5: The temporal displacement of the mass as described by solution (13.139). The motion looks similar to the overdamped case shown in Fig. 13.3. As tt \rightarrow \infty, the mass approaches the equilibrium position given by y=0y=0. This case is referred to as critically damped. The critical damping coefficient at which this motion is observed is given by Eq. (13.140).

Forced motion

We now return to Eq. (13.121) with F(t)0F(t) \neq 0 which describes an oscillator that is subjected to an external force. We identify this as a nonhomogeneous LODE with constant coefficients. We know from the discussion on Subsec. 13.3.1 that the general solution of nonhomogeneous LODEs consists of two functions: the homogeneous and the particular solutions. If any damping is present in the system then, as seen in the previous subsections, the system returns to the equilibrium position, i.e. y=0y=0 as tt \rightarrow \infty. Regardless of damping effects, the function given by the particular solution persists for as long as the system is driven. Since damping is always present in practice, the particular solution determines the long-term behaviour of the system; for this reason, the term that depends on initial conditions (this is the homogeneous solution) is often referred to as the transient term. We consider both undamped and damped, forced motion in these notes. Finally, for the discussion here, the forcing term is taken to be sinusoidal, given by

F(t)=ksin(ωt),F(t)=k \sin (\omega t),

where kk is some constant and ω\omega is the driving frequency resulting from the external force.

Undamped motion

The equation describing undamped, forced motion with sinusoidal driving is

y+ω02y=ksin(ωt).y^{\prime \prime}+\omega_{0}^{2} y=k \sin (\omega t) .

The homogeneous version of Eq. (13.142) is the simple harmonic equation with the general solution given by (13.126). For the particular solution, yp(t)y_{p}(t), we note that the ODE (13.142) is linear with constant coefficients and the forcing term is given by a function with finite number of linearly independent derivatives, hence the MUC applies here. If ωω0\omega \neq \omega_{0}, then the forcing term does not clash with any part of the homogeneous solution and we assume the particular function to take the form

yp(t)=A1cos(ωt)+A2sin(ωt),y_{p}(t)=A_{1} \cos (\omega t)+A_{2} \sin (\omega t),

where A1A_{1} and A2A_{2} are the undetermined coefficients. Solving for the undetermined coefficients gives A1=0A_{1}=0 and

A2=kω02ω2A_{2}=\frac{k}{\omega_{0}^{2}-\omega^{2}}

The particular solution is given by

yp(t)=kω02ω2sin(ωt),y_{p}(t)=\frac{k}{\omega_{0}^{2}-\omega^{2}} \sin (\omega t),

where the coefficient of the sin(ωt)\sin (\omega t) term represents amplitude. While both kk and the natural frequency ω0\omega_{0} are fixed quantities for a particular system, the driving frequency ω\omega depends on the external force. As ωω0\omega \rightarrow \omega_{0}, the amplitude tends to infinity. In the absence of damping, when the driving frequency is equal to the natural frequency, we observe what is referred to as resonance. Figures 13.6-13.8 depict the solution for three different values of ω\omega. In Fig. 13.6, the driving and natural frequencies differ significantly and the system is far from resonance. Figure 13.7 shows the system close to resonance i.e. the difference between the two frequencies is small. Finally in Fig. 13.8, the motion of the undamped oscillator is at resonance with ω=ω0\omega=\omega_{0}. Mathematically, for the case

Figure 13.6: The motion of the linear, undamped oscillator is far from resonance.

ω=ω0\omega=\omega_{0}, the forcing term clashes with the homogeneous solution; the particular solution then takes a form which is linearly independent to yh(t)y_{h}(t) given by

yp(t)=t[A1cos(ω0t)+A2sin(ω0t)]y_{p}(t)=t\left[A_{1} \cos \left(\omega_{0} t\right)+A_{2} \sin \left(\omega_{0} t\right)\right]

Figure 13.7: With ωω0\omega \rightarrow \omega_{0}, the motion of the linear, undamped oscillator is close to resonance.

Figure 13.8: With ω=ω0\omega=\omega_{0}, the motion of the linear, undamped oscillator is at resonance.

where, again, A1A_{1} and A2A_{2} are undetermined. Solving for the undetermined coefficients, we now have A2=0A_{2}=0 and

A1=k2ω0A_{1}=-\frac{k}{2 \omega_{0}}

yielding the particular solution

yp(t)=kt2ω0cos(ω0t)y_{p}(t)=-\frac{k t}{2 \omega_{0}} \cos \left(\omega_{0} t\right)

which is unbounded as tt \rightarrow \infty.

Damped motion

With damping and sinusoidal driving the equation describing the motion is given by

y+2cy+ω02y=ksin(ωt)y^{\prime \prime}+2 c y^{\prime}+\omega_{0}^{2} y=k \sin (\omega t)

The form of the homogeneous solution, yh(t)y_{h}(t), depends on whether the system is underdamped, overdamped, or critically damped. In all cases however, the component of the displacement given by yh(t)y_{h}(t), i.e. the transient term, decays as tt \rightarrow \infty. For this reason, we focus our discussion here on the form of the particular solution. From Eq. (13.145), the particular solution takes the form

yp(t)=A1cos(ωt)+A2sin(ωt)y_{p}(t)=A_{1} \cos (\omega t)+A_{2} \sin (\omega t)

Solving for A1A_{1} and A2A_{2} gives

A1=2cωk(ω02ω2)2+4c2ω2 and A2=(ω02ω2)k(ω02ω2)2+4c2ω2.A_{1}=-\frac{2 c \omega k}{\left(\omega_{0}^{2}-\omega^{2}\right)^{2}+4 c^{2} \omega^{2}} \quad \text { and } \quad A_{2}=\frac{\left(\omega_{0}^{2}-\omega^{2}\right) k}{\left(\omega_{0}^{2}-\omega^{2}\right)^{2}+4 c^{2} \omega^{2}} .

Using the cosine difference identity given by (13.128), it is possible to write the particular solution as follows

yp(t)=k(ω02ω2)2+4c2ω2cos(ωtϕ)y_{p}(t)=\frac{k}{\sqrt{\left(\omega_{0}^{2}-\omega^{2}\right)^{2}+4 c^{2} \omega^{2}}} \cos (\omega t-\phi)

where

A=k(ω02ω2)2+4c2ω2A=\frac{k}{\sqrt{\left(\omega_{0}^{2}-\omega^{2}\right)^{2}+4 c^{2} \omega^{2}}}

is the amplitude and tanϕ=(ω2ω02)/2cω\tan \phi=\left(\omega^{2}-\omega_{0}^{2}\right) / 2 c \omega. Again, note that, with ω0\omega_{0} and kk fixed, the amplitude AA is a function of the driving frequency, ω\omega. Its maximum value is reached when dA/dω=0d A / d \omega=0 which occurs at

ω2=ω022c2\omega^{2}=\omega_{0}^{2}-2 c^{2}

In the presence of damping, the maximum amplitude represents the oscillator at resonance. Note that resonance can only occur if c<ω0/2c<\omega_{0} / \sqrt{2}. Solutions for the damped, linear oscillator far from resonance and at resonance are shown in Figs. 13.9 and 13.10, respectively.

Figure 13.9: Motion of a weakly damped (c<ω0/2)\left(c<\omega_{0} / \sqrt{2}\right), linear oscillator far from resonance.

Figure 13.10: Motion of a weakly damped (c<ω0/2)\left(c<\omega_{0} / \sqrt{2}\right), linear oscillator at resonance. The maximum amplitude occurs at ω2=ω022c2\omega^{2}=\omega_{0}^{2}-2 c^{2}.

Exercises

  1. (a) A 1 kg1 \mathrm{~kg} mass on a spring is subject to a restoring force whose values in newtons is 100 times the displacement of the mass in metres. Calculate the natural frequency of this oscillator.

(b) The mass is also subject to a damping force that may be adjusted but is also equal to a constant (say, kk ) times the speed of the mass, in the opposite direction to its motion. Show that the equation of motion is

y+ky+100y=0y^{\prime \prime}+k y^{\prime}+100 y=0

and find the value of kk associated with critical damping.

(c) Consider the cases k=25,20k=25,20, and 16. For each, find the motion of a particle released from rest with a positive displacement of 1 metre. Sketch all three solutions on the same pair of axes.

  1. For the oscillator with equation of motion
y+ky+10y=Acos(ωt),y^{\prime \prime}+k y^{\prime}+10 y=A \cos (\omega t),

(a) Find the general solution.

(b) Show that the system is undergoing resonance in just one of the cases: k=5k=5 and k=4k=4, and find the resonant frequency in this case.