Slope Fields

You have met a differential equation — a rule that, at every point, tells a curve how steep it must be — and you have learned to separate and integrate the lucky ones that come apart cleanly. But most differential equations refuse to be solved in closed form. So here is the beautiful trick: you can see the whole family of solutions at once — before solving anything, and even when there is no formula to solve for.

Take any first-order equation written in the form

\frac{dy}{dx} = f(x, y).

Read it literally. It says: if a solution curve passes through the point (x, y), its slope there must be exactly f(x, y). The equation hands you the slope at every point of the plane for free — you never needed the solution to know that. So go to a whole grid of points, and at each one draw a tiny line segment tilted at the slope f(x, y) demands. The resulting hedgehog of little dashes is a slope field (also called a direction field): a picture of the "flow" that every solution is obliged to follow.

A solution curve is then just a path that stays tangent to the little segments the whole way along — like a leaf carried by a current, always pointing where the field points. Sketch one by dropping a pencil at a starting point and letting the arrows steer it. No integration required.

Worked example 1: reading the field of y' = x

Start with the friendliest possible right-hand side: f(x, y) = x, so y' = x. The slope depends on x alone and ignores y completely. That means the segments look the same all the way up each vertical line:

Press Play below to lay down the field, then let the solution curves grow through it. Notice how the curves swoop down, flatten as they cross the y-axis, then swoop back up — exactly what the segments told them to do.

And here the field does not merely suggest the answer — it is the answer in pictures. Because y' = x is separable we can check it against a formula: integrate to get

y = \int x \, dx = \frac{x^2}{2} + C.

The solutions are the parabolas y = \tfrac12 x^2 + C — a whole stack of identical parabolas, one sitting C units above the next. That vertical stacking is the field telling us something structural: since the slope f = x doesn't depend on y, sliding a solution straight up gives another solution. Exactly one parabola passes through any point you name.

Worked example 2: equilibrium and stability in y' = y

Now let the slope depend on y instead: f(x, y) = y, so y' = y. This time the segments are the same all the way along each horizontal line, and something special happens at one height:

The row of flat segments along y = 0 is worth pausing on. A curve that starts flat, on a line where every segment is flat, has no reason to ever leave: the constant function y \equiv 0 is itself a solution. A constant solution like this — sitting exactly where f(x, y) = 0 so its segments are horizontal — is called an equilibrium solution.

But watch what the neighbours do. Any solution starting even a hair above y = 0 is swept upward and away; any starting a hair below is swept downward and away. The general solution is y = Ce^{x} (the same exponential separation gives it), and every C \ne 0 runs off to \pm\infty. An equilibrium that its neighbours flee like this is called unstable. (Had the arrows pointed back toward the line — as they would for y' = -y — the equilibrium would be stable, an attractor.) You read all of that straight off the picture: no formula for y(x) is needed to see that y = 0 is a repeller.

For a first-order ODE \dfrac{dy}{dx} = f(x, y):

Isoclines: the fast way to draw a field by hand

Sketching a field point by point is tedious. Here is the shortcut mapmakers use. An isocline (from Greek iso- "equal" + klinein "to slope") is the set of points where the slope takes one fixed value c — that is, the curve

f(x, y) = c.

All along a single isocline, every segment is parallel, tilted at slope c. So instead of computing the slope at scattered dots, you sketch a few isoclines, and on each one draw a comb of identical parallel dashes. A few worked cases:

Isoclines are also where the qualitative reading lives: the isocline f(x, y) = 0 is the "nullcline" where solutions momentarily flatten (their peaks, troughs and equilibria all sit on it), while a very steep isocline warns you the solutions are about to rocket.

The equation y' = x^2 + y^2 has no solution expressible in the ordinary functions — no amount of cleverness produces a formula for y(x). And yet its slope field is trivial to draw: the isoclines x^2 + y^2 = c are circles, and the slope is bigger the further you get from the origin. From the picture alone you can see solutions steepen without bound as they spiral outward and even "blow up" in finite x. This is the deep payoff of slope fields and the whole field of qualitative differential equations, pioneered by Henri Poincaré: the behaviour of a system — does it settle, oscillate, or explode? — often matters more than a formula, and the geometry gives it to you even when the algebra never could.

A slope field shows the slope, not the solution. The three classic slips:

How to sketch a solution from a slope field

Given a field and a starting point (an initial condition y(x_0) = y_0), the recipe is purely mechanical:

That is exactly how a computer draws solutions to equations nobody can solve by hand: take small steps, always in the field's direction. Formalised, that idea becomes Euler's method, the first numerical ODE solver — a slope field walked one small step at a time.