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:
- on the y-axis (x = 0) every segment is
flat — slope 0;
- to the right (x > 0) they tilt uphill, steeper the
further right you go;
- to the left (x < 0) they tilt downhill.
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:
- on the x-axis (y = 0) the slope is
0 — the segments lie perfectly flat;
- above it (y > 0) the slope is positive and grows — curves shoot
up;
- below it (y < 0) the slope is negative and grows in size — curves dive
down.
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):
- the slope field draws, at a grid of points, a short segment of slope
f(x, y); every solution curve is
tangent to the field at every point it passes through;
- because exactly one solution passes through each point, solution curves never
cross — they can crowd together but not intersect;
- an equilibrium solution is a constant y \equiv y_*
where f(x, y_*) = 0; its segments are horizontal and it stays put
forever;
- it is stable if nearby solutions move toward it and unstable
if they move away — read off from whether the field's arrows point toward the line or away from
it.
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:
- y' = x: the isoclines x = c are
vertical lines — which is why the field in example 1 looked the same up each
column.
- y' = y: the isoclines y = c are
horizontal lines; the special isocline y = 0 (slope
0) is the equilibrium.
- y' = x + y: the isoclines x + y = c are a
family of parallel diagonal lines. On the line x + y = 0
all segments are flat; on x + y = 1 they all have slope
1; and so on. A couple of these and the whole field appears.
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:
-
Don't trace along the segments — stay tangent to them. A solution curve
doesn't follow one dash and then jump to the next; it flows through the point of every
segment it meets, matching that segment's slope at that instant, then bending as the next segment
dictates. The dashes are direction hints, not track pieces to be joined end to end.
-
Solution curves never cross. Exactly one solution passes through each point (the
field gives a single slope there), so two solution curves can hug and crowd but can
never intersect. If your sketch has an X in it, you have drawn two solutions merging into
one direction — impossible.
-
Horizontal segments are not "nothing happening" — they mark equilibria. A whole
row of flat segments at height y_* means
f(x, y_*) = 0, and the constant function
y \equiv y_* is a genuine (equilibrium) solution living right there.
Don't overlook it just because it's a straight line.
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:
- Put your pencil at the start (x_0, y_0).
- Look at the segment there and move a tiny step in that direction.
- Re-read the segment at the new point and bend to match it.
- Repeat — forwards for larger x, and backwards for
smaller — letting the field steer the whole way.
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.