Calculus

Differential Equations

An equation that gives you the slope instead of the value. Draw that slope at every point and the plane fills with little segments, each one telling any solution passing through it which way to go next. Drop a point anywhere and watch the curve thread itself through the field, then take steps too big and watch it drift off the truth.

tiny, faithfulhuge, wrong
Point
Slope y′ there
Euler steps
Euler error at the end
Solution exists until

Drag the white dot anywhere on the plane. The bright curve is the one solution through it, integrated in both directions until it leaves.

What to observe

  1. The equation never mentions a curve. It only says, at this point, go this steep. The slope field is that instruction drawn everywhere at once, and a solution is any curve that stays tangent to it the whole way. Drag the dot and the bright curve slides through the segments without ever cutting across one.
  2. Turn on the whole family. Nothing was solved differently for any of them: they all obey the same field, they just started somewhere else. That is what the + C in an antiderivative really is, a whole sheaf of curves stacked over the plane, and picking an initial condition is picking one of them.
  3. Try x − y and drag the start up and down. Every curve, from far above and far below, is squeezed onto the same line. Solutions canforget where they came from, which is why a stable system settles to the same behaviour whatever state you switch it on in.
  4. Try y(1 − y) and look at the two horizontal lines. Both are solutions that never move, but they behave in opposite ways: start a hair above y = 0 and you run away from it, start a hair below y = 1 and you run towards it. Stable and unstable equilibria, read straight off the arrows without solving anything.
  5. Turn on Euler's method and push h up. Each straight hop uses the slope at the point it starts from and then commits to it for the whole step, so it lands slightly off the true curve, then reads its next slope from the wrong place. The error compounds. Halve h and the error roughly halves, which is exactly what first-order means.
  6. Pick −x / y. The solutions are circles, and the field goes vertical as they cross the x axis. The integration stops dead there: the equation is fine, but y as a function of x is not, since one x would need two values. Solutions are local objects and can simply run out.
  7. Turn on isoclines. Each dashed curve is where the slope takes one fixed value, so the segments along it are all parallel. Sketching two or three isoclines by hand is how the whole field was drawn before there were computers, and the zero one alone tells you where solutions turn around.

Shortcuts: space run/pause · s step · r reset · f fullscreen