Skip to content
Tactiverge

Textbooks/Applied Engineering Mathematics/Chapter 4Lite (plain text) version

4Differential equations and stability

Version 1 · Technically checked (automated checks only) · 4 source lessons · 8 practice items

Text
All chapters and search
  1. 1. Linear systems in practice
  2. 2. Least squares and model fitting
  3. 3. Linearisation, Jacobians and Newton's method
  4. 4. Differential equations and stability
  5. 5. Fourier and transform thinking
  6. 6. Numerical methods and their errors
  7. 7. Statistics for engineering evidence
  8. 8. Estimation and error budgets

Introduction

A second-order equation for a mass on a spring becomes two first-order equations, x′ = A·x, once you choose position and velocity as the state. Then a single matrix answers the big question: will the system settle? Its eigenvalues are the poles. Negative real parts mean decay, imaginary parts mean oscillation, and the slowest pole sets how long you wait. Power iteration shows how the dominant eigenvalue can be found by repetition alone.

ReImstable: Re < 0-1-4-1 + 3i-1 − 3i× [[0, 1], [−4, −5]] ○ [[0, 1], [−10, −2]]
Figure 4.1. Poles in the complex plane. The complex plane with the stable left half shaded. The overdamped matrix [[0, 1], [−4, −5]] has real poles at −1 and −4. The underdamped matrix [[0, 1], [−10, −2]] has poles at −1 + 3i and −1 − 3i: it oscillates while its envelope decays like e^(−t).

Explanation

This chapter is built from 4 School lessons. Each part below is the lesson's own explanation; open the lesson for its predict-and-discover activities.

4.1 From one second-order equation to two first-order ones

Computers can only take small steps forward. How do you step forward an equation that talks about acceleration?

Any order, first-order steps

An nth-order equation needs n initial conditions, so it has n states. Define x₁ = y, x₂ = ẏ, …, xₙ = y⁽ⁿ⁻¹⁾. Each state's derivative is the next state, except the last, which comes from the original equation.

The A and B matrices

For linear systems the right-hand sides are weighted sums, so they fit in matrices: dx/dt = A·x + B·u. A says how the states push on each other; B says how the input pushes on each state. The same code steps any system once you supply A and B.

Eigenvalues preview

Each eigenvalue λ of A gives a mode that behaves like e^(λt). Negative real part: decays. Positive: grows. Imaginary part: oscillates. You will use this in week 15; for now, notice that the phase-plane readout's eigenvalues change exactly when the picture changes shape.

Derivation: Mass–spring–damper in state-space form
  1. Start from Newton's second law for a mass on a spring with a damper: m·ẍ = F − c·ẋ − k·x.

  2. Choose states x₁ = x (position) and x₂ = ẋ (velocity). Then ẋ₁ = x₂ by definition.

  3. Divide Newton's law by m: ẋ₂ = ẍ = −(k/m)·x₁ − (c/m)·x₂ + F/m.

  4. Stack them: d/dt [x₁; x₂] = [[0, 1], [−k/m, −c/m]]·[x₁; x₂] + [0; 1/m]·F. That is dx/dt = A·x + B·u with u = F.

  5. The eigenvalues of A solve λ² + (c/m)·λ + k/m = 0, the same characteristic equation as the original ODE: λ = −ζωn ± ωn√(ζ² − 1).

Common mix-ups

  • State-space form is a different model from the differential equation.
    ✓ It is the same model written differently. The characteristic polynomial, and so the behaviour, is identical.

Open the full lesson: From one second-order equation to two first-order ones →

4.2 Stable means bounded

A pencil balanced on its tip and a pencil lying flat both sit still. Only one of them is stable. What test tells them apart?

BIBO stability

A system is BIBO stable if every bounded input produces a bounded output. For linear systems this is the same as every natural mode decaying. A response that grows without limit after a small push, however slowly, is unstable.

Poles tell you

Each pole p of a linear system contributes e^(pt) to the response. Write p = σ + jω. If σ < 0 the mode decays, if σ > 0 it grows, and ω ≠ 0 makes it oscillate. So the test is simple: every pole in the left half-plane means stable.

Marginal cases

A pole exactly on the imaginary axis (σ = 0) neither grows nor decays: an undamped spring oscillates forever; a pure integrator holds its value. These are marginally stable: a bounded input at the right frequency can still make the output grow, so engineers treat them as not good enough.

Common mix-ups

  • If a system sits still, it is stable.
    ✓ Stability is about what happens after a disturbance. An inverted pencil can sit still and still be unstable.
  • A slowly growing oscillation is 'nearly stable'.
    ✓ Any positive real part eventually dominates. Unstable is unstable.

Open the full lesson: Stable means bounded →

4.3 Eigenvalues: stability from the A matrix

You have the A matrix of a robot joint but no time to simulate it. Can two numbers tell you whether it will settle?

Eigenvalues of a 2×2

For A = [[a, b], [c, d]] the eigenvalues solve λ² − (trace)·λ + det = 0, with trace = a + d and det = ad − bc. So λ = trace/2 ± √(trace²/4 − det). Complex when det > trace²/4.

Reading the result

Real part negative: that mode decays like e^(Re λ·t). Positive: grows. Imaginary part ω: oscillation at ω rad/s. For a 2×2 system, both real parts are negative exactly when trace < 0 and det > 0: a two-second stability check.

Linking back to ζ and ωn

For a mass–spring–damper, det = k/m = ωn² and trace = −c/m = −2ζωn. So the eigenvalues are −ζωn ± ωn√(ζ² − 1): the same poles as before. State-space and second-order thinking are one idea seen two ways.

Common mix-ups

  • If most eigenvalues are negative, the system is mostly stable.
    ✓ One eigenvalue with positive real part makes the whole system unstable.

Open the full lesson: Eigenvalues: stability from the A matrix →

4.4 Power iteration: eigenvalues by repetition

Multiply a random vector by a matrix again and again. Why does it always end up pointing the same way?

The algorithm

Start with x₀ (not perpendicular to the dominant eigenvector). Repeat: y = A·xₖ, xₖ₊₁ = y/‖y‖. Estimate λ with the Rayleigh quotient r = xᵀAx / xᵀx. Normalising stops the numbers overflowing or underflowing; it does not change the direction.

Why it works and how fast

Write x₀ = c₁v₁ + c₂v₂ with |λ₁| > |λ₂|. Then Aᵏx₀ = λ₁ᵏ(c₁v₁ + c₂(λ₂/λ₁)ᵏv₂). The v₂ part dies like |λ₂/λ₁|ᵏ. For symmetric A, the Rayleigh quotient error dies even faster, like |λ₂/λ₁|²ᵏ.

Variations

If |λ₁| = |λ₂| (for example eigenvalues 2 and −2, or a complex pair), the direction never settles. Inverse iteration (apply A⁻¹, by solving with LU) finds the smallest eigenvalue; shifted inverse iteration with (A − σI)⁻¹ finds the one nearest σ. Production libraries use the QR algorithm, which is a sophisticated relative.

Common mix-ups

  • Power iteration finds all the eigenvalues.
    ✓ It finds the dominant one. Deflation, inverse iteration or QR are needed for the rest.
  • Normalising changes the answer.
    ✓ It only rescales; the direction, and so the estimate, is unchanged.

Open the full lesson: Power iteration: eigenvalues by repetition →

Worked examples

From one second-order equation to two first-order ones: example 1

Write L·di/dt + R·i + q/C = V(t) with q the capacitor charge (i = dq/dt) in state-space form.

Solution

States x₁ = q, x₂ = i. Then ẋ₁ = x₂ and ẋ₂ = (V − R·x₂ − x₁/C)/L. So A = [[0, 1], [−1/(LC), −R/L]], B = [0; 1/L]. It has the same shape as the mass–spring–damper with m ↔ L, c ↔ R, k ↔ 1/C.

Stable means bounded: example 1

Poles at −2, −0.5 ± 4j. Stable? Which mode lasts longest?

Solution

All real parts are negative: stable. The pair at −0.5 decays slowest (envelope halves every ln 2/0.5 ≈ 1.4 s) and oscillates at 4 rad/s, so the response will ring for a few seconds.

Eigenvalues: stability from the A matrix: example 1

m = 1, c = 2, k = 5. Find the eigenvalues, ζ and ωn.

Solution

A = [[0, 1], [−5, −2]]: trace −2, det 5. λ = −1 ± 2j. ωn = √5 = 2.24 rad/s, ζ = 2/(2√5) = 0.447. Check: −ζωn = −1 ✓.

Power iteration: eigenvalues by repetition: example 1

One step of power iteration on A = [[2, 1], [1, 2]] from x₀ = (1, 0). Find the new estimate.

Solution

A x₀ = (2, 1); normalise: x₁ = (2, 1)/√5. Ax₁ = (5, 4)/√5. Rayleigh quotient = x₁·Ax₁ = (10 + 4)/5 = 2.8. (True λ₁ = 3.)

Interactive figures

Figure 4.2 from From one second-order equation to two first-order onesSet c = 0 and k = 4 and check the eigenvalues read 0 ± 2j. Now raise c slowly. Find the value of c where the eigenvalues stop having an imaginary part, and check it against c = 2√(km).
Can't use the interactive? Read a description instead

With damping c = 0 and stiffness 4, the phase-plane path is a closed ellipse and the eigenvalues are 0 ± 2j. As c increases the path becomes an inward spiral and the eigenvalues get a negative real part. At c = 4 (twice the square root of k times m) the imaginary part vanishes and the path slides into the origin without circling.

Interactive figure (online). Description: With damping c = 0 and stiffness 4, the phase-plane path is a closed ellipse and the eigenvalues are 0 ± 2j. As c increases the path becomes an inward spiral and the eigenvalues get a negative real part. At c = 4 (twice the square root of k times m) the imaginary part vanishes and the path slides into the origin without circling.

Figure 4.3 from Stable means boundedMove σ from −3 to +1 with ω = 3. Note the σ where the response stops dying away. Then set ω = 0 and repeat. Describe in one sentence what σ controls and what ω controls.
Can't use the interactive? Read a description instead

The pole locator shows an s-plane with the right half shaded as unstable and a plot of e^(σt)·cos(ωt). With σ negative the oscillation dies away; at σ = 0 it keeps a constant size; with σ positive it grows. Raising ω makes the oscillation faster without changing whether it grows.

Interactive figure (online). Description: The pole locator shows an s-plane with the right half shaded as unstable and a plot of e^(σt)·cos(ωt). With σ negative the oscillation dies away; at σ = 0 it keeps a constant size; with σ positive it grows. Raising ω makes the oscillation faster without changing whether it grows.

Figure 4.4 from Power iteration: eigenvalues by repetitionStep through [[2, 1], [1, 2]] and then the 'close eigenvalues' matrix. Count how many steps each needs before the estimate stops changing in the third digit, and compare with |λ₂/λ₁| in the readout.
Can't use the interactive? Read a description instead

The power-iteration animator steps a unit vector through repeated multiplication by A, plotting previous iterates as dots and the dominant eigen-line as a band. A table lists the estimate at each step; a step button works without animation, and Play is disabled under reduced motion.

Interactive figure (online). Description: The power-iteration animator steps a unit vector through repeated multiplication by A, plotting previous iterates as dots and the dominant eigen-line as a band. A table lists the estimate at each step; a step button works without animation, and Play is disabled under reduced motion.

Laboratory

Everything runs in your browser. No kit, nothing mains-powered. Simulations are simplified educational models.

  • Equation Lab exploration

    Equation Lab: Oscillator

    Set damping so the response is underdamped, critical and overdamped, and match each to where its poles sit.

    Open Equation Lab: Oscillator →
  • Simulation OS experiment

    Simulation OS: PID step response

    Raise the proportional gain step by step and describe how the decay and oscillation of the response change.

    Open Simulation OS: PID step response →

Guided practice

Answers are checked on the server; wrong answers get a hint and another try. Signed in, solved items also count towards the source lesson.

Practice 1

In A = [[0, 1], [−k/m, −c/m]], what does the entry −c/m in the bottom-right mean?

Practice 2

How many states does d³y/dt³ + 2ÿ + 3ẏ + y = u need?

Practice 3

Which set of poles gives a stable system?

Practice 4

Poles at −10 and −0.2. Which dominates the long-term response?

Practice 5

A has trace −3 and determinant 2. Stable?

Practice 6

A = [[0, 1], [−10, −2]]. What is the size of the imaginary part of its eigenvalues (rad/s)?

rad/s

Practice 7

With |λ₂/λ₁| = 0.5, about how many steps reduce the unwanted component by a factor of 10⁶? (Nearest whole step.)

Practice 8

To find the smallest-magnitude eigenvalue, you…

  1. In A = [[0, 1], [−k/m, −c/m]], what does the entry −c/m in the bottom-right mean?
    • How position affects velocity's rate
    • How velocity affects its own rate of change: damping
    • The input gain
    • The spring stiffness
  2. How many states does d³y/dt³ + 2ÿ + 3ẏ + y = u need?
    • 1
    • 2
    • 3
    • 4
  3. Which set of poles gives a stable system?
    • −1, +0.5
    • −2 ± 3j
    • 0 ± 2j
    • +1 ± j
  4. Poles at −10 and −0.2. Which dominates the long-term response?
    • −10, because it is bigger
    • −0.2, because it decays more slowly
    • Both equally
    • Neither
  5. A has trace −3 and determinant 2. Stable?
    • Yes
    • No
    • Marginal
    • Can't tell
  6. A = [[0, 1], [−10, −2]]. What is the size of the imaginary part of its eigenvalues (rad/s)? (rad/s)
  7. With |λ₂/λ₁| = 0.5, about how many steps reduce the unwanted component by a factor of 10⁶? (Nearest whole step.)
  8. To find the smallest-magnitude eigenvalue, you…
    • Run power iteration on A for longer
    • Run power iteration on A⁻¹ (solving with LU each step)
    • Use the trace

Engineering applications

  • Suspension and mounts

    A machine mount is designed by placing its poles: far enough left to settle quickly, with imaginary parts small enough that the ringing dies before the next disturbance.

  • Large structural models

    Finite-element models of bridges have thousands of states. Engineers never factor the whole characteristic polynomial; iterative methods related to power iteration find the few modes that matter.

Watch

Optional verified videos. Nothing loads from YouTube until you press play.

Connects the sign of an eigenvalue's real part to growth or decay, including the discrete-time version of the rule.

Length: see YouTube · captions on YouTube · source

Nothing loads from YouTube until you press play.

Solves du/dt = Au with eigenvalues and eigenvectors and states the stability test on their real parts.

Length: see YouTube · captions on YouTube · source

Nothing loads from YouTube until you press play.

Why the solution of a linear system of ODEs is a matrix exponential, the maths under state-space models.

27 min 7 s · captions on YouTube · source

Nothing loads from YouTube until you press play.

  • Stability and Eigenvalues [Control Bootcamp] (Steve Brunton)
  • 23. Differential Equations and exp(At) (MIT OpenCourseWare)
  • How (and why) to raise e to the power of a matrix | DE6 (3Blue1Brown)

Chapter summary

  • Any n-th order linear ODE becomes n first-order equations x′ = A·x + B·u.
  • The eigenvalues of A are the system's poles; all real parts negative means stable.
  • For a 2×2 matrix, stability needs trace < 0 and determinant > 0.
  • The pole closest to the imaginary axis dominates the long-term response.
  • Power iteration converges to the largest-magnitude eigenvalue at a rate set by |λ2/λ1|.

Glossary

Damping ratio
The damping ratio ζ describes how quickly oscillations die out in a second-order system: below 1 it oscillates, exactly 1 is critically damped, above 1 it creeps to the target without overshoot.
First-order system and time constant
A first-order system responds to a step by approaching its new value exponentially; its time constant τ is the time to cover 63.2 % of the change.
Overshoot
Overshoot is how far a response goes past its final value, usually given as a percentage of the step size.
Settling time and rise time
Settling time is how long a response takes to enter and stay within a band, often 2 %, of its final value. Rise time is how long it takes to go from 10 % to 90 % of the step.

Definitions from the Field Guide.

Project: Place the poles of a mount

A 2 kg instrument sits on a spring mount. Choose stiffness and damping so that it settles within 0.5 s and overshoots by no more than 10 %. Show the A matrix, the eigenvalues and a simulated step response.

Deliverables

  • The state-space model with units
  • Eigenvalues and the stability argument
  • A step response plot checked against the specification

Keep your work in your Engineering Journal; it stays private unless you choose to share it.

References

  • William E. Boyce and Richard C. DiPrima (2012). Elementary Differential Equations and Boundary Value Problems, 10th edition. Wiley.
  • Erwin Kreyszig (2011). Advanced Engineering Mathematics, 10th edition. Wiley.
  • Gilbert Strang (2016). Introduction to Linear Algebra, 5th edition. Wellesley-Cambridge Press.

Publication record

Version
1
Status
Technically checked (automated checks only)
Technical review
Automated checks only, last run 2026-11-29. No human, educator or mentor review is claimed.src/content/textbooks/textbooks.test.ts: schema, every lesson, diagram, practice item, video, Field Guide entry, lab and reference resolves; figure numbers recomputed; no practice answers in client payloads.
Written by
Compiled and written by the Tactiverge team with AI assistance, from Tactiverge School lessons that were themselves written with AI assistance.
Licence
All rights reserved by the founders unless a licence is approved.
Corrections
None recorded yet.Spotted a mistake? Use “Report a problem” on any chapter, or see the corrections page.