Learn Without Walls
← Lesson 1 Lesson 2 of 4 Next Lesson →

Lesson 2: Direction Fields and Solution Curves

Estimated time: 30-35 minutes

Learning Objectives

By the end of this lesson, you will be able to:

The Idea Behind Direction Fields

A first-order ODE of the form dy/dx = f(x, y) tells us the slope of the solution curve at every point (x, y). Even when we cannot solve the equation analytically, we can still visualize the solution by plotting these slopes.

Direction Field (Slope Field): A graphical representation of a first-order ODE dy/dx = f(x, y). At each sample point (x, y) in the plane, draw a short line segment with slope f(x, y). The resulting pattern shows how solution curves flow.

Think of each little segment as a signpost telling the solution which way to go. A solution curve must be tangent to these segments at every point it passes through.

Constructing a Direction Field by Hand

Example 1: Direction Field for dy/dx = x - y

Build a small direction field by computing slopes at a grid of points.

Step 1: Choose sample points and evaluate f(x,y) = x - y.

(x, y)Slope = x - y
(0, 0)0
(1, 0)1
(0, 1)-1
(1, 1)0
(2, 1)1
(1, 2)-1
(-1, 0)-1
(2, 2)0

Step 2: At each point, draw a tiny segment with the computed slope. Horizontal segments where slope = 0, upward-sloping where positive, downward where negative.

Observation: The slope is 0 along the line y = x. Above this line (y > x), slopes are negative; below it (y < x), slopes are positive. Solution curves are attracted toward the line y = x.

Isoclines

Isocline: A curve along which all slopes in the direction field have the same value. For dy/dx = f(x,y), the isocline for slope c is the curve f(x,y) = c.

Example 2: Isoclines for dy/dx = x - y

Setting x - y = c gives y = x - c. These are parallel lines with slope 1.

c = 0: y = x (horizontal segments)

c = 1: y = x - 1 (segments with slope 1)

c = -1: y = x + 1 (segments with slope -1)

Isoclines give you a fast way to build a direction field: draw the isocline, then fill it with segments all tilted at the same angle.

Autonomous Equations and Equilibria

Autonomous ODE: A first-order ODE of the form dy/dx = f(y), where the right side depends on y alone (not explicitly on x). The direction field has identical columns -- slopes depend only on the y-coordinate.

Equilibrium Solution: A constant solution y = c where f(c) = 0. On the direction field, horizontal segments form a horizontal line. The solution simply stays at y = c for all time.

Example 3: Equilibria of dy/dx = y(1 - y)

Set f(y) = y(1 - y) = 0. This gives y = 0 and y = 1.

Analysis:

For 0 < y < 1: f(y) > 0, so dy/dx > 0 and solutions increase.

For y > 1: f(y) < 0, so dy/dx < 0 and solutions decrease.

For y < 0: f(y) < 0, so solutions decrease.

Conclusion: y = 1 is a stable equilibrium (nearby solutions approach it). y = 0 is an unstable equilibrium (nearby solutions move away). This is the logistic equation -- we will study it in depth in Module 3.

Sketching Solution Curves

To sketch a solution curve through a specific initial point:

  1. Place your pencil at the initial point (x0, y0).
  2. Follow the local slope indicated by the direction field.
  3. Extend the curve in both directions (forward and backward in x).
  4. Ensure the curve stays tangent to the field segments at every point.

Example 4: Solution Curves for dy/dx = -y

The direction field has slopes that depend only on y:

When y > 0: slopes are negative (curves decrease).

When y < 0: slopes are positive (curves increase).

When y = 0: slope = 0 (equilibrium).

All solution curves approach y = 0 as x increases. The general solution is y = Ce-x, which confirms this behavior: as x → +∞, y → 0.

Check Your Understanding

1. For dy/dx = x + y, what is the slope at the point (1, -1)?

Answer: Slope = x + y = 1 + (-1) = 0. A horizontal segment goes at (1, -1).

2. For the autonomous equation dy/dx = y² - 4, find all equilibrium solutions.

Answer: Set y² - 4 = 0, so y² = 4, giving y = 2 and y = -2.

3. In the previous problem, is y = 2 stable or unstable? What about y = -2?

Answer: For y slightly above 2, y² - 4 > 0, so solutions move away from 2. For y slightly below 2, y² - 4 < 0, so solutions also move away. Thus y = 2 is unstable. For y = -2: slightly above -2 gives f < 0 (solutions decrease toward -2), slightly below gives f > 0 (solutions increase toward -2). Thus y = -2 is stable.

4. What are the isoclines for dy/dx = 2y? Describe their shape.

Answer: Setting 2y = c gives y = c/2. The isoclines are horizontal lines. Along y = 0, all segments are horizontal (slope 0). Along y = 1, all segments have slope 2. Since this is autonomous, the slopes are the same across each horizontal strip.

5. Why are direction fields useful even when we can solve the DE analytically?

Answer: Direction fields provide qualitative insight about long-term behavior, stability, and the overall shape of solution families at a glance. They also help verify analytic solutions and reveal features (like equilibria) that might not be immediately obvious from formulas.

Key Takeaways

Ready for More?

Next Lesson

In Lesson 3, you will study the Existence and Uniqueness Theorem, which tells you when an IVP is guaranteed to have exactly one solution.

Start Lesson 3

Module Progress

You have completed Lesson 2 of 4.

Back to Module Home