Direction Fields and Euler’s Method: Learn It 1

  • 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.

A graph of a direction field for the given differential equation in quadrants one and two. The arrows are pointing directly to the right at y = 72. Below that line, the arrows have increasingly positive slope as y becomes smaller. Above that line, the arrows have increasingly negative slope as y becomes larger. The arrows point to convergence at y = 72. Two solutions are drawn: one for initial temperature less than 72, and one for initial temperatures larger than 72. The upper solution is a decreasing concave up curve, approaching y = 72 as t goes to infinity. The lower solution is an increasing concave down curve, approaching y = 72 as t goes to infinity.
Figure 1. Direction field for the differential equation [latex]{T}^{\prime }\left(t\right)=-0.4\left(T - 72\right)[/latex]. Two solutions are plotted: one with initial temperature less than [latex]72^\circ\text{F}[/latex] and the other with initial temperature greater than [latex]72^\circ\text{F}\text{.}[/latex]

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.

A graph of the direction field for the differential equation y’ = 3 x + 2 y – 4 in all four quadrants. In quadrants two and three, the arrows point down and slightly to the right. On a diagonal line, roughly y = -x + 2, the arrows point further and further to the right, curve, and then point up above that line.
Figure 2. Direction field for the differential equation [latex]y^{\prime} =3x+2y - 4[/latex].

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.