Differential Equations for EngineersXYZ Homework Edition

⇩ Download ▾

2.4 Mechanical Vibrations

Let us look at some applications of linear second order constant coefficient equations.

Some examples

Diagram of a forced, damped mass-spring system: a hatched wall, spring k, block m, damping c on the surface, and an arrow F of t driving the block to the right.
Figure 1\PageIndex{1}

Our first example is a mass on a spring. Suppose we have a mass m>0m > 0 (in kilograms) connected by a spring with spring constant k>0k > 0 (in newtons per meter) to a fixed wall. There may be some external force F(t)F(t) (in newtons) acting on the mass. Finally, there is some friction measured by c0c \geq 0 (in newton-seconds per meter) as the mass slides along the floor (or perhaps there is a damper connected).

Let xx be the displacement of the mass ( x=0x = 0 is the rest position), with xx growing to the right (away from the wall). The force exerted by the spring is proportional to the compression of the spring by Hooke’s law. Therefore, it is kxkx in the negative direction. Similarly the amount of force exerted by friction is proportional to the velocity of the mass. By Newton’s second law we know that force equals mass times acceleration and hence mx=F(t)cxkxmx'' = F(t) - cx' - kx or

m x + c x + k x = F ( t ) mx'' + cx' + kx = F(t) \nonumber

This is a linear second order constant coefficient ODE. We set up some terminology about this equation. We say the motion is

  1. forced, if F0F \not \equiv 0 (if FF is not identically zero),
  2. unforced or free, if F0F \equiv 0 (if FF is identically zero),
  3. damped, if c>0c > 0, and
  4. undamped, if c=0c = 0.

This system appears in lots of applications even if it does not at first seem like it. Many real-world scenarios can be simplified to a mass on a spring. For example, a bungee jump setup is essentially a mass and spring system (you are the mass). It would be good if someone did the math before you jump off the bridge, right? Let us give two other examples.

Here is an example for electrical engineers. Consider the pictured RLCRLC circuit. There is a resistor with a resistance of RR ohms, an inductor with an inductance of LL henries, and a capacitor with a capacitance of CC farads. There is also an electric source (such as a battery) giving a voltage of E(t)E(t) volts at time tt (measured in seconds). Let Q(t)Q(t) be the charge in coulombs on the capacitor and I(t)I(t) be the current in the circuit. The relation between the two is Q=IQ' = I. By elementary principles we find LI+RI+QC=EL I' + RI + \frac{Q}{C} = E. We differentiate to get

L I ( t ) + R I ( t ) + 1 C I ( t ) = E ( t ) . L I''(t) + R I'(t) + \frac{1}{C} I(t) = E'(t). \nonumber

Diagram of a series circuit loop with a voltage source E, capacitor C, inductor L and resistor R in turn, so one current flows through all four.
Figure 2\PageIndex{2}

This is a nonhomogeneous second order constant coefficient linear equation. As L,RL, R, and CC are all positive, this system behaves just like the mass and spring system. Position of the mass is replaced by current. Mass is replaced by inductance, damping is replaced by resistance, and the spring constant is replaced by one over the capacitance. The change in voltage becomes the forcing function—for constant voltage this is an unforced motion.

Our next example behaves like a mass and spring system only approximately. Suppose a mass mm hangs on a pendulum of length LL. We seek an equation for the angle θ(t)\theta(t) (in radians). Let gg be the force of gravity. Elementary physics mandates that the equation is

θ+gLsinθ=0.\theta'' + \frac{g}{L} \sin \theta = 0. \nonumber

Force diagram of a pendulum: rod of length L swung right of vertical by angle theta, bob m on an arc, with arrows for gravity m g, the tangential component m g sine theta, and m L theta double-prime opposing it.
Figure 3\PageIndex{3}

Let us derive this equation using Newton's second law: force equals mass times acceleration. The acceleration is LθL \theta'' and mass is mm. So mLθmL\theta'' has to be equal to the tangential component of the force given by the gravity, which is mgsinθm g \sin \theta in the opposite direction. So mLθ=mgsinθmL\theta'' = -mg \sin \theta. The mm curiously cancels from the equation.

Now we make our approximation. For small θ\theta we have that approximately sinθθ\sin \theta \approx \theta. This can be seen by looking at the graph. In Figure 4\PageIndex{4} we can see that for approximately 0.5<θ<0.5-0.5 < \theta < 0.5 (in radians) the graphs of sinθ\sin \theta and θ\theta are almost the same.

Plot of a green line of slope 1 and a blue curve on axes from -1 to 1; the two are indistinguishable between about -0.5 and 0.5, and the blue ends near 0.84 at angle 1.
Figure 4\PageIndex{4}: The graphs of sinθ\sin\theta and θ\theta (in radians).

Therefore, when the swings are small, θ\theta is small and we can model the behavior by the simpler linear equation

θ+gLθ=0.\theta'' + \frac{g}{L} \theta = 0. \nonumber

The errors from this approximation build up. So after a long time, the state of the real-world system might be substantially different from our solution. Also we will see that in a mass-spring system, the amplitude is independent of the period. This is not true for a pendulum. Nevertheless, for reasonably short periods of time and small swings (that is, only small angles θ\theta), the approximation is reasonably good.

In real-world problems it is often necessary to make these types of simplifications. We must understand both the mathematics and the physics of the situation to see if the simplification is valid in the context of the questions we are trying to answer.

Free Undamped Motion

In this section we will only consider free or unforced motion, as we cannot yet solve nonhomogeneous equations. Let us start with undamped motion where c=0c = 0. We have the equation

m x + k x = 0 mx'' + kx = 0 \nonumber

If we divide by mm and let w0=kmw_0 = \sqrt { \dfrac {k}{m} }, then we can write the equation as

x + w 0 2 x = 0 x'' + w^2_0 x = 0 \nonumber

The general solution to this equation is

x ( t ) = A cos ( w 0 t ) + B sin ( w 0 t ) x(t) = A \cos (w_0t) + B \sin (w_0t) \nonumber

By a trigonometric identity, we have that for two different constants CC and γ\gamma, we have

A cos ( w 0 t ) + B sin ( w 0 t ) = C cos ( w 0 t γ ) A \cos (w_0t) + B \sin (w_0t) = C \cos (w_0t - \gamma ) \nonumber

It is not hard to compute that C=A2+B2C = \sqrt { A^2 + B^2 } and tanγ=BA\tan \gamma = \dfrac {B}{A}. Therefore, we let CC and γ\gamma be our arbitrary constants and write x(t)=Ccos(w0tγ)x(t) = C \cos (w_0t - \gamma ).

While it is generally easier to use the first form with AA and BB to solve for the initial conditions, the second form is much more natural. The constants CC and γ\gamma have very nice interpretation. We look at the form of the solution

x ( t ) = C cos ( w 0 t γ ) x(t) = C \cos (w_0t - \gamma ) \nonumber

We can see that the amplitude is CC, w0w_0 is the (angular) frequency, and γ\gamma is the so-called phase shift. The phase shift just shifts the graph left or right. We call w0w_0 the natural (angular) frequency. This entire setup is usually called simple harmonic motion.

Let us pause to explain the word angular before the word frequency. The units of w0w_0 are radians per unit time, not cycles per unit time as is the usual measure of frequency. Because we know one cycle is 2π2 \pi radians, the usual frequency is given by w02π\dfrac {w_0}{ 2 \pi}. It is simply a matter of where we put the constant 2π2 \pi, and that is a matter of taste.

The period of the motion is one over the frequency (in cycles per unit time) and hence 2πw0\dfrac {2 \pi}{w_0}. That is the amount of time it takes to complete one full oscillation.

x ( t ) = A cos ( w 0 t ) + B sin ( w 0 t ) x(t) = A \cos (w_0t) + B \sin (w_0t) \nonumber

corresponds to the initial conditions x(0)=Ax(0) = A and x(0)=w0Bx'(0) = w_0B. Therefore, it is easy to figure out AA and BB from the initial conditions. The amplitude and the phase shift can then be computed from AA and BB. In the example, we have already found the amplitude CC. Let us compute the phase shift. We know that tanγ=BA=1\tan \gamma = \dfrac {B}{A} = 1. We take the arctangent of 1 and get approximately 0.785. We still need to check if this γ\gamma is in the correct quadrant (and add π\pi to γ\gamma if it is not). Since both AA and BB are positive, then γ\gamma should be in the first quadrant, and 0.785 radians really is in the first quadrant.

Free Damped Motion

Let us now focus on damped motion. Let us rewrite the equation

m x + c x + k x = 0 mx'' + cx' + kx = 0 \nonumber

as

x + 2 p x + w 0 2 x = 0 x'' + 2px' + w^2_0x = 0 \nonumber

where

w 0 = k m , p = c 2 m w_0 = \sqrt {\dfrac {k}{m}},\quad p = \dfrac {c}{2m} \nonumber

The characteristic equation is

r 2 + 2 p r + w 0 2 = 0 r^2 + 2pr + w^2_0 = 0 \nonumber

Using the quadratic formula we get that the roots are

r = p ± p 2 w 0 2 r = -p \pm \sqrt { p^2 - w^2_0} \nonumber

The form of the solution depends on whether we get complex or real roots. We get real roots if and only if the following number is nonnegative:

p 2 w 0 2 = ( c 2 m ) 2 k m = c 2 4 k m 4 m 2 p^2 - w^2_0 = { ( \dfrac {c}{2m} )}^2 - \dfrac {k}{m} = \dfrac {c^2 -4km}{4m^2} \nonumber

The sign of p2w02p^2 - w^2_0 is the same as the sign of c24kmc^2 - 4km. Thus we get real roots if and only if c24kmc^2 - 4km is nonnegative, or in other words if c24kmc^2 \ge 4km.

Overdamping

When c24km>0c^2 - 4km > 0, we say the system is overdamped. In this case, there are two distinct real roots r1r_1 and r2r_2. Notice that both roots are negative. As p2w02\sqrt {p^2 - w^2_0} is always less than PP, then P±P2w02-P \pm \sqrt {P^2 - w^2_0} is negative.

The solution is

x(t)=C1er1t+C2er2tx(t) = C_1e^{r_1t} + C_2e^{r_2t} \nonumber

Since r1,r2r_1, r_2 are negative, x(t)0x(t) \rightarrow 0 as tt \rightarrow \infty. Thus the mass will tend towards the rest position as time goes to infinity. For a few sample plots for different initial conditions (Figure 6\PageIndex{6}).

Three solution curves over time 0 to 100, all starting at 1 and settling to zero without oscillating: blue first rises to about 1.57, green falls monotonically, red dips to about -0.13.
Figure 6\PageIndex{6}: Overdamped motion for several different initial conditions.

Do note that no oscillation happens. In fact, the graph will cross the xx axis at most once. To see why, we try to solve 0=C1er1t+C2er2t0 = C_1e^{r_1t} + C_2e^{r_2t}. Therefore, C1er1t=C2er2tC_1e^{r_1t} = -C_2e^{r_2t} and using laws of exponents we obtain

C 1 C 2 = e ( r 2 r 1 ) t \dfrac {-C_1}{C_2} = e^{{(r_2 - r_1)}t} \nonumber

This equation has at most one solution t0t \ge 0. For some initial conditions the graph will never cross the xx axis, as is evident from the sample graphs.

Critical damping

When c24km=0c^2 - 4km = 0, we say the system is critically damped. In this case, there is one root of multiplicity 2 and this root is P-P. Therefore, our solution is

x ( t ) = C 1 e p t + C 2 t e p t x(t) = C_1e^{-pt} + C_2te^{-pt} \nonumber

The behavior of a critically damped system is very similar to an overdamped system. After all a critically damped system is in some sense a limit of overdamped systems. Since these equations are really only an approximation to the real world, in reality we are never critically damped, it is a place we can only reach in theory. We are always a little bit underdamped or a little bit overdamped. It is better not to dwell on critical damping.

Underdamping

Plot of a blue underdamped oscillation over time 0 to 30 starting at 1, period about 6.3, peaks shrinking through 0.53, 0.29, 0.17 and 0.09 between green and red exponential envelopes.
Figure 7\PageIndex{7}: Underdamped motion with the envelope curves shown.

When c24km<0c^2 - 4km < 0, we say the system is underdamped. In this case, the roots are complex.

r = p ± p 2 w 0 2 = p ± 1 w 0 2 p 2 = p ± i w 1 \begin{align}\begin{aligned} r &= -p \pm \sqrt { p^2 - w^2_0} \\ &= -p \pm \sqrt {-1} \sqrt {w^2_0 - p^2} \\ & = -p \pm iw_1 \end{aligned}\end{align} \nonumber

where w1=w02p2w_1 = \sqrt { w^2_0 - p^2 }. Our solution is

x ( t ) = e p t ( A cos ( w 1 t ) + B sin ( w 1 t ) x(t) = e^{-pt} ( A \cos (w_1t) + B \sin (w_1t) \nonumber

or

x ( t ) = C e p t cos ( w 1 t γ ) x(t) = Ce^{-pt} \cos ( w_1t - \gamma) \nonumber

An example plot is given in Figure 7\PageIndex{7}. Note that we still have that x(t)0x(t) \rightarrow 0 as tt \rightarrow \infty.

In the figure we also show the envelope curves CeptCe^{-pt} and Cept- Ce^{pt}. The solution is the oscillating line between the two envelope curves. The envelope curves give the maximum amplitude of the oscillation at any given point in time. For example if you are bungee jumping, you are really interested in computing the envelope curve so that you do not hit the concrete with your head.

Interactive figureDamped free vibration with its envelope curves, from undamped through to overdampedDrag the Damping c slider from 0 to 3.
An oscillation starts high on the left and shrinks as it runs to the right, every crest just touching a dashed curve that sweeps down toward the horizontal axis and every trough touching its mirror image below. Turning the damping down opens those two envelopes into horizontal lines and the wave runs on forever at full height; turning it up closes them faster and stretches the oscillation out, until past a threshold it disappears entirely and the curve simply sinks to rest without crossing the axis again. Adjustable parameter: Damping c (c) = 0.5 N·s/m. Viewing window: x from -0.33 to 12.13, y from -3.85 to 3.85.
XYZ Graph · viewer build 5edf91b
Free motion for m = k = 1, so p = c/2 and w0 = 1. The solid curve is x(t) = 3e^(-pt)cos(w1 t) with w1 = sqrt(1 - c^2/4); the dashed curves are the envelopes +/-3e^(-pt), and because the phase shift is 0 the envelope touches the solution at every crest. Slide c down to 0 and the envelopes flatten into horizontal lines and the curve becomes the simple undamped oscillation of Figure 5. Raise c and w1 shrinks, exactly as the text predicts, until at c = 2 (c^2 = 4km) the upper envelope has collapsed onto the solution; past that the cosine becomes a cosh, the envelopes drop away, and what is left is the non-oscillating decay of Figure 6.

The phase shift γ\gamma just shifts the graph left or right but within the envelope curves (the envelope curves do not change if γ\gamma changes).

Finally note that the angular pseudo-frequency1(we do not call it a frequency since the solution is not really a periodic function) w1w_1 becomes smaller when the damping cc (and hence PP) becomes larger. This makes sense. When we change the damping just a little bit, we do not expect the behavior of the solution to change dramatically. If we keep making cc larger, then at some point the solution should start looking like the solution for critical damping or overdamping, where no oscillation happens. So if c2c^2 approaches 4km4km, we want w1w_1 to approach 0.

On the other hand when cc becomes smaller, w1w_1 approaches w0w_0 ( w1w_1 is always smaller than w0w_0 ), and the solution looks more and more like the steady periodic motion of the undamped case. The envelope curves become flatter and flatter as cc (and hence PP ) goes to 0.

Footnotes

[1] We do not call ω1\omega_{1} a frequency since the solution is not really a periodic function.

Adapted from Differential Equations for Engineers by Jiří Lebl (https://www.jirka.org/diffyqs/), © Jiří Lebl, licensed under CC BY-SA 4.0. Changes were made. License: CC-BY-SA-4.0.

These eBooks are a prerelease and are not yet certified conformant with WCAG 2.1 AA or ADA Title II. Every page is built against an automated accessibility gate, and the published editions will meet ADA Title II requirements when they release in late September 2026. If something is unusable, please tell us.