From the handbook: Differential Equations, §477–498, pages 706–746
Often we know only the rule for how something changes; the motion that obeys it is found by following the rule one small step at a time.
Up to now each idea started from a rule that gives the answer directly, like s = ½gt². Very often nature only tells us how things change. “A population grows in proportion to its size.” “A cup of coffee cools faster the hotter it is.” “A spring pulls back harder the further you stretch it.” A rule like this, connecting a quantity to its own rate of change, is a differential equation. The simplest is
y ′ = y
Read it as “the slope of y equals y”, or “the bigger it is, the faster it grows”. y is the quantity, x is time, and y ′ is the slope (idea 4). Solving it means finding a curve that obeys the rule everywhere. Here the answer is y = ex, the curve that is its own slope (idea 3).
The rule tells you the slope at every point of the plane, even before you know any solution. Draw a short dash with that slope at each point and you get a direction field (§479). A solution is any curve that follows the dashes, like a leaf floating on a current. Each starting point gives its own curve; click the left-hand picture to try a different start.
When a rule can't be solved with a formula, follow it. From the starting point, read the slope, take a straight step of length h along it, read the slope again where you land, and repeat (§490):
ynext = y + f(x, y) · h
Read it as “the next height is this height, plus the slope here times the step”. f(x, y) is the rule's slope at the current point and h is the step size.
Worked example. y ′ = y, starting at y = 1 when x = 0, with steps of h = 0.5. The slope at the start is 1, so the first step rises 1 × 0.5 to 1.5. The slope there is 1.5, so the next step rises 0.75, to 2.25 at x = 1. The true answer is e = 2.718: each straight step falls a little behind the curving path. Smaller steps do better: h = 0.1 gives 2.594, and 0.01 gives 2.705. Look at the numbers: a step of 1/n gives exactly (1 + 1/n)n, the compounding of idea 3. Euler's method on this rule is compound growth.
The book's example is y ′ = ½xy from y = 1, in ten steps of 0.1. Its first two steps give 1 and 1.005, as in the book, and the tenth gives 1.248 at x = 1, against a true value of 1.284.
A spring's rule is about acceleration, the slope of the slope (y ″, idea 4). The book (§496–498) writes the damped spring as
y ″ + p y ′ + q y = 0
Read it as “acceleration, plus p times speed, plus q times position, adds up to zero”. Moved around: the acceleration is a pull back toward rest, q times how far out it is (q is the stiffness), plus a drag against the motion, p times the speed (p is the damping, like a shock absorber). The book's example y ″ + y ′ + y = 0 wobbles and dies away; its answer is a sine wave inside a shrinking e−x/2 envelope. With p = 4, q = 4 the damping is just strong enough that it never overshoots: it glides back to rest as fast as it can. Whether it wobbles depends on (p/2)² compared with q.
This is secondary motion in animation: the jiggle and settle of a tail, an earring or an antenna. Every cloth, particle and rigid-body simulation in Blender steps rules like these forward, one frame at a time, with methods descended from Euler's.
Vygodsky, Mathematical Handbook: Higher Mathematics, chapter “Differential Equations”.
Water running down a terrain follows the rule “go straight downhill”, the gradient of idea 8. Its paths are solutions of a direction field, and they join into drainage networks.