Slope Fields
A slope field (or direction field) is a picture of a differential equation dy/dx = f(x, y). At many points (x, y), you draw a short line segment whose slope is f(x, y). Solution curves follow the segments, so a slope field shows what the solutions look like without solving the equation.
Before this lesson: Verifying Solutions to Differential Equations and Equation of a Tangent Line
Seeing a differential equation
The equation dy/dx = x + y doesn’t tell you y directly. It tells you the slope of the solution curve at any point. At (1, 0), the slope is 1 + 0 = 1. At (−1, −1), it is −2.
Draw a tiny tangent segment with that slope at each point of a grid, and a pattern appears, like iron filings around a magnet. Any solution curve must run along the segments everywhere it goes.
How to draw a slope field
- Pick a grid of points, such as all (x, y) with x and y in −2, −1, 0, 1, 2.
- At each point, find the slope m = f(x, y).
- Draw a short segment through the point with slope m: flat for m = 0, rising for m positive, falling for m negative, steeper for bigger |m|.
- To sketch a solution, start at the initial point and follow the segments.
| If dy/dx depends on… | Then the slopes are… |
|---|---|
| x only, like dy/dx = x² | The same along every vertical line |
| y only, like dy/dx = 2 − y | The same along every horizontal line |
| Both x and y, like dy/dx = x + y | Different across the plane; look for where the slope is 0 |
A horizontal line y = c where dy/dx = 0 for every x is an equilibrium solution: a solution that never changes.
Slope field examples
Example 1: Finding slopes at points
For dy/dx = x + y, find the slope at (0, 0), (1, 0), (−1, 1), (1, 1) and (−1, −1).
(0, 0): \; 0 + 0 = 0
Substitute x = 0 and y = 0: a flat segment.
(1, 0): \; 1 + 0 = 1
A segment rising at 45°.
(-1, 1): \; -1 + 1 = 0
Flat again.
(1, 1): \; 1 + 1 = 2
Rising steeply.
(-1, -1): \; -1 + (-1) = -2
Falling steeply (see adding and subtracting integers).
Answer: the slopes are 0, 1, 0, 2 and −2. The slope is 0 wherever y = −x.
Example 2: Slopes that depend only on y
Describe the slope field of dy/dx = y, and connect it to the solutions y = Ceˣ.
y = 0: \; \dfrac{dy}{dx} = 0Every segment on the x-axis is flat, so y = 0 is an equilibrium solution.
y = 1: \; \dfrac{dy}{dx} = 1, \quad y = 2: \; \dfrac{dy}{dx} = 2Above the axis, slopes are positive and get steeper going up.
y = -1: \; \dfrac{dy}{dx} = -1Below the axis, slopes are negative.
\dfrac{d}{dx}\left(Ce^{x}\right) = Ce^{x} = yCheck the solutions (see derivatives of exponential functions).
Answer: the slopes are the same along each horizontal line. Curves above the axis rise faster and faster; curves below fall faster and faster, just like y = Ceˣ.
Example 3: A field of circles
Sketch the slope field of dy/dx = −x/y at a few points and show that the solutions are circles.
(1, 1): \; -\dfrac{1}{1} = -1, \quad (1, -1): \; -\dfrac{1}{-1} = 1Find two slopes.
(0, 2): \; -\dfrac{0}{2} = 0Flat at the top.
(2, 0): \; -\dfrac{2}{0} \text{ is undefined}Vertical segments on the x-axis.
x^2 + y^2 = r^2 \Rightarrow 2x + 2y\dfrac{dy}{dx} = 0Differentiate a circle implicitly (see implicit differentiation).
\dfrac{dy}{dx} = -\dfrac{x}{y}Solve for dy/dx: it matches the equation.
Answer: the segments circle around the origin, and the solution curves are circles x² + y² = r² (each half above or below the x-axis).
Example 4: Matching an equation to a field
A slope field has flat segments all along y = 2, rising segments below y = 2 and falling segments above it. The slopes are the same along each horizontal line. Which equation is it: dy/dx = y − x, dy/dx = x² or dy/dx = 2 − y?
\text{Same along horizontal lines} \Rightarrow f \text{ depends on } y \text{ only}This rules out y − x and x².
2 - y = 0 \text{ at } y = 2Flat along y = 2.
y = 0: \; 2 - 0 = 2 \gt 0
Rising below y = 2.
y = 3: \; 2 - 3 = -1 \lt 0
Falling above y = 2.
Answer: dy/dx = 2 − y. Every solution moves toward the equilibrium y = 2.
Example 5: Reading a population model
A fish population P (in thousands) follows dP/dt = 0.5P(1 − P/100), where t is in years. Use slopes to describe what happens to a population that starts at 20, and to one that starts at 120.
P = 0 \text{ or } P = 100: \; \dfrac{dP}{dt} = 0Two equilibrium solutions.
P = 20: \; 0.5(20)(1 - 0.2) = 8
Positive slope: the population grows.
P = 50: \; 0.5(50)(1 - 0.5) = 12.5
Growth is fastest in the middle.
P = 120: \; 0.5(120)(1 - 1.2) = -12
Negative slope: above 100, the population shrinks.
Answer: starting at 20, the population rises toward 100 thousand. Starting at 120, it falls toward 100 thousand. P = 100 is the carrying capacity.
Common mistakes
| Mistake | Example of the error | Fix |
|---|---|---|
| Plotting the value instead of a slope | Putting a dot at height 2 for f(1, 1) = 2 | f(x, y) is a slope. Draw a short segment with slope 2 through (1, 1). |
| Swapping x and y | Using f(1, 0) = 0 + 1 for dy/dx = x − y | Substitute carefully: f(1, 0) = 1 − 0 = 1. |
| Wrong steepness | Same steepness for slopes 1 and 3 | Bigger |m| means a steeper segment. |
| Assuming slopes depend only on x | Copying one column of segments across the grid for dy/dx = x + y | Check whether f uses y. Here it does, so each point is different. |
| Solution curves cutting across segments | A sketched curve that crosses the segments at an angle | A solution must be tangent to the segments at every point. |
Related methods
Euler’s method
Following the segments with small straight steps is a numerical way to approximate a solution. That is Euler’s method, the next lesson.
Isoclines
An isocline is a curve where every segment has the same slope. For dy/dx = x + y, the isocline with slope k is the line x + y = k. Drawing a few isoclines makes a slope field quick to sketch.
Solving exactly
Some equations can be solved by separating the variables, coming up in this unit. The slope field is still a good way to check that a formula looks right.
Practice problems
- For dy/dx = x − y, find the slope at (2, 1), (1, 2) and (0, 0).
- For dy/dx = x², find the slopes at x = −1, 0 and 2. Why are the slopes the same along each vertical line?
- Find the equilibrium solutions of dy/dx = y² − 1, and the slopes along y = 0 and y = 2.
- Where are the segments horizontal in the slope field of dy/dx = x + y?
- Show that the curve y = x² + 2 follows the slope field of dy/dx = 2x at x = 1.
- One field has slopes that are the same along every vertical line. Is it dy/dx = cos x or dy/dx = y?
- For dy/dx = −y/2, find the slope at (0, 4). Describe the solution through (0, 4).
- For dy/dx = xy, where are the segments flat? What is the sign of the slope in each quadrant?
- For dy/dx = x + y, use the slope at (0, 1) to write the tangent line there and estimate y(0.1).
- A pie cools by dT/dt = −0.2(T − 70), with T in °F. Find the slopes at T = 170, 70 and 50. What happens over time?
Show answers
1.
(2, 1): \; 2 - 1 = 1; \; (1, 2): \; 1 - 2 = -1; \; (0, 0): \; 0
Substitute each point.
Answer: 1, −1 and 0
2.
(-1)^2 = 1, \; 0^2 = 0, \; 2^2 = 4
Substitute each x.
Answer: 1, 0 and 4. The formula has no y, so every point with the same x gets the same slope.
3.
y^2 - 1 = 0 \Rightarrow y = 1 \text{ or } y = -1Flat for every x along these lines (see solving quadratics with square roots).
y = 0: \; 0 - 1 = -1; \; y = 2: \; 4 - 1 = 3
Substitute.
Answer: equilibria y = 1 and y = −1; slopes −1 along y = 0 and 3 along y = 2
4.
x + y = 0 \Rightarrow y = -x
Set the slope equal to 0.
Answer: along the line y = −x
5.
\dfrac{dy}{dx} = 2(1) = 2The field’s slope at x = 1.
\dfrac{d}{dx}(x^2 + 2) = 2x = 2 \text{ at } x = 1The curve’s slope at x = 1, at the point (1, 3).
Answer: both slopes are 2, so the curve follows the field there (in fact, everywhere)
6.
\dfrac{dy}{dx} = \cos x \text{ depends only on } xPoints on one vertical line share x.
Answer: dy/dx = cos x
7.
-\dfrac{4}{2} = -2Substitute y = 4.
\dfrac{dy}{dx} \lt 0 \text{ for } y \gt 0, \text{ and } \to 0 \text{ as } y \to 0Falling, but more slowly as y shrinks.
Answer: slope −2; the solution decreases toward 0 without reaching it (it is y = 4e^(−x/2))
8.
xy = 0 \Rightarrow x = 0 \text{ or } y = 0Flat along both axes.
\text{Q1: } (+)(+) \gt 0, \; \text{Q2: } (-)(+) \lt 0Signs in quadrants I and II.
\text{Q3: } (-)(-) \gt 0, \; \text{Q4: } (+)(-) \lt 0Signs in quadrants III and IV.
Answer: flat on the axes; rising in quadrants I and III, falling in II and IV
9.
m = 0 + 1 = 1
Slope at (0, 1).
y - 1 = 1(x - 0) \Rightarrow y = x + 1
Point-slope form (see point-slope form).
y(0.1) \approx 0.1 + 1 = 1.1
Follow the tangent line to x = 0.1.
Answer: y ≈ 1.1 (the exact solution, y = 2eˣ − x − 1, gives about 1.1103)
10.
T = 170: \; -0.2(100) = -20; \; T = 70: \; 0; \; T = 50: \; -0.2(-20) = 4
Substitute each temperature.
Answer: −20, 0 and 4 °F per minute; every solution moves toward 70°F, the room temperature
Slope fields FAQ
What is a slope field?
It is a grid of short line segments that shows the slope dy/dx = f(x, y) at each point. Solution curves of the differential equation follow the segments.
How do you draw a slope field?
Choose grid points, compute f(x, y) at each one, and draw a short segment with that slope through the point.
How do you sketch a solution on a slope field?
Start at the initial point and draw a smooth curve that stays tangent to the nearby segments, like a leaf floating along a current.
What is an equilibrium solution?
It is a constant solution, y = c, where dy/dx = 0 for every x. On a slope field it is a row of flat segments.
Summary
- A slope field draws a short segment with slope f(x, y) at each grid point.
- Solution curves are tangent to the segments everywhere.
- If f depends only on x, slopes match along vertical lines; only on y, along horizontal lines.
- Rows of flat segments mark equilibrium solutions.
- Slope fields let you predict long-term behavior without solving.
Previous lesson: Verifying Solutions to Differential Equations
Next lesson: Euler’s Method
Back to the Calculus 2 Index