← All days Day 2 ▶
15-Day Differential Equations Course · Week 1 · Day 01

Thinking in Rates: What a Differential Equation Says

A differential equation is a rule that tells you how fast something changes, given where it is now. Learn to read equations that way, to build them from "rate in minus rate out", and to see them as a field of slopes that every solution must follow.

⏱ about 2–3 hours🧪 Lab: Slope field explorer and tank❓ 5-question quiz

1Today's goals

  • Read y′ = f(t, y) as a rule for change, not a puzzle to be solved
  • Build an equation from a balance: accumulation = in − out
  • Use the words order, linear, autonomous, initial value problem and solution correctly
  • Draw and read a slope field, and sketch solutions through it
  • Know when a solution exists, when it is unique, and when it can blow up

2A rule for change

Most laws of nature do not tell you what a quantity is. They tell you how fast it changes. Newton did not say where a planet will be; he said its acceleration is set by the force on it. Fourier did not say how hot a rod is; he said heat flows from hot to cold at a rate set by the temperature gradient. A differential equation is exactly such a statement: it links a quantity to its own rate of change.

y′ = dy/dt = f(t, y)
In words: "the rate at which y changes right now depends on the time and on the value of y right now."

Once you know the rule and where you start, the whole future is fixed — step forward a little at the rate the rule gives, look at the rule again, step again. That is the whole idea, and every method in this course is a more clever way of doing that walk.

ProcessQuantity yRate law in wordsEquation
Bank deposit, continuous interestBalance BGrows in proportion to itselfB′ = r·B
Radioactive decay, drug in the bloodAmount NA fixed fraction leaves per unit timeN′ = −k·N
Hot gearbox oil cooling downTemperature THeat loss ∝ difference from the roomT′ = −k·(T − Troom)
Population with limited foodPopulation PGrows, but slows as it nears capacity KP′ = r·P·(1 − P/K)
Falling body with air dragVelocity vGravity minus drag ∝ v²m·v′ = m·g − c·v²
Spring–mass systemDisplacement xAcceleration ∝ −displacementm·x″ = −k·x

3Building an equation: rate in minus rate out

Almost every model you will ever write starts from one sentence, the balance law:

Rate of accumulation = rate in − rate out + rate generated − rate consumed. It holds for mass, energy, money, people, heat, charge — anything you can count.

Example — a tank with an outlet. Water flows in at Qin. It drains through a hole at the bottom; by Torricelli, the outflow is Qout = k·√h, faster when the water is deeper. The volume is A·h, so

A · dh/dt = Qin − k·√h

Read it before you solve it. When h is small the outflow is small, dh/dt > 0 and the tank fills. When h is large the outflow wins and the tank drains. Somewhere in between, in and out balance — that level h* = (Qin/k)² is an equilibrium. You know all of this without solving anything.

Example — a mixing tank. A V-litre tank of brine is flushed with fresh water at Q litres per minute, perfectly mixed. The salt mass m leaves at the outflow concentration m/V: m′ = −(Q/V)·m. Same shape as decay, with time constant V/Q.

4The vocabulary

WordMeaningExample
OrderThe highest derivative that appearsm·x″ + k·x = 0 is second order
Lineary and its derivatives appear only to the first power, never multiplied together or inside sin, √ …y′ + 2y = sin t is linear; y′ = y² is not
Autonomousf does not depend on t explicitlyP′ = r·P·(1 − P/K)
ODE / PDEOrdinary: one independent variable (time). Partial: several (time and space)Heat in a rod: ut = α·uxx (Day 12)
Initial value problemThe equation plus a starting value y(t₀) = y₀T′ = −0.06(T − 27), T(0) = 85
SolutionA function y(t) that makes the equation true for every ty = C·e0.5t solves y′ = 0.5y

Checking a solution needs no cleverness — just substitute. If y = C·e0.5t then y′ = 0.5·C·e0.5t = 0.5·y. ✓ The constant C is free: that is the general solution, a whole family of curves. The initial value picks one member: y(0) = 2 gives C = 2.

5The picture: a field of slopes

The equation y′ = f(t, y) gives a slope at every point of the (t, y) plane. Draw a tiny line segment with that slope at a grid of points and you get a slope field (or direction field). A solution is a curve that is tangent to the field everywhere — like a leaf carried on a stream, it has no choice where to go.

  • Isoclines are curves where the slope is the same. The isocline f = 0 is special: there the solutions are momentarily flat, so maxima and minima of solutions sit on it.
  • Where the field is the same along every horizontal line, the equation is autonomous: shifting a solution in time gives another solution.
  • Different starting points give different curves, but in a well-behaved field curves never cross. If two did, the point of crossing would have two different futures.
Existence, uniqueness and blow-up

Picard–Lindelöf theorem. If f(t, y) and ∂f/∂y are continuous near (t₀, y₀), exactly one solution passes through that point, at least for a short time. The proof builds the solution as the limit of the iteration yk+1(t) = y₀ + ∫ f(s, yk(s)) ds, which is a contraction when ∂f/∂y is bounded.

When uniqueness fails. y′ = 3·|y|2/3 with y(0) = 0 has the solution y = 0 and y = t³, and infinitely many that sit at zero for a while and then take off. Here ∂f/∂y = 2·|y|−1/3 is infinite at y = 0, so the theorem does not apply. Pick the last preset in the lab to see it.

Blow-up in finite time. y′ = y², y(0) = 1 has the solution y = 1/(1 − t), which is infinite at t = 1. A smooth, innocent-looking f can still send solutions to infinity — the theorem only promises a solution for "a short time". Linear equations never do this.

6Worked example

The tank: A = 0.5 m², Qin = 60 L/min, k = 60 L/min per √mUnits: Q in L/min = 0.001 m³/min, so dh/dt = (Q_in − k·√h) / (1000·A) [m/min] At h = 0.25 m: outflow = 60 × √0.25 = 30 L/min dh/dt = (60 − 30) / (1000 × 0.5) = 30/500 = 0.06 m/min → rising 60 mm per minute Equilibrium: 60 = 60·√h* → h* = 1 m At h = 1.44 m: outflow = 60 × 1.2 = 72 L/min, dh/dt = −12/500 = −0.024 m/min → falling So whatever the start, the level heads for 1 m — and we have not solved anything.
Where you meet thisCoolant header tanks, lube-oil sumps with a return line, a settling pond, a reservoir behind a dam, a bath tub — and, by analogy, a capacitor discharging through a resistor, or a queue of jobs being served.

7Lab: slope field explorer

Pick an equation or type your own in t and y (use * for multiply and ^ for powers, e.g. y*(1-y) - 0.1*t). Click anywhere to start a solution there. Press P to send a point along the newest curve: the orange line is its tangent, and the right-hand plot shows the solution and its derivative together — the derivative is just f evaluated along the curve.

The tank, live

Press P, then move the inflow slider while it runs. The level never jumps — only its rate jumps. That is what a first-order equation means physically: the state is continuous; the rule sets the slope.

8Pro tips and common mistakes

  • Check units first. Every term in an equation must have the same units. In the tank, L/min had to become m³/min before dividing by A.
  • A solution is a function, not a number. "Solve y′ = 2y" means "find all functions whose derivative is twice themselves".
  • Signs carry the physics. Write out-flows with a minus sign and check: if y is big, does the equation pull it back?
  • Look before you solve. Equilibria and the direction of change can be read off the equation in seconds and catch most algebra slips later.

9Practice

  1. In the lab, choose y′ = t − y. Where is the isocline of zero slope? Show that y = t − 1 is a solution, and see that every curve approaches it.
  2. A 2000-litre tank of brine with 50 kg of salt is flushed with fresh water at 40 L/min. Write the equation for the salt mass. What is the time constant?
  3. Show by substitution that y = 1/(1 − t) solves y′ = y². Where does it blow up? Type y^2 in the lab and look.
  4. Classify (order, linear or not, autonomous or not): (a) x″ + sin x = 0 (b) y′ = t·y (c) y′ + y = cos t.

10Quick quiz

5 questions. Click an answer — you get the explanation straight away.

Progress is kept in this browser (and in your account when signed in).