DifferentialEquations
Chapter 5 · Section 5.1

5.1 The Mass–Spring Equation

Almost every mechanical structure vibrates: a bridge deck under traffic, a washing machine on its feet, a car on its springs, the cantilever inside an accelerometer. The simplest model that captures this behaviour is a mass hanging from a spring. It is simple enough to solve exactly, yet it contains all the important ideas: natural frequency, damping, steady-state response and resonance. In this section we derive its differential equation carefully. The care pays off: most mistakes in vibration problems are sign or unit mistakes made while setting up the equation, not while solving it.

Hooke's law and the spring constant

Pull on the end of a coil spring and it stretches. For moderate stretches the force needed is proportional to the stretch.

Definition 5.1.1 (Hooke's law, spring constant)

A spring obeys Hooke's law if the magnitude of the force it exerts is proportional to its elongation (the change in length from its natural, unstretched length):

The positive constant is the spring constant (or stiffness). In SI units is measured in newtons per metre (N/m). The spring force always points so as to bring the spring back toward its natural length: it pulls when the spring is stretched and pushes when it is compressed.

A large means a stiff spring. Hooke's law is a model, not a law of nature: it holds only while the stretch is small compared with the size of the spring. Beyond that the coils may touch or the material may yield. Throughout this chapter we assume we stay in the linear range.

The quickest way to measure is to hang a known mass on the spring and let it come to rest. If the spring stretches by , the spring force balances the weight , so

We use throughout.

Common mistake: mass versus weight

A problem may give a weight in newtons instead of a mass in kilograms. A body that "weighs 49 N" has mass kg. Newton's second law needs the mass; Hooke's law at equilibrium needs the weight . Write the units next to every number and the mix-up cannot happen.

Setting up the problem

A spring of natural length hangs from a fixed support. We attach a body of mass to its lower end and let it come to rest. The spring is now stretched by ; this rest position is the equilibrium position. Then we set the body moving: we pull or push it away from equilibrium, give it a velocity, or let an external force act on it. Figure 5.1.1 shows the three stages.

Figure 5.1.1. (a) The spring alone. (b) With the mass at rest, the spring is stretched by ; this level is . (c) During the motion the mass is below equilibrium, the total stretch is , and two forces act: gravity (down) and the spring force of magnitude (up).

We describe the motion with one coordinate:

  • is the displacement of the mass from its equilibrium position, in metres, at time in seconds;
  • the positive direction is downward. So means "below equilibrium" and means "above equilibrium";
  • a force is counted as positive when it points downward.

The velocity is and the acceleration is . A positive velocity means the mass is moving down.

The four forces

We now list every force on the mass and write each one with its correct sign, using the convention "down is positive".

1. Gravity

Gravity always points down, so .

2. The spring force

When the mass is at position , the total elongation of the spring is . If this is positive the spring is stretched and pulls the mass up, which is the negative direction. So

Check the other case: if the mass is so high that , the spring is compressed and pushes the mass down. The formula gives , a downward force. The single formula is right in both cases, which is why sign conventions are worth the trouble.

3. The damping force

Air, oil, or a purpose-built damper (a dashpot, a piston moving in a cylinder of oil) resists the motion. For moderate speeds a good model is viscous damping: the resisting force is proportional to the speed and opposes the velocity,

When the mass moves down () the force is upward (); when it moves up () the force is downward. The constant is the damping constant, measured in N·s/m (newtons per metre-per-second). Other kinds of friction exist (dry friction of constant size, air drag proportional to ), but they lead to nonlinear equations, which we do not treat here.

4. External forces

Any other force acting on the mass (a motor, an out-of-balance rotor, a magnet, a support that is shaken) is collected into one function , positive when it points down.

Figure 5.1.2. The standard schematic: spring and dashpot in parallel, the mass , and the external force . Both spring and dashpot connect the mass to the fixed support.

Newton's second law and the disappearance of gravity

Newton's second law says mass times acceleration equals the total force:

The bracket is zero because at equilibrium the spring force balances gravity: . Moving the remaining terms to the left gives the central equation of this chapter.

Theorem 5.1.1 (Equation of motion of a mass–spring–damper)

Let be the displacement from the equilibrium position, positive downward. If the spring obeys Hooke's law and the damping is viscous, then

where is the mass (kg), the damping constant (N·s/m), the spring constant (N/m) and the external force (N). If is continuous on an interval containing , then for any and there is exactly one solution with and , and it exists on that whole interval.

The uniqueness part is Theorem 4.1.1 applied to a second-order linear equation whose leading coefficient is never zero. Physically it says what we expect: once we know where the mass starts and how fast it moves, its future is determined.

Why measuring from equilibrium is so convenient

Gravity has vanished from the equation. It has not stopped acting; it is exactly balanced by the part of the spring force. By choosing the origin at equilibrium instead of at the end of the unstretched spring, we absorbed both into the coordinate. A spring lying on a frictionless horizontal table gives the very same equation, with measured from the natural length: there the equilibrium stretch is zero. Example 5.1.3 shows what happens if you insist on measuring from the unstretched end.

Vocabulary and the plan of the chapter

Two yes/no questions sort every problem into one of four types:

  • Is there damping? If the motion is undamped; if it is damped.
  • Is there an external force? If the motion is free; otherwise it is forced.
(free) (forced)
(undamped) — Section 5.2 — Sections 5.4, 5.5
(damped) — Section 5.3 — Sections 5.4, 5.5

In every case the equation is linear with constant coefficients, so Chapter 4 solves it: the characteristic equation gives , and undetermined coefficients gives .

Translating words into initial conditions

The initial conditions are and . With "down is positive":

  • "pulled down 4 cm below equilibrium" means m; "pushed up 4 cm above equilibrium" means m;
  • "released from rest" means ;
  • "given a downward velocity of 0.5 m/s" means ; "an upward velocity of 0.5 m/s" means ;
  • "struck while at rest in the equilibrium position" means and .

Convert centimetres to metres and grams to kilograms before you start. Mixed units are the second most common source of wrong answers.

Method in a nutshell: setting up a mass–spring problem
  1. Convert all data to SI units (kg, m, s, N).
  2. Find (from a weight, divide by ).
  3. Find from Hooke's law: a force producing stretch gives ; the mass itself at rest with stretch gives .
  4. Find from the damping data: a resisting force at speed gives . If damping is neglected, .
  5. Write the external force (positive down); if there is none.
  6. Write and translate the words into and , with signs.
  7. Optionally divide by to make the leading coefficient before solving.

Worked examples

Example 5.1.1

A body of mass 0.5 kg is hung from a spring, which stretches 9.8 cm as the body comes to rest. The body is then pulled down 3 cm below its equilibrium position and released with an upward velocity of 0.4 m/s. Damping is negligible and no external force acts. Write the initial-value problem for the displacement.

Solution
  1. Units. kg, m, m.
  2. Spring constant. At equilibrium , so
  3. Damping and force. and : free, undamped motion.
  4. Initial conditions. "Pulled down" gives ; "upward velocity" gives .
  5. Answer. or, after dividing by , . We solve it in Example 5.2.1.
Example 5.1.2

A 2 kg mass hangs from a spring with spring constant 90 N/m. It is attached to a dashpot that exerts a resisting force of 3 N when the mass moves at 0.25 m/s. From an external force N (positive downward) acts on the mass. Initially the mass is held 10 cm above its equilibrium position and released from rest. Set up the initial-value problem.

Solution
  1. Mass and stiffness. kg and N/m are given directly.
  2. Damping constant. The damping force is in size, so , giving N·s/m.
  3. Force. .
  4. Initial conditions. "10 cm above equilibrium" gives ; "from rest" gives .
  5. Answer. equivalently . This is forced, damped motion; it is solved in Example 5.4.1.
Example 5.1.3 (Measuring from the wrong origin)

The 0.5 kg body of Example 5.1.1 is attached to the unstretched spring ( N/m) and released from rest there. Let be the stretch of the spring, i.e. the distance of the body below the end of the unstretched spring. Find the equation for , solve it, and find the largest stretch.

Solution
  1. Forces in terms of . Gravity is ; the spring force is (the stretch is now itself). Newton's law gives Gravity appears as a constant forcing term.
  2. Particular solution. Try a constant : , so . This is exactly the equilibrium stretch found in Example 5.1.1.
  3. Complementary solution. gives , so .
  4. Initial conditions. gives , so . Since , .
  5. Solution.
  6. Largest stretch. is largest (equal to ) when , e.g. at s. So the largest stretch is m, twice the static stretch.
  7. Connection with . Writing , i.e. , the constant term disappears and satisfies with , . Same motion, simpler equation.
Figure 5.1.3. Example 5.1.3: a mass released at the unstretched position oscillates about the equilibrium stretch , reaching . A suddenly applied load produces twice the deflection of the same load applied slowly, a fact designers of cranes and lifts must allow for.

Energy: what damping does

Multiply the equation by . Since and , we get

The term is never positive: the damper only removes energy. The term is the power delivered by the external force; it can add or remove energy. With and the energy is constant. (Here the "potential energy" already includes gravity, again because we measure from equilibrium.) We will use this identity to explain why free undamped motion never dies out and why damped motion always does.

Exercises

Use and take positive downward unless stated otherwise.

  1. A 0.8 kg mass stretches a spring 9.8 cm when it hangs at rest. Find the spring constant.
    Answer N/m
  2. A force of 15 N stretches a spring 6 cm. What mass, hanging at rest, stretches it 4 cm?
    Answer N/m, kg
  3. A 1.5 kg mass hangs from a spring with N/m. It is pulled 8 cm below equilibrium and released with an upward velocity of 0.3 m/s. Damping is negligible. Write the initial-value problem.
    Answer (i.e. ), ,
  4. A 0.5 kg mass hangs from a spring with N/m and is connected to a dashpot that resists with 2.4 N at a speed of 0.8 m/s. An external force N acts. The mass starts at equilibrium with a downward speed of 0.2 m/s. Write the initial-value problem.
    Answer N·s/m; , ,
  5. A body weighing 49 N stretches a spring 0.2 m at equilibrium. Find and , and write the equation of free undamped motion.
    Answer kg, N/m;
  6. Redo the derivation of Theorem 5.1.1 with the coordinate measured from equilibrium but positive upward, and the upward component of the external force. What equation do you get?
    Answer : the same form; only the meaning of the signs changes.
  7. A 2 kg mass is attached to the end of an unstretched spring with N/m and released from rest. With the stretch of the spring and no damping, find and the largest stretch.
    Answer m; largest stretch m
  8. Show that every solution of satisfies .
    Answer Differentiate the bracket to get and replace by .
  9. A 3 kg block lies on a frictionless horizontal table, attached to a wall by a spring with N/m. It is pulled 0.1 m away from its rest position, stretching the spring, and released from rest. Write the initial-value problem, with positive in the direction of stretching.
    Answer , , . Gravity does not enter.
  10. A 4 kg block on a smooth plane inclined at is attached to a spring ( N/m) fixed at the top of the incline. Find the equilibrium stretch, and show that with measured along the incline from equilibrium (positive down the slope) the free motion satisfies .
    Answer m; the component of gravity cancels exactly as in Theorem 5.1.1.
  11. Classify each motion as free/forced and damped/undamped: (a) ; (b) ; (c) ; (d) .
    Answer (a) free, undamped; (b) free, damped; (c) forced, undamped; (d) forced (constant force), damped