Slope Fields

Every solution of an equation, drawn at once.

A gradient at every point

A differential equation dy/dx = f(x, y) gives a gradient at every point of the plane, even when no formula for y can be found. dy/dx = x says that at any point whose x-coordinate is 1 the gradient is 1, wherever the point is; at x = −2 it is −2; on the y-axis it is 0.

Draw a short segment at each point of a grid, at the gradient the equation gives there. The picture is a slope field. Every solution of the equation is drawn into it, before any solving.

xy

The slope field of dy/dx = x at the whole-number points. Every segment in the column x = −2 has gradient −2, in x = −1 gradient −1, on the y-axis 0, in x = 1 gradient 1 and in x = 2 gradient 2. Each column is identical from top to bottom.

A solution runs along the segments

A solution of dy/dx = x is a curve whose gradient at each of its points is the x there. The curve y = x²/2 − 1 is one: it differentiates to x. Wherever it crosses the field, it runs along the segment at that point, as if it had been drawn by following them.

Adding a constant does not change a gradient, so y = x²/2 + c is a solution for every c. Each one is the same curve moved up or down, and together they fill the field. A point picks one: through (2, 1), 1 = 2 + c, so c = −1. That point is the initial condition.

xy

Three members of the family y = x²/2 + c on the field of dy/dx = x. The gold curve y = x²/2 − 1 passes through the dot at (2, 1), where its gradient is 2, the gradient of the segment there. The dashed curves, with c = −2 and c = 1, are the same shape shifted, and they follow the segments just as closely.

When the gradient depends on y

For dy/dx = y the gradient at a point is its height. Going along a row, y stays the same, so every segment in a row is alike: flat on the x-axis, gradient 1 along y = 1, 2 along y = 2. Going up a column the segments steepen.

The solutions are y = Aeˣ. The curve y = eˣ passes through (0, 1) and steepens as it climbs, since its gradient is its height. The x-axis itself, y = 0, is a solution too: its gradient is 0, which is its height.

xy

The slope field of dy/dx = y. Along the row y = −1 every segment has gradient −1, along the x-axis 0, along y = 1 gradient 1 and along y = 2 gradient 2. The gold curve y = eˣ climbs through (0, 1); the dashed curve y = −0.5eˣ, also a solution, falls away below the axis.

A field that needs both letters

For dy/dx = x − y the segment at (2, 1) has gradient 2 − 1 = 1, the one at (0, 1) has gradient −1, and the one at (2, −1) has gradient 3. The segments change both across a row and up a column.

Along the line y = x every gradient is 0, so the segments there lie flat. Along y = x − 1 every gradient is x − (x − 1) = 1, the gradient of that line itself, so the line is a solution. Every other solution bends toward it.

Through (0, 1) the solution is y = x − 1 + 2e^(−x). It differentiates to 1 − 2e^(−x), and x − y is also 1 − 2e^(−x), so it fits. At x = 2 it is 1.271, and a difference quotient gives its gradient there as 0.729, which is 2 − 1.271.

xy(1.5, −1)dy/dx = 2.5−3−3−2−2−1−1112233

every dash has gradient x − y, and the curve through the probe is tangent to each dash it crosses: one equation, a whole family of solutions

Put the probe on (0, 1) and read the solution it selects

Every dash has gradient x − y. The probe starts at (1.5, −1), where dy/dx = 1.5 − (−1) = 2.5, and the gold curve is the solution through it. Drag the probe to (0, 1), inside the dashed circle: the curve becomes y = x − 1 + 2e^(−x).

Reading a field before solving

Flat segments mark where dy/dx = 0. A solution crossing them is at a stationary point there. For dy/dx = x they lie on the y-axis, and every solution y = x²/2 + c has its minimum there.

A column of identical segments means the gradient does not depend on y, so the equation is dy/dx = f(x) and its solutions are the integrals of f. A row of identical segments means the gradient does not depend on x.

A whole row of flat segments is a constant solution. For dy/dx = y(2 − y) the rows y = 0 and y = 2 are flat, so y = 0 and y = 2 are both solutions. Between them y(2 − y) is positive, so solutions there rise; above 2 it is negative, so they fall back. The solution through (0, 0.5) is y = 2/(1 + 3e^(−2x)): its gradient at the start is 0.5 × 1.5 = 0.75, and at x = 2 it has reached 1.896.

xy

The slope field of dy/dx = y(2 − y). The segments are flat along the x-axis and along the dashed line y = 2, have gradient 1 along y = 1, and have gradient −3 along y = −1 and along y = 3. The gold curve rises from near 0 and levels off under y = 2.

The usual mistakes

Drawing a solution across the segments. A solution runs along them; a curve crossing every segment at right angles solves a different equation.

Reading the gradient at a point from the wrong letter. For dy/dx = y the gradient on the y-axis is not 0; it is the height y, which changes all the way up the axis. It is the x-axis where that field is flat.

Taking a segment for a boundary. A segment shows a gradient; solutions do not stay between segments, they follow them.

Practice Slope Fields in the app