Learning Objectives
- Solve a second-order differential equation representing simple harmonic motion.
- Solve a second-order differential equation representing damped simple harmonic motion.
- Solve a second-order differential equation representing forced simple harmonic motion.
Simple Harmonic Motion
Consider a mass suspended from a spring attached to a rigid support. (This is commonly called a spring-mass system.) Gravity is pulling the mass downward and the restoring force of the spring is pulling the mass upward. As shown in Figure 1, when these two forces are equal, the mass is said to be at the equilibrium position. If the mass is displaced from equilibrium, it oscillates up and down. This behavior can be modeled by a second-order constant-coefficient differential equation.

Figure 1. A spring in its natural position (a), at equilibrium with a mass m attached (b), and in oscillatory motion (c).
Let x(t)x(t) denote the displacement of the mass from equilibrium. Note that for spring-mass systems of this type, it is customary to adopt the convention that down is positive. Thus, a positive displacement indicates the mass is below the equilibrium point, whereas a negative displacement indicates the mass is above equilibrium. Displacement is usually given in feet in the English system or meters in the metric system.
Consider the forces acting on the mass. The force of gravity is given by mgmg. In the English system, mass is in slugs and the acceleration resulting from gravity is in feet per second squared. The acceleration resulting from gravity is constant, so in the English system, g=32g=32 ft/sec2. Recall that 1 slug-foot/sec2 is a pound, so the expression mg can be expressed in pounds. Metric system units are kilograms for mass and m/sec2 for gravitational acceleration. In the metric system, we have g=9.8g=9.8 m/sec2.
According to Hooke’s law, the restoring force of the spring is proportional to the displacement and acts in the opposite direction from the displacement, so the restoring force is given by −k(s+x)−k(s+x). The spring constant is given in pounds per foot in the English system and in newtons per meter in the metric system.
Now, by Newton’s second law, the sum of the forces on the system (gravity plus the restoring force) is equal to mass times acceleration, so we have
mx′′=−k(s+x)+mg=−ks−kx+mgmx′′=−k(s+x)+mg=−ks−kx+mg.
However, by the way we have defined our equilibrium position, mg=ksmg=ks, the differential equation becomes
mx′′+kx=0mx′′+kx=0.
It is convenient to rearrange this equation and introduce a new variable, called the angular frequency, ωω. Letting ω=√k/mω=√k/m, we can write the equation as
x′′+ω2x=0x′′+ω2x=0.
This differential equation has the general solution
x(t)=c1cosωt+c2sinωtx(t)=c1cosωt+c2sinωt,
which gives the position of the mass at any point in time. The motion of the mass is called simple harmonic motion. The period of this motion (the time it takes to complete one oscillation) is T=2πωT=2πω and the frequency is f=1T=ω2πf=1T=ω2π (Figure 2).

Figure 2. A graph of vertical displacement versus time for simple harmonic motion.
Example: simple harmonic motion
Assume an object weighing 22 lb stretches a spring 66 in. Find the equation of motion if the spring is released from the equilibrium position with an upward velocity of 1616 ft/sec. What is the period of the motion?
try it
A 200200-g mass stretches a spring 55 cm. Find the equation of motion of the mass if it is released from rest from a position 1010 cm below the equilibrium position. What is the frequency of this motion?
Writing the general solution in the form x(t)=c1cos(ωt)+c2sin(ωt)x(t)=c1cos(ωt)+c2sin(ωt) has some advantages. It is easy to see the link between the differential equation and the solution, and the period and frequency of motion are evident. This form of the function tells us very little about the amplitude of the motion, however. In some situations, we may prefer to write the solution in the form
x(t)=Asin(ωt+ϕ)x(t)=Asin(ωt+ϕ).
Although the link to the differential equation is not as explicit in this case, the period and frequency of motion are still evident. Furthermore, the amplitude of the motion, AA, is obvious in this form of the function. The constant ϕϕ is called a phase shift and has the effect of shifting the graph of the function to the left or right.
To convert the solution to this form, we want to find the values of AA and ϕϕ such that
c1cos(ωt)+c2sin(ωt)=Asin(ωt+ϕ)c1cos(ωt)+c2sin(ωt)=Asin(ωt+ϕ).
We first apply the trigonometric identity
sin(α+β)=sinαcosβ+cosαsinβsin(α+β)=sinαcosβ+cosαsinβ
to get
c1cos(ωt)+c2sin(ωt)=A(sin(ωt)cosϕ+cos(ωt)sinϕ)=Asinϕ(cos(ωt))+Acosϕ(sin(ωt))c1cos(ωt)+c2sin(ωt)=A(sin(ωt)cosϕ+cos(ωt)sinϕ)=Asinϕ(cos(ωt))+Acosϕ(sin(ωt)).
Thus,
c1=Asinϕ and c2=Acosϕc1=Asinϕ and c2=Acosϕ.
If we square both of these equations and add them together, we get
c21+c22=A2sin2ϕ+A2cos2ϕ=A2(sin2ϕ+cos2ϕ)=A2c21+c22=A2sin2ϕ+A2cos2ϕ=A2(sin2ϕ+cos2ϕ)=A2.
Thus,
A=√c21+c22A=√c21+c22.
Now, to find ϕϕ, go back to the equations for c1c1 and c2c2, but this time, divide the first equation by the second equation to get
c1c2=AsinϕAcosϕ=tanϕc1c2=AsinϕAcosϕ=tanϕ.
Then,
tanϕ=c1c2tanϕ=c1c2.
We summarize this finding in the following theorem.
theorem: solution to the equation for simple harmonic motion
The function x(t)=c1cos(ωt)+c2sin(ωt)x(t)=c1cos(ωt)+c2sin(ωt) can be written in the form x(t)=Asin(ωt+ϕ)x(t)=Asin(ωt+ϕ), where A=√c21+c22A=√c21+c22 and tanϕ=c1c2tanϕ=c1c2.
Note that when using the formula tanϕ=c1c2tanϕ=c1c2 to find ϕϕ, we must take care to ensure ϕϕ is in the right quadrant (Figure 3).

Figure 3. A graph of vertical displacement versus time for simple harmonic motion with a phase change.
Example: expressing the solution with a phase shift
Express the following functions in the form A(sinωt+ϕ)A(sinωt+ϕ). What is the frequency of motion? The amplitude?
- x(t)=2cos(3t)+sin(3t)x(t)=2cos(3t)+sin(3t)
- x(t)=3cos(2t)−2sin(2t)x(t)=3cos(2t)−2sin(2t)
try it
Express the function x(t)=cos(4t)+4sin(4t)x(t)=cos(4t)+4sin(4t) in the form Asin(ωt+ϕ)Asin(ωt+ϕ). What is the frequency of motion? The amplitude?
Watch the following video to see the worked solution to the above Try It
Damped Vibrations
With the model just described, the motion of the mass continues indefinitely. Clearly, this doesn’t happen in the real world. In the real world, there is almost always some friction in the system, which causes the oscillations to die off slowly—an effect called damping. So now let’s look at how to incorporate that damping force into our differential equation.
Physical spring-mass systems almost always have some damping as a result of friction, air resistance, or a physical damper, called a dashpot (a pneumatic cylinder; see Figure 4).

Figure 4. A dashpot is a pneumatic cylinder that dampens the motion of an oscillating system.
Because damping is primarily a friction force, we assume it is proportional to the velocity of the mass and acts in the opposite direction. So the damping force is given by −bx′−bx′ for some constant b>0b>0. Again applying Newton’s second law, the differential equation becomes
mx′′+bx′+kx=0mx′′+bx′+kx=0.
Then the associated characteristic equation is
mλ2+bλ+k=0mλ2+bλ+k=0.
Applying the quadratic formula, we have
λ=−b±√b2−4mk2mλ=−b±√b2−4mk2m.
Just as in Second-Order Linear Equations we consider three cases, based on whether the characteristic equation has distinct real roots, a repeated real root, or complex conjugate roots.
Case 1: b2>4mkb2>4mk
In this case, we say the system is overdamped. The general solution has the form
x(t)=c1eλ1t+c2eλ2tx(t)=c1eλ1t+c2eλ2t,
where both λ1λ1 and λ2λ2 are less than zero. Because the exponents are negative, the displacement decays to zero over time, usually quite quickly. Overdamped systems do not oscillate (no more than one change of direction), but simply move back toward the equilibrium position. Figure 5 shows what typical critically damped behavior looks like.

Figure 5. Behavior of an overdamped spring-mass system, with no change in direction (a) and only one change in direction (b).
Example: overdamped spring-mass system
A 1616-lb mass is attached to a 1010-ft spring. When the mass comes to rest in the equilibrium position, the spring measures 1515 ft 44 in. The system is immersed in a medium that imparts a damping force equal to 5252 times the instantaneous velocity of the mass. Find the equation of motion if the mass is pushed upward from the equilibrium position with an initial upward velocity of 55 ft/sec. What is the position of the mass after 1010 sec? Its velocity?
try it
A22-kg mass is attached to a spring with spring constant 2424 N/m. The system is then immersed in a medium imparting a damping force equal to 1616 times the instantaneous velocity of the mass. Find the equation of motion if it is released from rest at a point 4040 cm below equilibrium.
Watch the following video to see the worked solution to the above Try It
Case 2: b2=4mkb2=4mk
In this case, we say the system is critically damped. The general solution has the form
x(t)=c1eλ1t+c2eλ2tx(t)=c1eλ1t+c2eλ2t,
where λ1λ1 is less than zero. The motion of a critically damped system is very similar to that of an overdamped system. It does not oscillate. However, with a critically damped system, if the damping is reduced even a little, oscillatory behavior results. From a practical perspective, physical systems are almost always either overdamped or underdamped (case 3, which we consider next). It is impossible to fine-tune the characteristics of a physical system so that b2b2 and 4mk4mk are exactly equal. Figure 6 shows what typical critically damped behavior looks like.

Figure 6. Behavior of a critically damped spring-mass system. The system graphed in part (a) has more damping than the system graphed in part (b).
Example: critically damped spring-mass system
A 11-kg mass stretches a spring 2020 cm. The system is attached to a dashpot that imparts a damping force equal to 1414 times the instantaneous velocity of the mass. Find the equation of motion if the mass is released from equilibrium with an upward velocity of 33 m/sec.
try it
A 11-lb weight stretches a spring 66 in., and the system is attached to a dashpot that imparts a damping force equal to half the instantaneous velocity of the mass. Find the equation of motion if the mass is released from rest at a point 66 in. below equilibrium.
Case 3: b2<4mkb2<4mk
In this case, we say the system is underdamped. The general solution has the form
x(t)=eαt(c1cos(βt)+sin(βt))x(t)=eαt(c1cos(βt)+sin(βt)),
where αα is less than zero. Underdamped systems do oscillate because of the sine and cosine terms in the solution. However, the exponential term dominates eventually, so the amplitude of the oscillations decreases over time. Figure 7 shows what typical underdamped behavior looks like.

Figure 7. Behavior of an underdamped spring-mass system.
Note that for all damped systems, limt→∞x(t)=0limt→∞x(t)=0. The system always approaches the equilibrium position over time.
Example: underdamped spring-mass system
A 1616-lb weight stretches a spring 3.23.2 ft. Assume the damping force on the system is equal to the instantaneous velocity of the mass. Find the equation of motion if the mass is released from rest at a point 99 in. below equilibrium.
try it
A 11-kg mass stretches a spring 4949 cm. The system is immersed in a medium that imparts a damping force equal to four times the instantaneous velocity of the mass. Find the equation of motion if the mass is released from rest at a point 2424 cm above equilibrium.
Example: chapter opener: modeling a motorcycle suspension system

Figure 8. (credit: modification of work by nSeika, Flickr)
For motocross riders, the suspension systems on their motorcycles are very important. The off-road courses on which they ride often include jumps, and losing control of the motorcycle when they land could cost them the race.
This suspension system can be modeled as a damped spring-mass system. We define our frame of reference with respect to the frame of the motorcycle. Assume the end of the shock absorber attached to the motorcycle frame is fixed. Then, the “mass” in our spring-mass system is the motorcycle wheel. We measure the position of the wheel with respect to the motorcycle frame. This may seem counterintuitive, since, in many cases, it is actually the motorcycle frame that moves, but this frame of reference preserves the development of the differential equation that was done earlier. As with earlier development, we define the downward direction to be positive.
When the motorcycle is lifted by its frame, the wheel hangs freely and the spring is uncompressed. This is the spring’s natural position. When the motorcycle is placed on the ground and the rider mounts the motorcycle, the spring compresses and the system is in the equilibrium position (Figure 9).

Figure 9. We can use a spring-mass system to model a motorcycle suspension.
This system can be modeled using the same differential equation we used before:
mx′′+bx′+kx=0mx′′+bx′+kx=0.
A motocross motorcycle weighs 204204 lb, and we assume a rider weight of 180180 lb. When the rider mounts the motorcycle, the suspension compresses 44 in., then comes to rest at equilibrium. The suspension system provides damping equal to 240240 times the instantaneous vertical velocity of the motorcycle (and rider).
- Set up the differential equation that models the behavior of the motorcycle suspension system.
- We are interested in what happens when the motorcycle lands after taking a jump. Let time t=0t=0 denote the time when the motorcycle first contacts the ground. If the motorcycle hits the ground with a velocity of 1010 ft/sec downward, find the equation of motion of the motorcycle after the jump.
- Graph the equation of motion over the first second after the motorcycle hits the ground.
Activity: landing vehicle
NASA is planning a mission to Mars. To save money, engineers have decided to adapt one of the moon landing vehicles for the new mission. However, they are concerned about how the different gravitational forces will affect the suspension system that cushions the craft when it touches down. The acceleration resulting from gravity on the moon is 1.61.6 m/sec2, whereas on Mars it is 3.73.7 m/sec2.
The suspension system on the craft can be modeled as a damped spring-mass system. In this case, the spring is below the moon lander, so the spring is slightly compressed at equilibrium, as shown in Figure 11.

Figure 11. The landing craft suspension can be represented as a damped spring-mass system. (credit “lander”: NASA)
We retain the convention that down is positive. Despite the new orientation, an examination of the forces affecting the lander shows that the same differential equation can be used to model the position of the landing craft relative to equilibrium:
mx′′+bx′+kx=0mx′′+bx′+kx=0,
where mm is the mass of the lander, bb is the damping coefficient, and kk is the spring constant.
- The lander has a mass of 15,00015,000 kg and the spring is 22 m long when uncompressed. The lander is designed to compress the spring 0.50.5 m to reach the equilibrium position under lunar gravity. The dashpot imparts a damping force equal to 48,00048,000 times the instantaneous velocity of the lander. Set up the differential equation that models the motion of the lander when the craft lands on the moon.
- Let time t=0t=0 denote the instant the lander touches down. The rate of descent of the lander can be controlled by the crew, so that it is descending at a rate of 22 m/sec when it touches down. Find the equation of motion of the lander on the moon.
- If the lander is traveling too fast when it touches down, it could fully compress the spring and “bottom out.” Bottoming out could damage the landing craft and must be avoided at all costs. Graph the equation of motion found in part 2. If the spring is 0.50.5 m long when fully compressed, will the lander be in danger of bottoming out?
- Assuming NASA engineers make no adjustments to the spring or the damper, how far does the lander compress the spring to reach the equilibrium position under Martian gravity?
- If the lander crew uses the same procedures on Mars as on the moon, and keeps the rate of descent to 22 m/sec, will the lander bottom out when it lands on Mars?
- What adjustments, if any, should the NASA engineers make to use the lander safely on Mars?
Forced Vibrations
The last case we consider is when an external force acts on the system. In the case of the motorcycle suspension system, for example, the bumps in the road act as an external force acting on the system. Another example is a spring hanging from a support; if the support is set in motion, that motion would be considered an external force on the system. We model these forced systems with the nonhomogeneous differential equation
mx′′+bx′+kx=f(t)mx′′+bx′+kx=f(t),
where the external force is represented by the f(t)f(t) term. As we saw in Nonhomogenous Linear Equations, differential equations such as this have solutions of the form
x(t)=c1x1(t)+c2x2(t)+xp(t)x(t)=c1x1(t)+c2x2(t)+xp(t),
interactive
This website shows a simulation of forced vibrations.
Example: forced vibrations
A mass of 11 slug stretches a spring 22 ft and comes to rest at equilibrium. The system is attached to a dashpot that imparts a damping force equal to eight times the instantaneous velocity of the mass. Find the equation of motion if an external force equal to f(t)=8sin(4t)f(t)=8sin(4t) is applied to the system beginning at time t=0t=0. What is the transient solution? What is the steady-state solution?
try it
A mass of 22 kg is attached to a spring with constant 3232 N/m and comes to rest in the equilibrium position. Beginning at time t=0t=0, an external force equal to f(t)=68e−2tcos(4t)f(t)=68e−2tcos(4t) is applied to the system. Find the equation of motion if there is no damping. What is the transient solution? What is the steady-state solution?
Watch the following video to see the worked solution to the above Try It
student project: resonance
Consider an undamped system exhibiting simple harmonic motion. In the real world, we never truly have an undamped system; –some damping always occurs. For theoretical purposes, however, we could imagine a spring-mass system contained in a vacuum chamber. With no air resistance, the mass would continue to move up and down indefinitely.
The frequency of the resulting motion, given by f=1T=ω2πf=1T=ω2π, is called the natural frequency of the system. If an external force acting on the system has a frequency close to the natural frequency of the system, a phenomenon called resonance results. The external force reinforces and amplifies the natural motion of the system.
- Consider the differential equation x′′+x=0x′′+x=0. Find the general solution. What is the natural frequency of the system?
- Now suppose this system is subjected to an external force given by f(t)=5costf(t)=5cost. Solve the initial-value problem x′′+x=5costx′′+x=5cost, x(0)=0x(0)=0, x′(0)=1x′(0)=1.
- Graph the solution. What happens to the behavior of the system over time?
- In the real world, there is always some damping. However, if the damping force is weak, and the external force is strong enough, real-world systems can still exhibit resonance. One of the most famous examples of resonance is the collapse of the Tacoma Narrows Bridge on November 7, 1940. The bridge had exhibited strange behavior ever since it was built. The roadway had a strange “bounce” to it. On the day it collapsed, a strong windstorm caused the roadway to twist and ripple violently. The bridge was unable to withstand these forces and it ultimately collapsed. Experts believe the windstorm exerted forces on the bridge that were very close to its natural frequency, and the resulting resonance ultimately shook the bridge apart.
interactive
This website contains more information about the collapse of the Tacoma Narrows Bridge.
interactive
During the short time the Tacoma Narrows Bridge stood, it became quite a tourist attraction. Several people were on site the day the bridge collapsed, and one of them caught the collapse on film. Watch the video (unavailable) to see the collapse.
- Another real-world example of resonance is a singer shattering a crystal wineglass when she sings just the right note. When someone taps a crystal wineglass or wets a finger and runs it around the rim, a tone can be heard. That note is created by the wineglass vibrating at its natural frequency. If a singer then sings that same note at a high enough volume, the glass shatters as a result of resonance.
interactive
The TV show Mythbusters aired an episode on this phenomenon. Adam Savage described the experience. Watch this video (page not found) for his account.
Candela Citations
- CP 7.16. Authored by: Ryan Melton. License: CC BY: Attribution
- CP 7.17. Authored by: Ryan Melton. License: CC BY: Attribution
- CP 7.20. Authored by: Ryan Melton. License: CC BY: Attribution
- Calculus Volume 3. Authored by: Gilbert Strang, Edwin (Jed) Herman. Provided by: OpenStax. Located at: https://openstax.org/books/calculus-volume-3/pages/1-introduction. License: CC BY-NC-SA: Attribution-NonCommercial-ShareAlike. License Terms: Access for free at https://openstax.org/books/calculus-volume-3/pages/1-introduction