Differential Equations

Modeling change: first-order equations, oscillations and resonance, Laplace transforms, systems and phase planes, stability, numerical methods and the heat equation, with four computer labs on epidemics, predators and prey, climate and wind-turbine vibration.

NASA Blue MarbleNASA/JPL-CaltechNASA/Carla Thomas (AFRC2025-0170-03)CNES (PIA25623)

Courses › MATH 220

Download the PDF study guide

About this course

This is a free self-study course outline written by Saving Planets. It is not a university course, it carries no academic credit, and no school is involved.

Its scope follows a sophomore course in ordinary differential equations, modeled on the topics and depth of MIT OpenCourseWare 18.03 and the free textbooks by Jiří Lebl (Notes on Diffy Qs) and William Trench, and on the syllabi of courses such as Georgia Tech MATH 2552 and Stanford Math 53. We link to the free materials throughout. None of those authors or organizations endorses this page.

What we add: every unit connects to a real planet problem with a cited public source (lakes, methane, fisheries, carbon, climate, epidemics, wind turbines), every number on the page is re-computed by a checking script before it goes live, and four computer labs solve real models numerically.

Work through it in order. Each unit has goals, key ideas, equations, step-by-step examples, practice with full answers, common mistakes, flashcards and a quiz. Your progress is saved only in this browser.

How this course helps save the planet

Almost every model of the living planet is a differential equation: how fast a lake flushes out a pollutant, how a fish stock recovers, how carbon moves between air and sea, how quickly Earth warms when its energy balance shifts, how an epidemic spreads, and how a wind-turbine tower sways.

Each unit ends with a short, sourced section showing how its ideas help both people and nature. Model parameters that are not from a source are labeled as sample values.

Back to top

Before you start

Prerequisites

  • Calculus I and II: derivatives, integrals, partial fractions, Taylor series.
  • Matrices, determinants and eigenvalues of 2 × 2 matrices (taught briefly in Unit 6).
  • Calculus III helps for the heat equation but is not required.

How to study

  • Check every solution by substituting it back into the equation.
  • Do every practice problem on paper before opening the answer.
  • Sketch a slope field or phase portrait before solving; know what the answer should look like.
  • Ask of every model: what are the units, and does the long-run behavior make sense?
  • Solve one problem from each unit numerically too, and compare with the formula.
  • Retake the quizzes a few days later. Spaced practice beats one long session.

Lab equipment (for the wet labs)

  • A computer or tablet with a spreadsheet.
  • A free graphing calculator such as Desmos.
  • Optional: Python with NumPy (free in Google Colab).

Back to top

Suggested 15-week schedule

About 6 to 9 hours a week: reading, practice problems and, in lab weeks, the lab.

WeekUnitTopicsReading
1First-Order EquationsSlope fields; separable equationsLebl 1.1–1.3
2First-Order EquationsLinear and exact equations; existence and uniquenessLebl 1.2, 1.4, 1.8
3Modeling with First-Order EquationsModeling: mixing, decay, logistic growth, harvestingLebl 1.6
4Second-Order Linear Equations and OscillationsSecond-order linear equations; characteristic equationLebl 2.1–2.2
5Second-Order Linear Equations and OscillationsMechanical vibrations and dampingLebl 2.4
6Forced Vibration and ResonanceUndetermined coefficients; forced oscillation and resonance; Lab DLebl 2.5–2.6
7Laplace TransformsLaplace transforms; solving IVPsLebl 6.1–6.2
8Laplace TransformsStep functions, impulses, convolution; midterm practiceLebl 6.3–6.4
9Linear Systems, Eigenvalues and Phase PlanesSystems; matrices and eigenvaluesLebl 3.1–3.4
10Linear Systems, Eigenvalues and Phase PlanesPhase portraits and classificationLebl 3.5
11Nonlinear Systems and StabilityNonlinear systems, linearization; predator-prey; Lab BLebl 8.1–8.3
12Nonlinear Systems and StabilityStability; SIR epidemics; Lab ALebl 8.2–8.3
13Numerical MethodsNumerical methods; energy-balance model; Lab CLebl 1.7, Trench 3
14Series Solutions, Fourier Series and the Heat EquationSeries solutions; Fourier series; heat equationLebl 7.1–7.2, 4.2, 4.6
15ReviewReview and final practice setAll units

Back to top

Your progress

Tick units and labs as you finish them, and take the quizzes. Progress and quiz scores are saved only in this browser, never sent to us.

Turn on JavaScript to track progress.

Back to top

Unit 1 · Weeks 1–2

First-Order Equations

Slope fields, separable equations, linear equations with integrating factors, exact equations, and when a solution exists and is unique.

Learning objectives

By the end of this unit you can:

  • Read a slope field and sketch solutions.
  • Solve separable and linear first-order equations.
  • Recognize and solve exact equations.
  • State the existence and uniqueness theorem and spot when it fails.

Key concepts

  • A differential equation relates an unknown function to its derivatives; a solution is a function that makes it true.
  • Separable: dy/dx = g(x)h(y). Divide and integrate both sides.
  • Linear: y′ + p(x)y = q(x). Multiply by the integrating factor μ = e^(∫p dx) so the left side becomes (μy)′.
  • Exact: M dx + N dy = 0 with M_y = N_x is dF = 0, so F(x, y) = C.
  • If f and ∂f/∂y are continuous near (x₀, y₀), then y′ = f(x, y), y(x₀) = y₀ has exactly one solution nearby. Solutions may still blow up in finite time.

Key equations

dyh(y)=g(x) dx\frac{dy}{h(y)}=g(x)\,dx
Separable equation
μ=e∫p dx,(μy)′=μq\mu=e^{\int p\,dx},\quad(\mu y)'=\mu q
Integrating factor
My=Nx⇒F(x,y)=CM_y=N_x\Rightarrow F(x,y)=C
Exact equation
y′=f(x,y), y(x0)=y0y'=f(x,y),\ y(x_0)=y_0
Initial value problem

Worked examples, step by step

Example 1.1 Solve dy/dx = xy, y(0) = 2, and find y(1).

Show the steps
  1. dy/y = x dx, so ln|y| = x²/2 + C.
  2. y = 2e^(x²/2).
  3. y(1) = 2e^0.5.

Answer: ≈ 3.297.

Example 1.2 Solve y′ + 2y = 4, y(0) = 0, and find y(1).

Show the steps
  1. μ = e^(2t), so (e^(2t)y)′ = 4e^(2t).
  2. e^(2t)y = 2e^(2t) + C; y(0) = 0 gives C = −2.
  3. y = 2(1 − e^(−2t)).

Answer: y(1) ≈ 1.729, approaching the steady state 2.

Example 1.3 Solve 2xy dx + (x² + 2y) dy = 0 with y(0) = 1, and find y when x = 1.

Show the steps
  1. M_y = 2x = N_x: exact.
  2. F = x²y + y²; F(0, 1) = 1.
  3. At x = 1: y + y² = 1, so y = (−1 + √5)/2.

Answer: ≈ 0.618.

Practice problems

Work each on paper first, then check.

  1. Solve y′ = y², y(0) = 1. Where does the solution exist?

    Show answer

    y = 1/(1 − t); it blows up at t = 1, even though y² is smooth everywhere.

  2. Solve t y′ + y = t² for t > 0.

    Show answer

    (ty)′ = t², so y = t²/3 + C/t.

  3. Solve y′ = −y/τ.

    Show answer

    y = y₀e^(−t/τ).

  4. Is (y cos x) dx + (sin x + 2y) dy = 0 exact? Solve.

    Show answer

    M_y = cos x = N_x; F = y sin x + y² = C.

  5. Does y′ = √y, y(0) = 0 have a unique solution?

    Show answer

    No: y = 0 and y = t²/4 both work; ∂f/∂y = 1/(2√y) is not continuous at y = 0.

Common misconceptions

  • Myth: Every first-order equation is separable.

    Actually: y′ = x + y is not; it is linear.

  • Myth: Forgetting +C until the end is fine.

    Actually: Add C when you integrate, before solving for y, or the initial condition comes out wrong.

  • Myth: A smooth right-hand side means the solution lives forever.

    Actually: y′ = y² blows up at a finite time.

Flashcards

  • Separable

    dy/dx = g(x)h(y).

  • Linear first-order

    y′ + p y = q.

  • Integrating factor

    μ = e^(∫p dx).

  • Exact

    M_y = N_x; F = C.

  • Initial value problem

    An ODE plus y(x₀) = y₀.

  • Existence and uniqueness

    f, f_y continuous ⇒ one local solution.

Self-check quiz

1. The integrating factor for y′ + 3y = x is…

Show answer

e^(3x). e^(∫3 dx).

2. M dx + N dy = 0 is exact when…

Show answer

M_y = N_x. Mixed partials of F agree.

3. y′ = ky has solution…

Show answer

y₀e^(kt). Separable.

4. Uniqueness can fail when…

Show answer

∂f/∂y is discontinuous. e.g. y′ = √y at 0.

How this helps save the planet

The simplest first-order equation, y′ = −y/τ, describes how a pollutant clears from a well-mixed lake or how a gas leaves the atmosphere. Its one number, the time scale τ, decides whether a mistake fades in years or lasts for centuries (Unit 2).

On Saving Planets: Rivers hub

Sources: U.S. EPA: Physical features of the Great Lakes (retention times) · Lebl, 1.4 Linear equations and the integrating factor

Free learning resources

Back to top

Unit 2 · Week 3

Modeling with First-Order Equations

Turning a situation into an equation: mixing and lake pollution, decay and lifetimes, Newton cooling, logistic growth, harvesting, and equilibria with their stability.

Learning objectives

By the end of this unit you can:

  • Build rate-in minus rate-out models.
  • Interpret time constants and lifetimes.
  • Find equilibria of autonomous equations and classify their stability.
  • Use the logistic model with harvesting to find maximum sustainable yield.

Key concepts

  • Rate of change = rate in − rate out. Write the units of every term.
  • A well-mixed lake with retention time τ loses a pollutant at rate C/τ once the inflow is clean.
  • For an autonomous equation y′ = f(y), equilibria solve f(y) = 0; an equilibrium is stable if f′(y) < 0.
  • Logistic growth P′ = rP(1 − P/K) levels off at K. With constant harvest H, the largest sustainable harvest is rK/4, at P = K/2.

Key equations

dxdt=(rate in)−(rate out)\frac{dx}{dt}=(\text{rate in})-(\text{rate out})
Balance law
C(t)=C0e−t/τC(t)=C_0e^{-t/\tau}
Flushing with retention time τ
P′=rP(1−PK)−HP'=rP\left(1-\frac PK\right)-H
Logistic growth with harvest
Hmax⁡=rK4H_{\max}=\frac{rK}{4}
Maximum sustainable yield

Worked examples, step by step

Example 2.1 Lake Erie’s retention time is 2.6 years and Lake Superior’s 191 years (EPA). If a pollutant’s inflow stops, how long until each lake’s concentration falls to 10%, treating each as well mixed?

Show the steps
  1. C/C₀ = e^(−t/τ) = 0.1, so t = τ ln 10.
  2. Erie: 2.6 × 2.303 = 5.99 years.
  3. Superior: 191 × 2.303 = 440 years.

Answer: About 6 years for Erie but about 440 for Superior. Prevention matters most where flushing is slow.

Example 2.2 EPA says methane lasts about a decade in the atmosphere on average. Treat a methane pulse as decaying with τ = 10 years. What fraction is left after 30 years?

Show the steps
  1. Fraction = e^(−30/10) = e^(−3).

Answer: About 5%. Cutting methane leaks therefore pays off within decades, unlike CO₂, which lingers far longer.

Example 2.3 A fish stock follows P′ = 0.4P(1 − P/10,000) − H (tonnes, years; sample values). Find the maximum sustainable yield.

Show the steps
  1. Growth rP(1 − P/K) is largest at P = K/2 = 5,000 t.
  2. There it equals rK/4 = 0.4 × 10,000/4.

Answer: 1,000 tonnes per year. Harvesting more than that drives the stock to collapse.

Practice problems

Work each on paper first, then check.

  1. Coffee at 90 °C cools in a 20 °C room with T′ = −0.1(T − 20) (minutes). Find T(10).

    Show answer

    T = 20 + 70e^(−1) ≈ 45.8 °C.

  2. A 100 L tank of fresh water gets brine of 0.5 g/L at 2 L/min and drains at 2 L/min. Find the salt after 50 minutes.

    Show answer

    x′ = 1 − x/50, x = 50(1 − e^(−t/50)); x(50) = 50(1 − e^(−1)) ≈ 31.6 g.

  3. Find and classify the equilibria of y′ = y(1 − y).

    Show answer

    y = 0 (f′ = 1, unstable) and y = 1 (f′ = −1, stable).

  4. In the fishery example, what happens if H = 1,200 t/yr?

    Show answer

    rP(1 − P/K) − H < 0 for every P, so the stock declines to zero.

Common misconceptions

  • Myth: Retention time is how long it takes to remove all the pollutant.

    Actually: After one τ, 37% is still there; exponential decay never quite reaches zero.

  • Myth: More fishing effort always means more catch.

    Actually: Past the maximum sustainable yield, more harvest shrinks the stock and future catch.

  • Myth: An equilibrium is always where the system ends up.

    Actually: Only stable equilibria attract nearby solutions.

Flashcards

  • Balance law

    Rate in − rate out.

  • Time constant

    τ in e^(−t/τ); 63% of the change is done after τ.

  • Retention time

    Lake volume ÷ outflow.

  • Equilibrium

    f(y*) = 0.

  • Stability test

    f′(y*) < 0 stable.

  • Max sustainable yield

    rK/4 at P = K/2.

Self-check quiz

1. With τ = 5 years, the fraction left after 5 years is…

Show answer

e^(−1) ≈ 0.37. e^(−t/τ) at t = τ.

2. Maximum sustainable yield of logistic growth is…

Show answer

rK/4. Peak of rP(1 − P/K).

3. y* is a stable equilibrium of y′ = f(y) if…

Show answer

f′(y*) < 0. Nearby solutions are pushed back.

4. Which lake recovers faster from pollution?

Show answer

Erie (2.6 yr). Shorter retention time.

How this helps save the planet

The EPA lists Great Lakes retention times from 2.6 years (Erie) to 191 years (Superior), which is why toxins entering Lake Superior are a multi-generation problem.

Fishery scientists at NOAA assess stocks with population models built on these ideas; the logistic model’s maximum sustainable yield is the classic starting point.

On Saving Planets: Oceans hub · Rivers hub

Sources: U.S. EPA: Physical features of the Great Lakes (retention times) · U.S. EPA: Understanding global warming potentials · NOAA Fisheries: population assessments

Free learning resources

Back to top

Unit 3 · Weeks 4–5

Second-Order Linear Equations and Oscillations

Linear equations with constant coefficients, the characteristic equation, and free vibrations: undamped, underdamped, critically damped and overdamped.

Learning objectives

By the end of this unit you can:

  • Solve ay″ + by′ + cy = 0 with the characteristic equation.
  • Handle real, repeated and complex roots.
  • Model mass-spring-damper systems.
  • Classify damping and compute natural frequency and critical damping.

Key concepts

  • Try y = e^(rt): ar² + br + c = 0. Two real roots give two exponentials; a repeated root gives (c₁ + c₂t)e^(rt); complex roots α ± iβ give e^(αt)(c₁ cos βt + c₂ sin βt).
  • Superposition: sums of solutions of a homogeneous linear equation are solutions.
  • mx″ + cx′ + kx = 0 has natural frequency ω₀ = √(k/m).
  • Damping c < 2√(mk) oscillates and decays (underdamped); c = 2√(mk) returns fastest without overshoot (critical).

Key equations

ar2+br+c=0ar^2+br+c=0
Characteristic equation
y=eαt(c1cos⁡βt+c2sin⁡βt)y=e^{\alpha t}(c_1\cos\beta t+c_2\sin\beta t)
Complex roots α ± iβ
mx′′+cx′+kx=0, ω0=k/mmx''+cx'+kx=0,\ \omega_0=\sqrt{k/m}
Mass-spring-damper
ccrit=2mkc_{\text{crit}}=2\sqrt{mk}
Critical damping

Worked examples, step by step

Example 3.1 Solve y″ + 4y = 0, y(0) = 1, y′(0) = 0. What is the period?

Show the steps
  1. r² + 4 = 0, r = ±2i.
  2. y = cos 2t.
  3. Period 2π/2.

Answer: y = cos 2t, period π ≈ 3.14.

Example 3.2 Solve y″ + 2y′ + 5y = 0, y(0) = 1, y′(0) = 0, and find y(1).

Show the steps
  1. r = −1 ± 2i.
  2. y = e^(−t)(cos 2t + ½ sin 2t) fits both conditions.
  3. y(1) = e^(−1)(cos 2 + ½ sin 2).

Answer: ≈ 0.0142: the oscillation has nearly died out.

Example 3.3 A 2 kg mass hangs on a spring with k = 50 N/m. Find ω₀, the frequency in hertz, and the critical damping.

Show the steps
  1. ω₀ = √(50/2) = 5 rad/s.
  2. f = 5/(2π) = 0.796 Hz.
  3. c_crit = 2√(2 × 50) = 20 N·s/m.

Answer: 5 rad/s, 0.80 Hz, 20 N·s/m.

Practice problems

Work each on paper first, then check.

  1. Solve y″ − 3y′ + 2y = 0.

    Show answer

    r = 1, 2: y = c₁eᵗ + c₂e^(2t).

  2. Solve y″ + 2y′ + y = 0.

    Show answer

    Repeated r = −1: y = (c₁ + c₂t)e^(−t).

  3. Classify x″ + 6x′ + 5x = 0.

    Show answer

    r = −1, −5: overdamped (c = 6 > 2√5).

  4. Find the period of x″ + 9x = 0.

    Show answer

    ω = 3, period 2π/3 ≈ 2.09.

Common misconceptions

  • Myth: Complex roots mean complex solutions.

    Actually: Real and imaginary parts give real solutions: e^(αt)cos βt and e^(αt)sin βt.

  • Myth: A repeated root gives only one solution.

    Actually: The second is t e^(rt).

  • Myth: More damping always means faster settling.

    Actually: Overdamped systems creep back slower than critically damped ones.

Flashcards

  • Characteristic equation

    ar² + br + c = 0.

  • Superposition

    Sums of solutions are solutions (homogeneous linear).

  • Repeated root

    (c₁ + c₂t)e^(rt).

  • Natural frequency

    ω₀ = √(k/m).

  • Underdamped

    Oscillates while decaying.

  • Critical damping

    c = 2√(mk).

Self-check quiz

1. Roots 2 ± 3i give solutions…

Show answer

e^(2t)cos 3t, e^(2t)sin 3t. α = 2, β = 3.

2. Natural frequency of mx″ + kx = 0:

Show answer

√(k/m). r² = −k/m.

3. Critical damping c equals…

Show answer

2√(mk). Discriminant zero.

4. y″ + 2y′ + y = 0 is…

Show answer

critically damped. Repeated root.

How this helps save the planet

Every tall structure, from a wind-turbine tower to a bridge, has natural frequencies set by its stiffness and mass, exactly ω₀ = √(k/m) in the simplest model. Damping decides how fast gust-driven sway dies out, which affects fatigue and how long a structure lasts.

On Saving Planets: Physics I, Unit 8: oscillations

Sources: U.S. DOE: How do wind turbines work? · Lebl, 2.4 Mechanical vibrations

Free learning resources

Back to top

Unit 4 · Week 6

Forced Vibration and Resonance

Nonhomogeneous equations, undetermined coefficients, the amplitude response of a driven oscillator, beats and resonance.

Learning objectives

By the end of this unit you can:

  • Find particular solutions by undetermined coefficients.
  • Write the general solution as homogeneous plus particular.
  • Compute the steady-state amplitude of a driven damped oscillator.
  • Explain resonance and how engineers avoid it.

Key concepts

  • General solution = homogeneous solution + one particular solution.
  • Guess the form of the forcing: for cos ωt try A cos ωt + B sin ωt.
  • Driven at frequency ω, a damped oscillator settles into steady motion with amplitude X = F₀/√((k − mω²)² + (cω)²).
  • Near ω = ω₀ the amplitude peaks; with damping ratio ζ = c/c_crit, the peak dynamic amplification is about 1/(2ζ). With no damping, the response grows without bound.

Key equations

y=yh+ypy=y_h+y_p
General solution
X=F0(k−mω2)2+(cω)2X=\frac{F_0}{\sqrt{(k-m\omega^2)^2+(c\omega)^2}}
Steady-state amplitude
XF0/k=1(1−r2)2+(2ζr)2, r=ωω0\frac{X}{F_0/k}=\frac1{\sqrt{(1-r^2)^2+(2\zeta r)^2}},\ r=\frac{\omega}{\omega_0}
Dynamic amplification
y′′+ω2y=cos⁡ωt⇒yp=tsin⁡ωt2ωy''+\omega^2y=\cos\omega t\Rightarrow y_p=\frac{t\sin\omega t}{2\omega}
Pure resonance

Worked examples, step by step

Example 4.1 Find a particular solution of y″ + y = cos 2t.

Show the steps
  1. Try y_p = A cos 2t: −4A + A = 1.
  2. A = −1/3.

Answer: y_p = −⅓ cos 2t (out of phase, since the drive is above the natural frequency).

Example 4.2 Model a wind-turbine tower as a single oscillator with natural frequency 0.30 Hz and damping ratio ζ = 0.01 (sample values). The rotor turns at 12 rpm = 0.20 Hz, and three blades pass the tower at 0.60 Hz. Find the dynamic amplification at each, and at resonance.

Show the steps
  1. At 0.20 Hz, r = 0.667: 1/√((1 − 0.444)² + (0.0133)²) = 1.80.
  2. At 0.60 Hz, r = 2: 1/√(9 + 0.0016) = 0.333.
  3. At r = 1: 1/(2ζ) = 50.

Answer: 1.8 and 0.33, but 50 at resonance. That is why designers keep a tower’s natural frequency away from the rotor and blade-passing frequencies.

Example 4.3 Solve y″ + y = cos t, y(0) = y′(0) = 0.

Show the steps
  1. The forcing matches the natural frequency, so try y_p = t(A cos t + B sin t).
  2. Substituting gives A = 0, B = ½.
  3. y = ½ t sin t.

Answer: The amplitude grows like t/2 without limit: pure resonance.

Practice problems

Work each on paper first, then check.

  1. Find y_p for y″ + 3y′ + 2y = 4.

    Show answer

    y_p = 2.

  2. Find y_p for y″ − y = eᵗ.

    Show answer

    eᵗ solves the homogeneous equation, so y_p = ½ t eᵗ.

  3. A 1 kg mass, k = 100 N/m, c = 2 N·s/m is driven by 10 cos 10t N. Find the steady amplitude.

    Show answer

    k − mω² = 0, so X = 10/(2 × 10) = 0.5 m.

  4. For ζ = 0.05, what is the peak amplification?

    Show answer

    About 1/(2 × 0.05) = 10.

Common misconceptions

  • Myth: Resonance needs a large force.

    Actually: A small periodic force at the natural frequency builds up a large response.

  • Myth: Damping removes resonance.

    Actually: It caps the peak at about 1/(2ζ), which is still large for lightly damped structures.

  • Myth: Undetermined coefficients works for any forcing.

    Actually: Only for polynomials, exponentials, sines and cosines and their products; otherwise use variation of parameters or Laplace.

Flashcards

  • Particular solution

    Any one solution of the forced equation.

  • Undetermined coefficients

    Guess the forcing’s form.

  • Amplitude response

    X = F₀/√((k − mω²)² + (cω)²).

  • Damping ratio

    ζ = c/(2√(mk)).

  • Resonance

    Large response near ω₀; peak ≈ 1/(2ζ).

  • Beats

    Two close frequencies make a slow envelope.

Self-check quiz

1. General solution =

Show answer

y_h + y_p. Linearity.

2. Resonance occurs when the driving frequency is near…

Show answer

the natural frequency. Denominator smallest.

3. With ζ = 0.01 the peak amplification is about…

Show answer

50. 1/(2ζ).

4. Driving well above ω₀ gives amplification…

Show answer

less than 1. ≈ 1/r².

How this helps save the planet

Wind turbines turn ever larger and taller to harvest more energy, and their towers and blades are lightly damped. Avoiding resonance between the structure and the rotating rotor is a core part of keeping clean-energy machines safe and long-lived. Lab D explores it with a sample model.

On Saving Planets: Physics I, Unit 3: wind power

Sources: U.S. DOE: How do wind turbines work? · Lebl, 2.6 Forced oscillations and resonance

Free learning resources

Back to top

Unit 5 · Weeks 7–8

Laplace Transforms

Transforming differential equations into algebra: the transform and its table, derivatives, step functions for switched inputs, impulses, and convolution.

Learning objectives

By the end of this unit you can:

  • Compute Laplace transforms from the definition and a table.
  • Solve initial value problems with transforms and partial fractions.
  • Model switched inputs with unit step functions and shifts.
  • Model sudden impulses with the delta function.

Key concepts

  • L{f}(s) = ∫₀^∞ e^(−st) f(t) dt turns derivatives into multiplication by s, with initial values built in.
  • Solve for Y(s), split with partial fractions, then invert with the table.
  • A switch flipped at time a is u(t − a); the shift rule is L{u(t − a)f(t − a)} = e^(−as)F(s).
  • An instant kick is δ(t − a), with L{δ(t − a)} = e^(−as).

Key equations

L{f}=∫0∞e−stf(t) dt\mathcal L\{f\}=\int_0^\infty e^{-st}f(t)\,dt
Definition
L{y′}=sY−y(0), L{y′′}=s2Y−sy(0)−y′(0)\mathcal L\{y'\}=sY-y(0),\ \mathcal L\{y''\}=s^2Y-sy(0)-y'(0)
Derivatives
L{eat}=1s−a, L{sin⁡ωt}=ωs2+ω2\mathcal L\{e^{at}\}=\frac1{s-a},\ \mathcal L\{\sin\omega t\}=\frac{\omega}{s^2+\omega^2}
Table entries
L{u(t−a)f(t−a)}=e−asF(s)\mathcal L\{u(t-a)f(t-a)\}=e^{-as}F(s)
Shift rule

Worked examples, step by step

Example 5.1 Solve y′ − 2y = e^(3t), y(0) = 1.

Show the steps
  1. sY − 1 − 2Y = 1/(s − 3).
  2. Y = 1/((s − 2)(s − 3)) + 1/(s − 2) = [1/(s − 3) − 1/(s − 2)] + 1/(s − 2).
  3. Y = 1/(s − 3).

Answer: y = e^(3t). Check: 3e^(3t) − 2e^(3t) = e^(3t).

Example 5.2 A clean lake starts receiving a steady pollutant inflow at t = 2: y′ + y = u(t − 2), y(0) = 0. Find y(3).

Show the steps
  1. (s + 1)Y = e^(−2s)/s.
  2. 1/(s(s + 1)) = 1/s − 1/(s + 1), so y = (1 − e^(−(t − 2)))u(t − 2).
  3. y(3) = 1 − e^(−1).

Answer: ≈ 0.632 of the final level, one time constant after the switch.

Example 5.3 A resting oscillator y″ + 4y = δ(t − 1) gets a kick at t = 1. Find y(1 + π/4).

Show the steps
  1. (s² + 4)Y = e^(−s).
  2. y = ½ sin(2(t − 1)) u(t − 1).
  3. At t = 1 + π/4: ½ sin(π/2).

Answer: 0.5, the first peak.

Practice problems

Work each on paper first, then check.

  1. Find L{t}.

    Show answer

    1/s².

  2. Invert 3/(s² + 9).

    Show answer

    sin 3t.

  3. Solve y′ + y = 0, y(0) = 4.

    Show answer

    Y = 4/(s + 1), y = 4e^(−t).

  4. Solve y″ + y = 0, y(0) = 0, y′(0) = 2.

    Show answer

    Y = 2/(s² + 1), y = 2 sin t.

  5. Find L{u(t − 3)}.

    Show answer

    e^(−3s)/s.

Common misconceptions

  • Myth: L{fg} = L{f}L{g}.

    Actually: The product of transforms corresponds to convolution, not the product.

  • Myth: Initial conditions are applied at the end.

    Actually: They enter immediately through L{y′} = sY − y(0).

  • Myth: Step functions need piecewise solving.

    Actually: Laplace handles switches in one pass.

Flashcards

  • Laplace transform

    ∫₀^∞ e^(−st) f dt.

  • L{y′}

    sY − y(0).

  • L{eᵃᵗ}

    1/(s − a).

  • Unit step

    u(t − a): off then on.

  • Delta

    δ(t − a): instant impulse; L = e^(−as).

  • Convolution

    L{f * g} = FG.

Self-check quiz

1. L{y′} =

Show answer

sY − y(0). Integration by parts.

2. L{e^(−2t)} =

Show answer

1/(s + 2). a = −2.

3. A switch turned on at t = 5 is written…

Show answer

u(t − 5). Unit step.

4. L{δ(t)} =

Show answer

1. e^(−0s).

How this helps save the planet

Real environmental inputs switch on and off: a factory discharge starts, a dam release stops, a volcanic eruption injects aerosols in a single burst. Step and impulse inputs with Laplace transforms give the response to each in one calculation, the method engineers use for control systems in power grids and treatment plants.

On Saving Planets: Rivers hub

Sources: Lebl, 6.1 The Laplace transform · Lebl, 6.4 Dirac delta and impulse response

Free learning resources

Back to top

Unit 6 · Weeks 9–10

Linear Systems, Eigenvalues and Phase Planes

Systems x′ = Ax, eigenvalue methods, the phase plane, and the classification of equilibria as nodes, saddles, spirals and centers.

Learning objectives

By the end of this unit you can:

  • Write coupled equations and higher-order equations as first-order systems.
  • Solve x′ = Ax with eigenvalues and eigenvectors.
  • Sketch phase portraits.
  • Classify the origin with the trace and determinant.

Key concepts

  • If Av = λv, then x = e^(λt)v solves x′ = Ax; the general solution combines one such term per eigenvalue.
  • Real eigenvalues of opposite sign: a saddle. Both negative: a stable node.
  • Complex eigenvalues α ± iβ: spirals (stable if α < 0); centers if α = 0.
  • For a 2 × 2 matrix, λ² − (tr A)λ + det A = 0.

Key equations

x′=Ax\mathbf x'=A\mathbf x
Linear system
det⁡(A−λI)=0\det(A-\lambda I)=0
Eigenvalues
x=c1eλ1tv1+c2eλ2tv2\mathbf x=c_1e^{\lambda_1t}\mathbf v_1+c_2e^{\lambda_2t}\mathbf v_2
General solution (distinct real eigenvalues)
λ2−(tr⁡A)λ+det⁡A=0\lambda^2-(\operatorname{tr}A)\lambda+\det A=0
Characteristic polynomial (2 × 2)

Worked examples, step by step

Example 6.1 A two-box carbon model: atmosphere A and ocean O exchange carbon with A′ = −0.2A + 0.1O, O′ = 0.2A − 0.1O (per year; sample rates). Start with 3 units in the air and none in the ocean.

Show the steps
  1. Eigenvalues: tr = −0.3, det = 0, so λ = 0 and −0.3.
  2. λ = 0 has eigenvector (1, 2): the equilibrium split is 1 : 2. Total carbon (3) is conserved, so A → 1, O → 2.
  3. A(t) = 1 + 2e^(−0.3t).

Answer: The air keeps one third of the pulse in this toy model, with time scale 1/0.3 ≈ 3.33 years.

Example 6.2 Classify the origin for A = [[1, 2], [2, 1]].

Show the steps
  1. λ² − 2λ − 3 = 0, λ = 3, −1.

Answer: Opposite signs: a saddle (unstable).

Example 6.3 Classify the origin for A = [[−1, −2], [2, −1]].

Show the steps
  1. tr = −2, det = 5: λ² + 2λ + 5 = 0.
  2. λ = −1 ± 2i.

Answer: A stable spiral: solutions circle inward, decaying like e^(−t).

Practice problems

Work each on paper first, then check.

  1. Write y″ + 3y′ + 2y = 0 as a system.

    Show answer

    x₁ = y, x₂ = y′: x₁′ = x₂, x₂′ = −2x₁ − 3x₂.

  2. Eigenvalues of [[2, 0], [0, −3]]?

    Show answer

    2 and −3: a saddle.

  3. Classify [[0, 1], [−4, 0]].

    Show answer

    λ = ±2i: a center (undamped oscillation).

  4. Classify [[−3, 1], [0, −2]].

    Show answer

    λ = −3, −2: a stable node.

Common misconceptions

  • Myth: Eigenvectors are unique.

    Actually: Any nonzero multiple works.

  • Myth: A zero eigenvalue means no motion.

    Actually: It means a line of equilibria or a conserved quantity, as in the carbon box model.

  • Myth: Complex eigenvalues give complex solutions only.

    Actually: Real and imaginary parts give real solutions.

Flashcards

  • Linear system

    x′ = Ax.

  • Eigenvalue method

    x = e^(λt)v.

  • Saddle

    Real eigenvalues of opposite sign.

  • Node

    Real eigenvalues of the same sign.

  • Spiral

    Complex eigenvalues, α ≠ 0.

  • Trace–determinant

    λ² − tr λ + det = 0.

Self-check quiz

1. Eigenvalues 2 and −1 give…

Show answer

a saddle. Opposite signs.

2. Eigenvalues −1 ± 3i give…

Show answer

stable spiral. α < 0.

3. For 2 × 2 A, the eigenvalues’ sum is…

Show answer

tr A. λ₁ + λ₂ = tr A.

4. A center has eigenvalues…

Show answer

purely imaginary. α = 0.

How this helps save the planet

Carbon-cycle models are linear systems of boxes (atmosphere, surface ocean, deep ocean, land) exchanging carbon. Their eigenvalues are the time scales on which a CO₂ pulse is absorbed: some fast, some taking centuries or longer. NASA’s carbon-cycle overview describes the fast and slow cycles these boxes represent.

On Saving Planets: Oceans hub

Sources: NASA Earth Observatory: The Carbon Cycle · NOAA Global Monitoring Laboratory: Trends in atmospheric CO₂

Free learning resources

Back to top

Unit 7 · Weeks 11–12

Nonlinear Systems and Stability

Equilibria of nonlinear systems, linearization with the Jacobian, predator-prey cycles, and the SIR epidemic model.

Learning objectives

By the end of this unit you can:

  • Find equilibria of nonlinear systems.
  • Linearize with the Jacobian and classify equilibria.
  • Analyze the Lotka–Volterra predator-prey model.
  • Use the SIR model: R₀, herd-immunity threshold and final size.

Key concepts

  • Near an equilibrium, a nonlinear system behaves like its linearization x′ = J x, where J is the Jacobian (unless the linearization is a center).
  • Lotka–Volterra: prey x′ = ax − bxy, predators y′ = −cy + dxy. The equilibrium is (c/d, a/b); populations cycle around it.
  • SIR: S′ = −βSI, I′ = βSI − γI, R′ = γI. The basic reproduction number R₀ = β/γ; an outbreak grows only if R₀S > 1.
  • The herd-immunity threshold is 1 − 1/R₀; the final uninfected share s∞ solves ln s∞ = R₀(s∞ − 1).

Key equations

J=(fxfygxgy)J=\begin{pmatrix}f_x&f_y\\g_x&g_y\end{pmatrix}
Jacobian
x′=ax−bxy, y′=−cy+dxyx'=ax-bxy,\ y'=-cy+dxy
Lotka–Volterra
S′=−βSI, I′=βSI−γI, R′=γIS'=-\beta SI,\ I'=\beta SI-\gamma I,\ R'=\gamma I
SIR model
R0=β/γ, ln⁡s∞=R0(s∞−1)R_0=\beta/\gamma,\ \ln s_\infty=R_0(s_\infty-1)
Reproduction number and final size

Worked examples, step by step

Example 7.1 Prey and predators follow x′ = x − 0.02xy, y′ = −0.5y + 0.005xy (sample values, years). Find the coexistence equilibrium and the period of small cycles.

Show the steps
  1. x′ = 0 needs y = 1/0.02 = 50; y′ = 0 needs x = 0.5/0.005 = 100.
  2. The Jacobian there has eigenvalues ±i√(ac) = ±i√0.5.
  3. Period 2π/√0.5.

Answer: 100 prey and 50 predators; small cycles last about 8.9 years, with predators lagging prey.

Example 7.2 An epidemic has β = 0.3 per day and γ = 0.1 per day. Find R₀, the herd-immunity threshold, and the final share ever infected.

Show the steps
  1. R₀ = 3.
  2. Threshold 1 − 1/3 = 0.667.
  3. Iterate s = e^(3(s − 1)): s∞ = 0.0595.

Answer: R₀ = 3; immunity in 67% stops growth; with no intervention about 94% are eventually infected, more than the threshold because the epidemic overshoots.

Example 7.3 Classify the equilibrium P = K of logistic growth P′ = rP(1 − P/K).

Show the steps
  1. f′(P) = r − 2rP/K; f′(K) = −r < 0.

Answer: Stable: small disturbances decay at rate r.

Practice problems

Work each on paper first, then check.

  1. Find the equilibria of x′ = x(3 − x − y), y′ = y(2 − x − y).

    Show answer

    (0, 0), (3, 0), (0, 2) (no interior one: the lines x + y = 3 and x + y = 2 are parallel).

  2. Linearize x′ = sin x near x = 0 and x = π.

    Show answer

    f′(0) = 1 (unstable), f′(π) = −1 (stable).

  3. If R₀ = 2, what is the herd-immunity threshold?

    Show answer

    1 − 1/2 = 50%.

  4. In the predator-prey example, what happens to the prey if predators are removed?

    Show answer

    x′ = x: exponential growth (until other limits apply).

Common misconceptions

  • Myth: Linearization always predicts the behavior.

    Actually: Not when it gives a center; the nonlinear terms decide.

  • Myth: Herd immunity means the epidemic stops at once.

    Actually: Infections decline after the threshold but can still overshoot.

  • Myth: Predator-prey cycles mean the model is unstable.

    Actually: Lotka–Volterra orbits are closed: neutrally stable, neither growing nor shrinking.

Flashcards

  • Jacobian

    Matrix of first partials.

  • Linearization

    x′ ≈ J x near an equilibrium.

  • Lotka–Volterra

    Predator-prey cycles around (c/d, a/b).

  • SIR

    Susceptible, infected, recovered.

  • R₀

    β/γ, new infections per case.

  • Herd-immunity threshold

    1 − 1/R₀.

Self-check quiz

1. R₀ = β/γ = 4 gives a threshold of…

Show answer

75%. 1 − 1/4.

2. Lotka–Volterra equilibrium prey level is…

Show answer

c/d. y′ = 0 needs x = c/d.

3. Linearization uses…

Show answer

the Jacobian. First partial derivatives.

4. An epidemic grows initially if…

Show answer

R₀S > 1. I′ = (βS − γ)I.

How this helps save the planet

On Isle Royale in Lake Superior, the National Park Service charts wolf and moose numbers back to 1980, a long predator-prey record. Their linked ups and downs, and the Park Service’s decision to relocate new wolves to the island, are exactly the kind of system Lotka–Volterra models begin to explain.

The same SIR mathematics that guides public-health response is used for wildlife diseases that threaten ecosystems.

On Saving Planets: Oceans hub

Sources: National Park Service: Wolves of Isle Royale · Wolves and Moose of Isle Royale project (long-term data)

Free learning resources

Back to top

Unit 8 · Week 13

Numerical Methods

Euler, improved Euler and Runge–Kutta methods, step size and error, and a climate energy-balance model solved numerically.

Learning objectives

By the end of this unit you can:

  • Apply Euler, improved Euler (Heun) and RK4.
  • Explain the order of a method and how error scales with step size.
  • Solve systems numerically.
  • Build and solve a zero-dimensional energy-balance climate model.

Key concepts

  • Euler steps along the slope: y_{n+1} = y_n + h f(t_n, y_n). Its global error is proportional to h.
  • Improved Euler averages two slopes (error ∝ h²); RK4 averages four (error ∝ h⁴).
  • Halving h cuts RK4 error about 16 times, which is why it is the workhorse.
  • Energy balance: C dT/dt = absorbed sunlight − εσT⁴. Its equilibrium and time scale come from the equation directly.

Key equations

yn+1=yn+hf(tn,yn)y_{n+1}=y_n+hf(t_n,y_n)
Euler’s method
yn+1=yn+h6(k1+2k2+2k3+k4)y_{n+1}=y_n+\tfrac h6(k_1+2k_2+2k_3+k_4)
Runge–Kutta 4
CdTdt=S(1−α)−εσT4C\frac{dT}{dt}=S(1-\alpha)-\varepsilon\sigma T^4
Energy-balance model
λ=4εσT3, τ=C/λ\lambda=4\varepsilon\sigma T^3,\ \tau=C/\lambda
Linearized feedback and time scale

Worked examples, step by step

Example 8.1 Approximate y(1) for y′ = y, y(0) = 1 with h = 0.1 using Euler, improved Euler and RK4.

Show the steps
  1. Each Euler step multiplies by 1.1: 1.1¹⁰ = 2.5937.
  2. Improved Euler multiplies by 1.105: 2.7141.
  3. RK4 multiplies by 1.1051708: 2.7182797.

Answer: True e = 2.7182818. Errors: 0.12, 0.0042 and 0.000002.

Example 8.2 Earth absorbs 340 × (1 − 0.29) = 241.4 W/m² of sunlight (NASA). If it radiated as a blackbody (ε = 1), what temperature would balance it? What effective ε gives today’s average of about 288 K?

Show the steps
  1. σT⁴ = 241.4 gives T = (241.4/5.67 × 10⁻⁸)^(1/4) = 255 K.
  2. ε = 241.4/(σ × 288⁴) = 0.619.

Answer: 255 K (−18 °C) without a greenhouse effect; an effective emissivity of 0.62 represents the greenhouse effect that keeps Earth habitable.

Example 8.3 With ε = 0.619 at 288 K and an ocean mixed layer 50 m deep (C = 1,000 × 4,186 × 50 J/(m²·K); sample depth), find λ, the time scale, and the no-feedback warming for a 4 W/m² forcing (sample value).

Show the steps
  1. λ = 4εσT³ = 3.35 W/(m²·K).
  2. τ = C/λ = 6.24 × 10⁷ s ≈ 1.98 years (about 2).
  3. ΔT = 4/3.35.

Answer: About 1.2 K of warming, approached on a 2-year time scale in this simple model. Real feedbacks (water vapor, ice) make the warming larger, as the IPCC assesses.

Practice problems

Work each on paper first, then check.

  1. One Euler step for y′ = t + y, y(0) = 1, h = 0.1.

    Show answer

    y₁ = 1 + 0.1(0 + 1) = 1.1.

  2. If Euler’s error is 0.12 at h = 0.1, estimate it at h = 0.05.

    Show answer

    About 0.06 (first order).

  3. If RK4’s error is 2 × 10⁻⁶ at h = 0.1, estimate it at h = 0.05.

    Show answer

    About 2 × 10⁻⁶/16 ≈ 1.3 × 10⁻⁷.

  4. What equilibrium temperature does the EBM give with ε = 1 and albedo 0.29?

    Show answer

    About 255 K.

Common misconceptions

  • Myth: Smaller steps are always better.

    Actually: Round-off and cost grow; a higher-order method is usually better than tiny Euler steps.

  • Myth: A numerical answer is exact if the code runs.

    Actually: Always check convergence by halving h.

  • Myth: The 255 K result means the model is wrong.

    Actually: It shows how much the greenhouse effect warms Earth: about 33 K.

Flashcards

  • Euler’s method

    y + h f.

  • Improved Euler

    Average of two slopes; order 2.

  • RK4

    Four slopes; order 4.

  • Step size

    h; check convergence by halving.

  • Energy-balance model

    C T′ = S(1 − α) − εσT⁴.

  • Climate time scale

    τ = C/λ.

Self-check quiz

1. Euler’s method has global error proportional to…

Show answer

h. First order.

2. RK4 is order…

Show answer

4. Error ∝ h⁴.

3. Earth without a greenhouse effect would average about…

Show answer

255 K. σT⁴ = 241 W/m².

4. Halving h in RK4 cuts error by about…

Show answer

16. 2⁴.

How this helps save the planet

Every climate model, from this one-line energy balance to the global models assessed by the IPCC, is a system of differential equations solved numerically. NASA’s energy budget gives the inputs: 340 W/m² of sunlight arrives on average and 29% is reflected.

On Saving Planets: Intro to Programming, simulation unit

Sources: NASA Earth Observatory: Climate and Earth’s Energy Budget · IPCC AR6 Working Group I: The Physical Science Basis

Free learning resources

Back to top

Unit 9 · Week 14

Series Solutions, Fourier Series and the Heat Equation

Power-series solutions of ODEs, Fourier series of periodic functions, and separation of variables for the heat equation.

Learning objectives

By the end of this unit you can:

  • Find power-series solutions from a recurrence.
  • Compute Fourier coefficients of simple periodic functions.
  • Solve the heat equation on a rod by separation of variables.
  • Estimate how deep seasonal temperature waves reach into the ground.

Key concepts

  • Substitute y = Σaₙxⁿ, match powers, and get a recurrence for the coefficients.
  • A periodic function is a sum of sines and cosines; for an odd function on (−π, π), bₙ = (2/π)∫₀^π f sin nx dx.
  • The heat equation u_t = α u_xx spreads heat; each sine mode decays like e^(−α(nπ/L)²t), fast modes first.
  • A periodic surface temperature penetrates the ground with damping depth d = √(2α/ω).

Key equations

y=∑anxny=\sum a_nx^n
Power-series solution
bn=2π∫0πf(x)sin⁡nx dxb_n=\frac2\pi\int_0^\pi f(x)\sin nx\,dx
Fourier sine coefficient
ut=αuxxu_t=\alpha u_{xx}
Heat equation
d=2α/ωd=\sqrt{2\alpha/\omega}
Damping depth of a periodic temperature wave

Worked examples, step by step

Example 9.1 Solve y″ + y = 0 by power series.

Show the steps
  1. Σ(n + 2)(n + 1)aₙ₊₂xⁿ + Σaₙxⁿ = 0.
  2. aₙ₊₂ = −aₙ/((n + 2)(n + 1)).
  3. Even terms build cos x, odd terms sin x.

Answer: y = a₀ cos x + a₁ sin x, recovered from the recurrence.

Example 9.2 Find the Fourier series of the square wave f = 1 on (0, π), −1 on (−π, 0).

Show the steps
  1. Odd, so only sines: bₙ = (2/π)∫₀^π sin nx dx = (2/(nπ))(1 − cos nπ).
  2. bₙ = 4/(nπ) for odd n, 0 for even n.

Answer: f = (4/π)(sin x + sin 3x/3 + sin 5x/5 + …); b₁ ≈ 1.273.

Example 9.3 Soil with diffusivity α = 5 × 10⁻⁷ m²/s (sample value) feels a yearly surface temperature cycle. Find the damping depth.

Show the steps
  1. ω = 2π/(3.156 × 10⁷ s) = 1.99 × 10⁻⁷ s⁻¹.
  2. d = √(2 × 5 × 10⁻⁷/1.99 × 10⁻⁷).

Answer: About 2.24 m: the yearly swing shrinks by a factor e for each 2.2 m of depth, so deeper ground responds to warming slowly, over many years.

Practice problems

Work each on paper first, then check.

  1. Find the recurrence for y′ = y by power series.

    Show answer

    aₙ₊₁ = aₙ/(n + 1), so y = a₀eˣ.

  2. Is f(x) = x² odd or even? Which Fourier terms appear?

    Show answer

    Even: cosines only (plus a constant).

  3. A rod mode decays like e^(−α(π/L)²t). How does doubling L change its decay time?

    Show answer

    It multiplies the decay time by 4.

  4. Find b₃ for the square wave.

    Show answer

    4/(3π) ≈ 0.424.

Common misconceptions

  • Myth: Fourier series only work for smooth functions.

    Actually: They work for jumps too, converging to the midpoint at a jump.

  • Myth: Heat diffuses at a fixed speed.

    Actually: Diffusion time grows with distance squared.

  • Myth: Series solutions are always better than formulas.

    Actually: They are most useful when no closed form exists, as for Airy or Bessel equations.

Flashcards

  • Power-series method

    Substitute Σaₙxⁿ; get a recurrence.

  • Fourier series

    Sum of sines and cosines.

  • Fourier coefficient

    bₙ = (2/π)∫₀^π f sin nx dx.

  • Heat equation

    u_t = α u_xx.

  • Separation of variables

    u = X(x)T(t).

  • Damping depth

    √(2α/ω).

Self-check quiz

1. In the heat equation, higher modes decay…

Show answer

faster. Rate ∝ n².

2. An odd function’s Fourier series has only…

Show answer

sines. Odd × even integrals vanish.

3. Doubling the period of a surface temperature cycle changes the damping depth by…

Show answer

√2. d ∝ 1/√ω.

4. b₁ for the square wave is…

Show answer

4/π. 4/(1·π).

How this helps save the planet

Permafrost in the Northern Hemisphere holds about 1,672 billion tons of organic carbon, according to NASA. How fast surface warming reaches it is a heat-equation problem, and the damping depth shows why deeper layers respond slowly but keep responding long after the surface warms.

On Saving Planets: Calculus III

Sources: NASA Earth Observatory: The Carbon Cycle · Lebl, 4.6 PDEs, separation of variables, and the heat equation

Free learning resources

Back to top

Computer labs

Four computer labs: an SIR epidemic solved with Euler and RK4, a predator-prey phase plane, a climate energy-balance model, and a frequency sweep of a wind-turbine tower model.

Sample parameters are labeled as such; each lab links to a public source for the real system.

Safety reference: Lebl: Notes on Diffy Qs (free textbook)

Lab A: An SIR epidemic with Euler and RK4

Week 12

Goal: Solve the SIR model numerically, find the peak, and compare Euler with RK4 against the exact final size.

S′=−0.3SI, I′=0.3SI−0.1I, R′=0.1IS'=-0.3SI,\ I'=0.3SI-0.1I,\ R'=0.1I
SIR with R₀ = 3 (sample rates per day)

Procedure

  1. Start with S = 0.999, I = 0.001, R = 0 (fractions of the population).
  2. Run Euler with h = 1 day and h = 0.1 day to day 160, then RK4 with h = 1 day.
  3. Record the final R and the peak of I and when it occurs; compare with theory.

Data table

MethodFinal R (day 160)
Euler, h = 10.9467
Euler, h = 0.10.9411
RK4, h = 10.9405
Exact final size (theory)0.9405

Computed values for sample rates; not a real outbreak.

Sample calculation

  1. The peak is 30.1% infected at once, near day 38.4; theory gives I_max = 1 − (1 + ln R₀)/R₀ = 0.300.
  2. Euler with h = 1 overstates the final size by 0.006; RK4 with the same step matches theory to 4 digits.

Safety

  • None beyond normal computer use.

Home or virtual alternative

  • A spreadsheet works; Python is easier for RK4.

Lebl, 8.3 Applications of nonlinear systems

Planet link: The same model structure is used for disease outbreaks in people and in wildlife.

Lab B: The predator-prey phase plane

Week 11

Goal: Integrate the Lotka–Volterra model with RK4 and plot the closed orbit in the phase plane.

x′=x−0.02xy,y′=−0.5y+0.005xyx'=x-0.02xy,\quad y'=-0.5y+0.005xy
Lotka–Volterra (sample values)

Procedure

  1. Start at 150 prey and 50 predators.
  2. Use RK4 with a small step (0.001 years in Python, or 0.01 in a spreadsheet) for 40 years.
  3. Plot y against x and record the prey range and the period.

Data table

QuantityValue
Equilibrium(100, 50)
Prey range62.6 to 150
Period8.99 years
Small-cycle period (linear theory)8.89 years

Computed values; sample parameters.

Sample calculation

  1. The orbit closes: the populations repeat every 8.99 years, slightly longer than the 8.89 years linear theory predicts for small cycles, because this cycle is large.
  2. Predators peak after prey, a lag seen in many real predator-prey records.

Safety

  • None beyond normal computer use.

Home or virtual alternative

  • Desmos can draw the phase plane slope field.

Wolves and Moose of Isle Royale project (long-term data)

Planet link: Long-term records such as Isle Royale’s wolves and moose test these models. National Park Service: Wolves of Isle Royale

Lab C: A climate energy-balance model

Week 13

Goal: Step a one-box climate model through time after a sudden forcing and find its time scale.

CdΔTdt=F−λ ΔTC\frac{d\Delta T}{dt}=F-\lambda\,\Delta T
Linearized energy-balance model

Procedure

  1. Use C = 2.09 × 10⁸ J/(m²·K) (50 m of ocean), λ = 3.35 W/(m²·K) from Unit 8, and a sudden forcing F = 4 W/m² (sample value).
  2. Step with Euler using monthly steps for 10 years.
  3. Compare with the exact solution ΔT = (F/λ)(1 − e^(−t/τ)).

Data table

YearΔT (K)
10.48
20.77
51.10
101.19

Computed model values; no feedbacks other than radiation.

Sample calculation

  1. Equilibrium ΔT = F/λ = 1.19 K; τ = C/λ ≈ 2.0 years, so the warming is about 63% done after 2 years in this model.
  2. Real climate responds more slowly and warms more, because heat mixes into the deep ocean and feedbacks amplify it.

Safety

  • None beyond normal computer use.

Home or virtual alternative

  • A spreadsheet is enough.

NASA Earth Observatory: Climate and Earth’s Energy Budget

Planet link: Energy-balance models are the first step toward the climate projections assessed by the IPCC. IPCC AR6 Working Group I: The Physical Science Basis

Lab D: Resonance sweep of a wind-turbine tower model

Week 6

Goal: Compute the dynamic amplification of a single-oscillator tower model across driving frequencies.

A(f)=1(1−r2)2+(2ζr)2, r=f/f0A(f)=\frac1{\sqrt{(1-r^2)^2+(2\zeta r)^2}},\ r=f/f_0
Dynamic amplification

Procedure

  1. Use f₀ = 0.30 Hz and ζ = 0.01 (sample values).
  2. Tabulate A for driving frequencies from 0.1 to 0.6 Hz.
  3. Mark the rotor frequency (0.20 Hz at 12 rpm) and the blade-passing frequency (0.60 Hz) and judge the design.

Data table

Driving frequency (Hz)Amplification
0.101.12
0.201.80
0.253.27
0.3050.0
0.352.76
0.600.333

Computed values for a sample model, not a specific turbine.

Sample calculation

  1. Both operating frequencies sit well away from the 0.30 Hz peak, where the response would be 50 times the static deflection.
  2. If the rotor sped up to 18 rpm (0.30 Hz), it would drive the tower at resonance; this is why designers check the natural frequency against the whole speed range.

Safety

  • None beyond normal computer use.

Home or virtual alternative

  • A spreadsheet is enough.

PhET: Masses and Springs

Planet link: Avoiding resonance keeps wind turbines generating clean power safely for decades. U.S. DOE: How do wind turbines work?

Back to top

Exam prep practice sets

Time yourself: about 10 minutes per problem. Then compare with the full solutions.

Midterm practice set (Units 1–5)

  1. Solve y′ = −2ty, y(0) = 3, and find y(1).

    Show full solution
    1. dy/y = −2t dt; y = 3e^(−t²).

    Answer: 3e^(−1) ≈ 1.104.

  2. A lake with retention time 4 years: how long until a pollutant falls to half after inflow stops?

    Show full solution
    1. t = 4 ln 2.

    Answer: ≈ 2.77 years.

  3. Solve y″ + 6y′ + 9y = 0, y(0) = 1, y′(0) = 0, and find y(1).

    Show full solution
    1. y = (1 + 3t)e^(−3t).

    Answer: 4e^(−3) ≈ 0.199.

  4. Solve y′ + y = 1, y(0) = 0 by Laplace and find y(2).

    Show full solution
    1. Y = 1/(s(s + 1)) = 1/s − 1/(s + 1).

    Answer: 1 − e^(−2) ≈ 0.865.

Final practice set (all units)

  1. Classify the origin of x′ = [[0, 1], [−2, −2]]x.

    Show full solution
    1. λ² + 2λ + 2 = 0, λ = −1 ± i.

    Answer: Stable spiral.

  2. An SIR epidemic has β = 0.5, γ = 0.25 per day. Find R₀ and the herd-immunity threshold.

    Show full solution
    1. R₀ = 2.

    Answer: R₀ = 2, threshold 50%.

  3. Two Euler steps with h = 0.5 for y′ = −y, y(0) = 1.

    Show full solution
    1. Each step multiplies by 0.5.

    Answer: y(1) ≈ 0.25 (true e^(−1) ≈ 0.368).

  4. A mass-spring system with m = 1 kg, k = 16 N/m, c = 0.4 N·s/m. Find ω₀ and ζ.

    Show full solution
    1. ω₀ = 4 rad/s; c_crit = 8.

    Answer: ω₀ = 4 rad/s, ζ = 0.05 (peak amplification about 10).

Back to top

Formula sheet

μ=e∫p dx\mu=e^{\int p\,dx}
My=Nx⇒F=CM_y=N_x\Rightarrow F=C
C=C0e−t/τC=C_0e^{-t/\tau}
Hmax⁡=rK/4H_{\max}=rK/4
ar2+br+c=0ar^2+br+c=0
ω0=k/m, ccrit=2mk\omega_0=\sqrt{k/m},\ c_{\text{crit}}=2\sqrt{mk}
X=F0/(k−mω2)2+(cω)2X=F_0/\sqrt{(k-m\omega^2)^2+(c\omega)^2}
L{y′}=sY−y(0)\mathcal L\{y'\}=sY-y(0)
L{eat}=1/(s−a)\mathcal L\{e^{at}\}=1/(s-a)
L{u(t−a)f(t−a)}=e−asF(s)\mathcal L\{u(t-a)f(t-a)\}=e^{-as}F(s)
λ2−(tr⁡A)λ+det⁡A=0\lambda^2-(\operatorname{tr}A)\lambda+\det A=0
R0=β/γ, 1−1/R0R_0=\beta/\gamma,\ 1-1/R_0
yn+1=yn+hfy_{n+1}=y_n+hf
C T′=S(1−α)−εσT4C\,T'=S(1-\alpha)-\varepsilon\sigma T^4
ut=αuxxu_t=\alpha u_{xx}
bn=2π∫0πfsin⁡nx dxb_n=\tfrac2\pi\int_0^\pi f\sin nx\,dx

Constants

ConstantValue
Stefan–Boltzmann constant σ5.67 × 10⁻⁸ W/(m²·K⁴)
Average sunlight at the top of the atmosphere340 W/m²
Fraction of sunlight reflected29%
Lake Superior retention time191 years
Lake Erie retention time2.6 years
Methane’s average lifetimeabout a decade

Source: NASA Earth Observatory: Climate and Earth’s Energy Budget

Back to top

Free texts and tools

Use these free textbooks and tools alongside the course.

Back to top

Glossary

Autonomous equation
y′ = f(y), with no explicit t.
Characteristic equation
ar² + br + c = 0 for constant-coefficient ODEs.
Critical damping
Fastest return without overshoot.
Eigenvalue
λ with Av = λv.
Energy-balance model
Climate model balancing absorbed sunlight and emitted heat.
Equilibrium
Constant solution.
Euler’s method
First-order numerical stepping.
Exact equation
M dx + N dy = 0 with M_y = N_x.
Fourier series
Expansion in sines and cosines.
Heat equation
u_t = α u_xx.
Integrating factor
Multiplier making a linear ODE exact.
Jacobian
Matrix of first partials used to linearize.
Laplace transform
∫₀^∞ e^(−st) f dt.
Lotka–Volterra
Predator-prey model.
Phase portrait
Trajectories in the state plane.
Resonance
Large response when forcing matches a natural frequency.
Runge–Kutta (RK4)
Fourth-order numerical method.
R₀
Basic reproduction number.
SIR model
Susceptible–infected–recovered epidemic model.
Separable equation
dy/dx = g(x)h(y).

Back to top

Self-assessment rubric

No grade or credit is given. Use this to judge honestly where you are in each unit.

LevelWhat it looks like
4 · MasteryBuilds models from a description, solves them by formula and numerically, checks units and long-run behavior.
3 · ProficientSolves the practice problems with occasional slips.
2 · DevelopingFollows worked examples but struggles to set up models or choose a method.
1 · BeginningApplies formulas without checking solutions; needs to revisit the unit.

Suggested weighting if you want a score

PartWeight
Practice problems30%
Computer labs15%
Midterm practice set25%
Final practice set30%

Aim for level 3 or better in every unit before moving to the next course.

Back to top

Help / Donate