Modeling with Differential Equations
A Differential Equation (DE) is an equation containing a derivative, like y′ = 2x or dy/dx = x + y. The big idea: it describes how a quantity changes.
- Rate of change = derivative (how fast something changes)
- Proportional to means multiply by a constant (ex: dy/dt = ky)
- Initial condition gives a starting point (ex: y(0)=5)
Verifying Solutions for Differential Equations
This is “free points” if you’re clean and organized: differentiate, substitute, simplify, conclude.
- Compute y′ (and y″ if needed).
- Substitute y and y′ into the DE.
- Simplify. If LHS = RHS, it is verified.
Verify that y = e3x is a solution to y′ − 3y = 0.
- Differentiate: y′ = 3e3x.
- Substitute: 3e3x − 3(e3x).
- Simplify: 0 = 0 ✅
Sketching Slope Fields
A Slope Field represents a DE by drawing tiny line segments with slope dy/dx at many points (x,y).
Drawing Them
Plug (x,y) into the DE → get slope → draw a short segment.
Reading Them
Solution curves “flow” along the segments like a leaf in a stream.
Reasoning Using Slope Fields
Use the field to predict long-term behavior, compare solutions, and spot equilibrium solutions.
If the slope is zero along y=k, then y=k is an equilibrium solution.
If solutions don’t cross in the field, the one that starts higher stays higher.
- Zero slope check: where segments are flat, dy/dx = 0.
- x-only DE: identical slopes in columns. y-only DE: identical slopes in rows.
Euler's Method (欧拉方法) BC Only
Euler's Method approximates a solution curve by stepping forward using the slope: start → find slope → take a step → repeat.
"New y = Old y + (step size × slope)"
Problem: Given dy/dx = x + y and y(0)=1. Approximate y(2) with 2 steps (Δx=1).
| Current (x, y) | Slope | y + (Δx)·slope | New Point |
|---|---|---|---|
| (0, 1) | 0 + 1 = 1 | 1 + (1)(1) = 2 | (1, 2) |
| (1, 2) | 1 + 2 = 3 | 2 + (1)(3) = 5 | (2, 5) |
Answer: y(2) ≈ 5.
Separation of Variables
Main algebraic method: move all y to one side and all x to the other, then integrate.
- Separate: move y-stuff with dy, x-stuff with dx.
- Integrate: integrate both sides.
- + C: add constant on the x-side.
- Use IC: plug in initial condition to find C.
- Solve for y: isolate y.
Solve: dy/dx = xy2 with y(0)=1.
- Separate: y−2 dy = x dx
- Integrate: ∫ y−2 dy = ∫ x dx → −1/y = x2/2 + C
- Find C: plug in (0,1): −1 = 0 + C → C = −1
- Solve: −1/y = x2/2 − 1 → y = −1 / (x2/2 − 1)
Particular Solutions (Initial Conditions)
General solutions include +C. Initial conditions choose the one curve you actually want.
“Using the initial condition y(x0) = y0, substitute into the general solution to solve for C. Therefore, the particular solution is …”
If y = Cekt and y(0)=5, then 5 = Ce0 → C=5, so y = 5ekt.
Exponential Growth & Decay
When the rate of change is proportional to the amount present, you get the exponential model.
Solution:
Population, bacteria, interest.
Half-life, cooling, depreciation.
Logistic Growth Models BC Only
Logistic growth models limited resources: fast growth early, then it slows as the population approaches the carrying capacity M.
Where M is the carrying capacity.
Limit
P(t) → M as t → ∞
Fastest Growth
P = M/2
Inflection Point
Occurs at P = M/2.
If dP/dt = 0.2P(100 − P), then M = 100 and max growth occurs at P = 50.