- Create direction fields for first-order differential equations
- Use a direction field to sketch solution curves
- Use Euler’s Method to find approximate solutions step by step
Direction Fields
Direction fields (also called slope fields) provide a powerful visual tool for investigating first-order differential equations. We’ll work specifically with equations of the form:
[latex]y^{\prime} = f(x,y)[/latex]
Let’s start with a real-world example from Newton’s law of cooling:
[latex]T^{\prime}(t) = -0.4(T - 72)[/latex]
Here [latex]T(t)[/latex] represents temperature (in degrees Fahrenheit) of an object at time [latex]t[/latex], and the ambient temperature is [latex]72°F[/latex]. Figure 1 shows what the direction field looks like for this equation.

The idea behind a direction field is the fact that the derivative of a function evaluated at a given point is the slope of the tangent line to the graph of that function at the same point.
Here are other differential equations where direction fields prove useful:
- [latex]y^{\prime} = 3x + 2y - 4[/latex]
- [latex]y^{\prime} = x^2 - y^2[/latex]
- [latex]y^{\prime} = \frac{2x + 4}{y - 2}[/latex]
Creating a Direction Field
Let’s work through the process of creating a direction field using one of our examples: [latex]y^{\prime} = 3x + 2y - 4[/latex].
The key idea is to pick any point [latex](x_0, y_0)[/latex] in the coordinate plane and substitute these coordinates into the right-hand side of the differential equation.
If we choose [latex]x = 1[/latex] and [latex]y = 2[/latex], substituting into the right-hand side gives us:
[latex]y^{\prime} = 3x + 2y - 4 = 3(1) + 2(2) - 4 = 3[/latex]
This tells us that if a solution to the differential equation [latex]y^{\prime} = 3x + 2y - 4[/latex] passes through the point [latex](1, 2)[/latex], then the slope of the solution at that point must equal [latex]3[/latex].
To start creating the direction field, we put a short line segment at the point [latex](1, 2)[/latex] having slope [latex]3[/latex]. We can do this for any point in the domain of the function [latex]f(x, y) = 3x + 2y - 4[/latex], which consists of all ordered pairs [latex](x, y)[/latex] in [latex]\mathbb{R}^2[/latex].
This means every point in the Cartesian plane has a slope associated with it, assuming that a solution to the differential equation passes through that point. The direction field for the differential equation [latex]y^{\prime} = 3x + 2y - 4[/latex] is shown in Figure 2.

We can generate a direction field of this type for any differential equation of the form [latex]y^{\prime} =f\left(x,y\right)[/latex].
direction field
A direction field (slope field) is a mathematical object used to graphically represent solutions to a first-order differential equation. At each point in a direction field, a line segment appears whose slope is equal to the slope of a solution to the differential equation passing through that point.