Interactive Mass-Spring-Damper System

Visualize and explore how damping, mass, and stiffness shape system dynamics

The Physical System

The equation of motion for a mass attached to a spring with damping is:

$$m\,y'' + c\,y' + k\,y = F(t)$$

where:

Key Decomposition

The total solution splits into two complementary parts:

yc (Complementary/Natural Response): How the system vibrates on its own, determined solely by m, c, and k. This is the solution to the homogeneous equation my'' + cy' + ky = 0.

yp (Particular/Forced Response): How the system responds to the external input F(t). This depends on the forcing function.

Total Solution: y(t) = yc(t) + yp(t)

Live Mass-Spring-Damper Animation

Watch the physical system move in real time. Adjust parameters, then press Play to see the mass oscillate, with force arrows and a live displacement trace.

1.0 kg
1.0 N·s/m
4.0 N/m
1.5 m
1.0x
Physical System
t = 0.00 s
Displacement & Forces vs Time
Real-Time Force Magnitudes
Spring (Fs)
0.0 N Damping (Fd)
0.0 N External (Fe)
0.0 N
Underdamped — ζ = 0.250 — ωn = 2.00 rad/s

Interactive Simulator

1.0 kg
1.0 N·s/m
4.0 N/m

Initial Conditions

1.0 m
0.0 m/s

Position vs Time

Phase Portrait (Velocity vs Position)

System Behavior Classification

The system's response is determined by the discriminant D = c² − 4mk:

Underdamped System

Characteristic Equation: mr² + cr + k = 0

The system oscillates with decreasing amplitude. Like a guitar string after being plucked.

Natural Frequency: ωn = 2.0 rad/s

Damping Ratio: ζ = 0.25

📝 Exam-Style Practice Problems

These problems are similar in style and difficulty to past exam questions. Click each problem to reveal the step-by-step solution.

Practice 1: Free system with $m=2, c=8, k=8$ — classify and solve

Solution

Step 1: Form the characteristic equation. For $mx(t)'' + cx'(t) + kx(t) = 0$:

$$2r^2 + 8r + 8 = 0 \quad \Rightarrow \quad r^2 + 4r + 4 = 0$$

Step 2: Factor and find roots.

$$(r+2)^2 = 0 \quad \Rightarrow \quad r = -2 \text{ (repeated)}$$

Step 3: Classify the damping. Check the discriminant: $D = c^2 - 4mk = 64 - 64 = 0$. Since $D = 0$, this is critically damped.

Step 4: Interpret the classification. The damping coefficient $\zeta = \dfrac{c}{2\sqrt{mk}} = \dfrac{8}{2\sqrt{2 \cdot 8}} = \dfrac{8}{8} = 1$. When $\zeta = 1$, the system is critically damped — it returns to equilibrium as quickly as possible without oscillating.

Step 5: General solution. For a repeated root $r_0 = -2$:

$$\boxed{x(t) = (c_1 + c_2 t)e^{-2t}}$$

The term $(c_1 + c_2 t)$ decays exponentially as $e^{-2t}$, ensuring the system settles without bouncing.

Practice 2: Underdamped IVP with $m=1, c=2, k=5$; $x(0)=1, x'(0)=0$

Solution

Step 1: Form the characteristic equation.

$$r^2 + 2r + 5 = 0$$

Step 2: Use the quadratic formula.

$$r = \frac{-2 \pm \sqrt{4-20}}{2} = \frac{-2 \pm \sqrt{-16}}{2} = \frac{-2 \pm 4i}{2} = -1 \pm 2i$$

Step 3: Classify the damping. The discriminant is $D = c^2 - 4mk = 4 - 20 = -16 < 0$. This is underdamped ($\zeta = \dfrac{2}{2\sqrt{5}} \approx 0.447 < 1$). The system oscillates with decreasing amplitude.

Step 4: General solution. From $r = -1 \pm 2i$, we have $\alpha = -1$ and $\beta = 2$:

$$x(t) = e^{-t}(c_1\cos(2t) + c_2\sin(2t))$$

Step 5: Apply initial condition $x(0) = 1$.

$$1 = e^0(c_1\cos 0 + c_2\sin 0) = c_1 \quad \Rightarrow \quad c_1 = 1$$

Step 6: Find the derivative.

$$x'(t) = -e^{-t}(c_1\cos(2t) + c_2\sin(2t)) + e^{-t}(-2c_1\sin(2t) + 2c_2\cos(2t))$$

Step 7: Apply initial condition $x'(0) = 0$.

$$0 = -e^0(c_1 + 0) + e^0(0 + 2c_2) = -c_1 + 2c_2 = -1 + 2c_2$$
$$c_2 = \frac{1}{2}$$

Step 8: Particular solution.

$$\boxed{x(t) = e^{-t}\left(\cos(2t) + \frac{1}{2}\sin(2t)\right)}$$

The exponential envelope $e^{-t}$ damps the oscillation at frequency $\beta = 2$ rad/s. As $t \to \infty$, $x(t) \to 0$.

Real-World Examples

Car Suspension

Critically damped suspensions provide the smoothest ride—the car returns to level without bouncing. Too much damping makes it feel stiff; too little makes it bouncy.

Building During Earthquake

Tall buildings act as damped oscillators. Engineers must understand resonance—when the earthquake frequency matches the building's natural frequency, amplification occurs.

Speaker Cone

A speaker cone is a driven damped oscillator. The forcing is the electrical signal; the response is sound. Proper damping prevents distortion.

Door Closer

A critically damped door closer closes smoothly without slamming or bouncing. Adjust the damping coefficient to control closure speed.

Connection to Chapter 2 Topics

How It All Fits Together

Section 2.1 (Homogeneous DEs): You learned to find yc, the natural response determined by the characteristic equation mr² + cr + k = 0. The three cases (overdamped, critically damped, underdamped) directly correspond to the three cases of the discriminant.

Section 2.2 (Undetermined Coefficients): You learned to find yp for common forcing functions like constants and sinusoids. Use the method based on the form of F(t).

Here: You see both working together in real time. The sliders let you explore how changes in m, c, and k affect the natural response, and how different forcing functions shape the forced response. The visualization makes the theory come alive.

Key Takeaways